Steam Deck

Steam Deck

Ness Dec 2, 2023 @ 4:09pm
linux-neptune-61-headers symlinking
I have been using my steam deck to do developer work on-the-go when I'm in a pinch. The device is super capable, and it is really convenient to be able to do so. It is a big part of why this device is so valuable to me.
As of steamos 3.5, it seems that something has changed with the steam packaging. When compiling apps, I'll get errors referring to stdlib.h, errno.h, etc. which is typically an indicator that the kernel heders aren't installed, or that something is wrong with gcc glibc. I've been troubleshooting this, and indeed, linux-neptune-61-headers isn't installed. After doing so, it's a constant loop of trying to figure out why the installation of this package hasn't updated /usr/include/ directories as I would expect, and even after symlinking, them, it will eventually just start throwing errors about unknown types, or there being a loop of issues where it seems that the introduction of the `asm-generic` dir is where things start falling apart in my troubleshooting attempts to get things working fully again.

I understand this is a bit in the realm of neckbeard stuff, but if this isn't fixed upstream, this basically kills one of the larger benefits that I get from owning a Steam Deck.
< >
Showing 1-5 of 5 comments
WarnerCK Dec 3, 2023 @ 12:02am 
Originally posted by Ness:
I understand this is a bit in the realm of neckbeard stuff, but if this isn't fixed upstream, this basically kills one of the larger benefits that I get from owning a Steam Deck.

Would distrobox help you?

https://distrobox.it/

https://www.gamingonlinux.com/2022/09/distrobox-can-open-up-the-steam-deck-to-a-whole-new-world/
Ness Apr 26, 2024 @ 9:01am 
The issue seems to be that they gutted some stuff from the base rootfs image, and so nothing will compile unless you repair the packages. I was able to fix this with a script I made https://gist.github.com/wallentx/a21434597cdf993bbfc52c846867235a
Originally posted by Ness:
The issue seems to be that they gutted some stuff from the base rootfs image, and so nothing will compile unless you repair the packages. I was able to fix this with a script I made https://gist.github.com/wallentx/a21434597cdf993bbfc52c846867235a
this ♥♥♥♥♥♥ up my steam deck. thanks a lot ♥♥♥♥♥♥♥.
Ness May 29 @ 12:44am 
Originally posted by polocatfan:
Originally posted by Ness:
The issue seems to be that they gutted some stuff from the base rootfs image, and so nothing will compile unless you repair the packages. I was able to fix this with a script I made https://gist.github.com/wallentx/a21434597cdf993bbfc52c846867235a
this ♥♥♥♥♥♥ up my steam deck. thanks a lot ♥♥♥♥♥♥♥.

Any code you find online, you should review, understand, and run at your own risk.
That said, you can just fix the problem, either by switching to your other A/B partition, or addressing whatever ended up breaking. The only thing that I could imagine that my script would do that would result in your deck getting messed up is filling your rootfs partition.
I can't account for how many new "minimized" (broken) packages Valve introduces at each iteration of their image, so the disk space required to actually perform fixing these packages will likely just grow over time.

Valve has their own tooling which essentially does the exact same thing as my script, and in testing those, their own scripts result in a failure due to my disk getting full.

`steamos-devmode`
```
Usage: steamos-devmode enable|status [--no-prompt]

A helper script to enable developer mode on SteamOS
- Disables read-only mode.
- Populates the pacman keyring.

--no-prompt
Skips interactive confirmation

If you wish to re-enable readonly mode after using this script, you can use the
"steamos-readonly enable" command. This does not undo changes performed
while in dev mode.

See also 'steamos-unminimize'
```

`steamos-unminimize`
```
Usage: steamos-unminimize [--dev] [--noconfirm] [directory [directory ...]]

Scans for packages with missing files and reinstalls them. Can be used to undo
the minimization that occurs at SteamOS image building time, installing missing
files such as man pages and includes.

With directory argument(s), will only scan/reinstall packages with affected
files in the given paths. E.g. 'steamos-unminimize /usr/include'.

This is largely a wrapper around 'pacman -Qk'.

--dev
Install additional useful development packages, including 'base-devel'
and 'multilib-devel' packages.

--noconfirm
Do not confirm (re)installation of selected packages.
```

feel free to look at their script yourself https://gist.github.com/wallentx/98dc9fd124d34df52d5abb50975d3a90#file-steamos-unminimize

My script is functionally doing the exact same thing, except that I'm setting the locale first so that packages don't install files for every possible locale.
Even though the problem you are having is a skill issue, I've updated my script to provide feature parity with what valve provides, and mine also now includes a disk availability check.
```
Usage: pacrepair [OPTIONS]

Options:
-d Include base-devel and multilib-devel in estimation and install
-D Skip installing documentation (man, info, doc)
-t DIR Targeted directory for partial unminimization (can be used multiple times)
-l "LOCALE" Specify locale to use (e.g. "en_US.UTF-8 UTF-8" or "en_US ISO-8859-1")
-h Show this help message and exit
➜ ~ pacrepair -D
🔧 Setting locale to en_US.UTF-8 UTF-8...
Generating locales...
en_US.UTF-8... done
Generation complete.
🔍 Checking if developer mode is already enabled...
✅ Developer mode already enabled.
📏 Checking available disk space on rootfs...
💾 Free space: 744 MiB
📦 Performing full system-wide unminimize check...
📦 Found 931 native packages with missing files...

📊 Disk usage estimation:
Estimated required: 4601 MiB
With buffer: 4901 MiB
Free space: 744 MiB

❌ Not enough disk space to safely unminimize.
⚠️ Required: 4901 MiB (including buffer).
💡 Tip: Free up space, skip the -d option, or try with the -D option.
```
< >
Showing 1-5 of 5 comments
Per page: 1530 50