Some Bits: Nelson's log

6 posts in July 2026

/tmp woes on Nobara Linux

/tmp filled on my desktop Linux box running Nobara (Fedora 44). WTF? The problem turned out to be Chrome leaving behind download files.

What is /tmp on Nobara

/tmp is not a disk-backed filesystem. It’s tmpfs, which sits in RAM. Fedora sizes it to be 50% of RAM by default, or 14GB in my case.

/tmp gets cleared on reboot. It also gets cleared daily by systemd-tmpfiles. That’s configured (mostly) in /usr/lib/tmpfiles.d/tmp.conf and by default deletes files older than 10 days.

There’s also a /var/tmp on regular disk which is for temporary files that should last longer than just a reboot. The systemd job deletes files older than 30 days there.

Finding the /tmp usage

First thing I did is run du /tmp. And saw nothing there but some small files. Which sent me down a rabbit hole of using lsof to find deleted files and some eldritch possibilities of giant RAM pages or other memory management problems.

Nah, the problem was just that Chrome writes its download turds to hidden . files like /tmp/.com.google.Chrome.GsPvIQ. Which du -s /tmp/* won’t show. Have to do du -s /tmp* /tmp/.* Fucking Unix.

Anyway, once I found what the /tmp files were I quit Chrome expecting them to be deleted. Nope. Was it a Chromium app? No. lsof showed nothing had the file open, it was just something Chrome left behind. Ugh. Arguably Chrome should be writing these to /var/tmp.

A reboot should fix this kind of stupidity but I’m stubborn and think Linux systems shouldn’t need rebooting.

Temporary data in my RAM?

I’m wondering why tmpfs is a thing. To me, /tmp is where you put data that you don’t want to keep in RAM. Why waste precious RAM on temporary dross? Why have such a small temporary partition?

I guess the theory is you want /tmp to be fast and not wear an SSD. And if there’s memory pressure, why, that’s what swap is for. (I have 30GB of swap on a partition in an SSD). That makes a certain kind of sense to me but I don’t love it.

While I’m here, the real confusing thing in a modern Linux is zram. Or alternately zswap. And the controversy between them. I started trying to read about this and realized I couldn’t make an informed decision, so I’m just taking Nobara’s defaults.

Which worked fine right until Chrome did something dumb like assume /tmp was OK for large files.

Linux desktop gaming: ways to run

I’m deep in the weeds of tinkering with how Steam launches games. In Linux you have a bunch of options. Here’s some experiments I did running Borderlands 4 (Unreal Engine 5) on a mini PC with an AMD Ryzen 7 PRO 8845HS and a Radeon 780M graphics chip, trying to run the game at 1080p on my 6016 x 3384 screen.

Note this machine is woefully underpowered to run this game well, I’m on full Low settings. And Borderlands 4 is considered poorly optimized. I’m mostly concerned about the different display options: resolutions, HDR, upscaling. Those choices should apply on better hardware too but there’s less need to squeeze out more pixels with clever choices.

In all cases I’m changing launch options by right clicking the game in Steam, choosing General / Launch Options, and then pasting in command strings.

I’m using GE-Proton11-1 as the compatibility tool. This is a very recent version.

A useful reference: Proton Variants. This documents all the various fiddly environment variables the different compatibility tools use.

First, two digressions on other options

Frame generation

I am not ever enabling “frame generation” (DLSS or FSR) in the game. This is a gimmick where the GPU will generate whole frames by time-interpolating other frames. But it doesn’t look very good and it adds latency and seems always bad to use.

Gamemoderun

A wildcard: you can preface any program you run with gamemoderun. That enables game mode, a set of Linux kernel tweaks that lowers latency. This seems entirely orthogonal to different display options and offers only a tiny improvement, at least on a quiet system. I mostly use it but will not worry about testing it separately, I just use it everywhere.

Simply running it directly

gamemoderun %command%.

Just launch the game directly without tweaks. This works pretty well in Borderlands and arguably is the best way to run the game. The game will try to run at full desktop resolution but Borderlands detects other resolutions and lets you apply them. You can pick your upscaling algorithm, I’m using AMD’s FSR. TSR looks better but is a little slower.

The one drawback with this is there’s no HDR.

Running it directly with HDR

PROTON_ENABLE_WAYLAND=1 PROTON_ENABLE_HDR=1 DXVK_HDR=1 ENABLE_HDR_WSI=1 gamemoderun %command%

This is a variant of simply running it: Borderlands will talk directly to the display compositor the desktop is using. However there’s a whole raft of flags there to enable HDR. Why three flags for HDR? I don’t know honestly, I’m copying what the AI tells me to do. It’s possible these aren’t all necessary, particularly with GE-Proton, but they are harmless if not used.

The other flag here is PROTON_ENABLE_WAYLAND=1. That’s arguably the most important one. Without it, Proton runs games under XWayland, so that Proton is using X11 graphics and the XWayland X server is translating those to Wayland. With that Proton uses a native Wayland driver. That’s better but I guess that native driver isn’t entirely stable yet, so it’s not the default.

Running with Gamescope

gamemoderun gamescope -W 2560 -H 1440 -f -F fsr -- %command%

Gamescope is an intermediate compositor that smooths over a bunch of issues with gaming on Linux. It basically creates a virtual display that the game draws too, then blits that image to the real display. It’s pretty low latency and has solved a lot of problems for me, particularly older games that don’t seem to understand the Linux display very well. It doesn’t seem necessary for Borderlands 4 but we’ll try it anyway. (One drawback: Gamescope breaks the Steam overlay. There’s an experimental flag to enable it again but it doesn’t seem to work.)

-f just tells gamescope itself to be fullscreen, not a window.

-W 2560 -H 1440 -F fsr tells gamescope to run its virtual display at 1440p and use FSR if needed to scale things. The game will think it is running on a 1440p monitor. Borderlands lets me choose my own resolution inside the game, and I choose 1080p. So now Borderlands is drawing at 1080p.

Borderlands is well behaved and lets me set the resolution. Another way to set the resolution is to add -w 1920 -h 1080 to the gamescope options. That tells gamescope to tell the game it’s a 1080p screen but to automatically upscale to 1440p itself. I’m acomplishing the same thing by using the Borderlands menu to pick 1080p.

An added complication here is Borderlands itself may do some spatial upscaling depending on the graphics settings. I’m a little fuzzy on this but an AI tells me on “Performance” mode it renders the game at 50% (540p). So there’s several scaling steps here.

  1. 540p: the actual game geometry rendering
  2. 540p → 1080p. Borderlands upscaling with FSR 3.0
  3. 1080p → 1440p. Gamescope upscaling with FSR 1.0
  4. 1440p → 3384p. Linux graphics (KDE’s compositor?) upscaling with a crummy linear filter.
  5. 3384p → monitor. Linux is handing a full 3384p signal so the monitor doesn’t need to use its hardware upscaler. In other circumstances the monitor might upscale.

Writing all this out, step 3 seems bogus and it’d be better to eliminate it. Have gamescope just work at the same resolution you want the game to work at. The flipside is the FSR 1.0 in step 3 is probably better than whatever upscaling is in steps 4 and 5, so it might still be preferable to do the extra work in gamescope.

The other option that seems appealing is to run gamescope -W 6016 -h 3384 and have it fully upscale things with FSR 1.0. I think that’s how gamescope is intended to be used. But that’s a lot of pixels and this little video card is kinda limited, so the AI is advising me 1440p is better. FWIW I tried it at 3384p and it seemed to run just the same as with gamescope at 1080p.

Gamescope with HDR

ENABLE_HDR_WSI=1 DXVK_HDR=1 gamemoderun gamescope -W 2560 -H 1440 -f -F fsr --hdr-enabled -- %command%

Gamescope by default doesn’t do HDR. You have to add these flags to enable HDR both in the game (the environment variables) and in gamescope (--hdr-enabled).

Putting it all together

For Borderlands, I don’t want to use gamescope. I mean I could, and maybe the FSR 1.0 upscaling is better than the linear upscaling the Linux desktop would do. But it doesn’t look much better and gamescope certainly adds complexity and a little latency.

Without Gamescope I get about 39 fps in one little test I ran with this command:

PROTON_ENABLE_WAYLAND=1 PROTON_ENABLE_HDR=1 DXVK_HDR=1 ENABLE_HDR_WSI=1 gamemoderun %command%

If I did want to use gamescope, I’d run it at 1080p like this. I tried this and it might look a tiny bit better and runs at 38 fps instead of 39.

ENABLE_HDR_WSI=1 DXVK_HDR=1 gamemoderun gamescope -w 1920 -h 1080 -W 1920 -H 1080 -f -r 60 --hdr-enabled -- %command%

Closing thoughts

Hilarious thing: all these various options don’t really look that different to me. It seems less blurry when I do the more “optimal” things. And maybe I get 10% more framerate depending on how I tweak it. But honestly with this particular heavy game and this particular underpowered hardware, it’s not a big thing.

Linux gaming is easy!

Seriously, all this tinkering is ridiculous. One nice thing about Bazzite is you can ignore most of it: if you use Game Mode, it just handles Gamescope in the background and stuff works. Desktop Steam should get there eventually, but this transition where options like native Wayland rendering don’t work reliably yet is awkward.

A modern HTTP request

I got curious about what HTTP headers Chrome is requesting so I stood up a trivial HTTP server and this is what is on the wire.

$ while true; do echo -e "HTTP/1.1 200 OK\nContent-Length: 3\n\nOK\n" | nc -l -p 8081; done

GET / HTTP/1.1
Host: localhost:8081
Connection: keep-alive
sec-ch-ua: "Not;A=Brand";v="8", "Chromium";v="150", "Google Chrome";v="150"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Linux"
DNT: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Accept-Encoding: gzip, deflate, br, zstd
Accept-Language: en-US,en;q=0.9
sec-gpc: 1
permissions-policy: browsing-topics=()

Goodness that’s a lot of stuff! I still remember when even the Host header was optional (in HTTP/0.91). And my knowledge taps out around HTTP/1.1, the Connection: keep-alive and the Accept headers.. Anyway, what else is there?

The sec-ch-ua stuff is a modern replacement for User-Agent

DNT, sec-gpc, and permissions-policy are various requests to preserve my privacy. I just installed OptMeOwt, it is adding some of these. I think permissions-policy is a Google thing.

The Sec-Fetch stuff is about the intent of the request and is apparently used to make decisions related to CSRF, CORS, etc.

Upgrade-Insecure-Requests is telling the webserver to redirect me to https if it can.

In general sec- is a “forbidden request header”: only the browser is allowed to set these headers, not Javascript on the page. (Extensions can set them though.)

One other trivia I learned about: HTTP Trailers. This lets you set more headers at the end of an HTTP request instead of the start. Say data you only know about after a long POST or something. These date all the way back to 1997 and HTTP/1.1 apparently but I’ve never encountered them. They don’t work with the simplest request format since there’s no way to identify the end of the HTTP body. Chunked encoding allows for them and I imagine later encodings have something similar.

Linux remote game streaming

One thing I miss from my Windows machine was it was easy to stream games to my TV. I installed a Steam Link client on the Android TV and it connected to my Windows box running Steam. Game streaming works surprisingly well on a LAN.

Steam streaming from Linux server

In theory I should be able to do the exact same thing from Steam running on Linux. In practice I found it didn’t just work when I tried it. I should try again, particularly now that I understand better how to use gamescope and deck mode to make the Linux box run Steam games better.

Sunshine / Moonlight

The other option for remote streaming is the Sunshine server running on the Moonlight client. This is an open source evolution of NVidia’s game streaming systems. It’s well loved because it’s very low latency, like 3ms on a LAN.

I’ve made it work but it’s very unreliable. The Sunshine server on Linux is quite janky and the way it captures audio and video seems delicate. It does work sometimes! But not regularly for me. Also I have to remember to manually set my desktop to 1080p before launching Sunshine. I think the Sunshine server can do that too but again I had trouble making that work.

Headless?

What I really want is a headless system. Something where the game is running on a virtual / offscreen display and doesn’t affect my desktop at all. In practice this also seems very difficult, in particular to get the GPU to render with hardware acceleration.

One solution is a dummy HDMI plug that looks like a fake monitor. I bought one and plugged it in and it sort of works. But now I have a new display in my desktop and I couldn’t get KDE Plasma to not use it for anything, it kept causing problems.

A second solution is a virtual display with a spoofed virtual EDID pretending to be a monitor. Apparently you can hack Linux to do this. The result is similar to the dummy HDMI plug but without the stupid hardware dongle. I have not tried this.

A third solution is truly headless. Most solutions for this use the Sway compositor which has both good support for running headless and also a remote video capture system wlr-screencopy that Sunshine can work well with. This all sounds good but very complicated to set up and too bleeding edge for me. Some links on that:

Linux desktop gaming notes (Gamescope)

I’m finally understanding how Linux gaming works. Particularly the problem of setting display resolution and driver features. See also this CachyOS guide.

Compatibility tool

The most important Linux-specific thing is what Windows emulator Steam uses to launch your game. They call this a “compatibility tool”. I believe Proton 10 is the default these days. Valve ships other Proton versions: there’s Proton 11, Experimental, Hotfix. You can select which one Steam uses. Proton-GE is a popular third party one, by the same GloriousEggroll who puts together Nobara.

Gamescope and resolutions

The other tricky thing with Linux is the display resolution compatibility is not great. If I launch something from my normal Linux desktop most games are fixed to some bizarro resolution like 7400x4000. There’s also issues with X11 vs Wayland vs XWayland.

The solution to a lot of this is Gamescope, a graphics compositor Valve built for the SteamDeck. It makes it very easy to launch a game with a specific resolution independent of what the underlying hardware and drivers are doing. For instance you can easily launch games in 1920x1080@60 fps. They will run well and gamescope will make sure it looks good on your screen.

You can run games directly in Linux without gamescope, but the quality of that experience is highly variable. Gamescope simplifies things so that games run more reliably.

Also related: MangoHud, the overlay for monitoring FPS in games and other things. I find it annoying and intrusive but it is the preferred tool if you want to test how well a game is running. Steam also has its overlay but it can be unreliable in Linux.

Steamdeck game mode

Bazzite and Nobara both have a thing they call “deck mode”. You log in to a special SteamDeck-like session instead of a normal KDE desktop session that is for nothing but running Steam in Big Picture mode. Behind the scenes that game mode is a GUI wrapping several tools.

Games are run with gamemoderun which tweaks Linux to run an app for better game performance. It does things like change the CPU governor and kernel scheduler to make the game run smoothly. It seems to actually help.

Game mode also launches games under Gamescope. And it has a GUI built into Steam that lets you configure the resolution, etc that Gamescope presents. It’s quite nice!

ProtonPlus

ProtonPlus is a standalone GUI for downloading compatibility tools like Proton-GE. That’s its main use and is under the “Tools” tab.

But the “Games” tab has a very handy feature: a sane editor for Gamescope configurations. All this is doing is modifying Steam’s config files to set launch options; you can do the exact same thing by setting custom command lines with the Steam properties editor. But there you are typing command lines by hand, with Proton Plus you can edit them with a GUI. Just remember to exit Steam first so that it doesn’t clobber the configs that ProtonPlus sets.

I am using this all the time to enable HDR and to set a specific resolution I want the game to run at. It’s a kludge but gamescope works around some limitations of Linux gaming.

Note ProtonPlus doesn’t really help you use gamemoderun. There’s a way to enable it but no simple checkbox for it.

Other configs

gamescope for resolutions is the main thing I’ve used so far. There’s a variety of environment variables that are popular for further tweaking how things run, stuff like PROTON_ENABLE_WAYLAND=1 and PROTON_ENABLE_NVAPI=1. I don’t know much about them. ProtonPlus sets some of them if you enable Advanced mode.

Gaming on desktop

Putting it all together... the easy thing is to use the Steam Deck mode that Bazzite or Nobara offers. If all you’re doing is gaming on the computer, it’s a great choice. But me I’m mostly working on this thing and then occasionally playing a game. So I use ProtonPlus to configure Steam to launch games with the resolution and options I need.

Nobara update

I continue to like my Nobara Linux system, a Fedora variant. But the upgrade process is not giving me a good feeling.

Fedora 44 was released late April. Two months later Nobara updated to it. It’s a huge update, some 8000 packages on my system. But part of the promise of Fedora (and Debian) is these upgrades are safe, transactional, reliable.

Not so much Nobara. Common wisdom on the subreddit is to wait a couple of weeks after a Nobara release before installing it yourself. And to make a snapshot to rollback to (by hand). And to expect it might just not work.

The underlying problem is Nobara is pretty complex and mostly the heroic work of a single developer. He’s hand-vetting package upgrades to Fedora and then incorporating them when he thinks its safe. And Nobara itself is complex, a set of packages layered on top of core Fedora and handling conflicts and the like is tricky.

The scariest thing is you’re not allowed to just use Fedora’s dnf to update. Instead you’re supposed to use a GUI tool custom to Nobara, although there is an underdocumented CLI option too. It’s not clear what all this tool is doing but this list of “quirks” is one hint.

System Update: 2026-07-11 09:18:39 - INFO - QUIRK: Make sure to refresh the repositories and gpg-keys before anything.
System Update: 2026-07-11 09:18:39 - INFO - QUIRK: Make sure to update the updater itself and refresh before anything.
System Update: 2026-07-11 09:18:45 - INFO - QUIRK: Cleanup outdated kernel modules.
System Update: 2026-07-11 09:18:45 - INFO - QUIRK: Remove RPM Fusion release packages if they exist, we use Terra and they conflict.
System Update: 2026-07-11 09:18:45 - INFO - QUIRK: maliit-keyboard, as plasma-keyboard is now default.
System Update: 2026-07-11 09:18:45 - INFO - QUIRK: Repair incomplete TigerVNC server package set.
System Update: 2026-07-11 09:18:45 - INFO - QUIRK: Make sure dnf-app-center is installed.
System Update: 2026-07-11 09:18:45 - INFO - QUIRK: Replace SDDM with Plasma Login Manager when SDDM is installed.
System Update: 2026-07-11 09:18:45 - INFO - QUIRK: Make sure to run both dracut and dkms if any kmods or kernel packages were updated.
System Update: 2026-07-11 09:18:45 - INFO - QUIRK: If kwin or mutter are being updated, ask for a reboot.
System Update: 2026-07-11 09:18:45 - INFO - QUIRK: Install InputPlumber for Controller input, install steam firmware for steamdecks. Cleanup old packages.
System Update: 2026-07-11 09:18:45 - INFO - QUIRK: Problematic package cleanup.
System Update: 2026-07-11 09:18:46 - INFO - QUIRK: Clear plasmashell cache if a plasma-workspace update is available.
System Update: 2026-07-11 09:18:47 - INFO - QUIRK: Fix Nvidia epoch so it matches that of negativo17 for cross compatibility.
System Update: 2026-07-11 09:18:47 - INFO - QUIRK: Also swap akmod-nvidia for dkms-nvidia.
System Update: 2026-07-11 09:18:47 - INFO - QUIRK: Update old N41 mesa packages to current versions.
System Update: 2026-07-11 09:18:48 - INFO - QUIRK: Swap old AMD ROCm packages with upstream Fedora ROCm versions.
System Update: 2026-07-11 09:18:48 - INFO - QUIRK: mesa-vulkan-drivers fixup.
System Update: 2026-07-11 09:18:49 - INFO - QUIRK: vaapi fixup.
System Update: 2026-07-11 09:18:49 - INFO - QUIRK: Kernel fsync->nobara conversion update.
System Update: 2026-07-11 09:18:49 - INFO - QUIRK: Media fixup.

Some of this complexity is the mess that is NVidia drivers on Linux. As I type this I’m waiting for my computer to finish recompiling from sources. That’s not Nobara’s fault, that’s NVidia’s.

Bazzite has the same complexity btw. But they hide it in their atomic releases. You just install one big immutable blob they give you. I think that is great for a consumer applicance OS. But for me as a developer it’s too inflexible.

Anyway this update has failed twice now. (Once with a full disk: btrfs checkpointing means your filesystem never shrinks!) I think this third update will work, at least it will install completely, then I get to see if the system still works. My #1 concern is that one of the failed updates somehow permanently broke something. But the core of the update itself is still a dnf transaction and I am hoping that’s pretty robust to failures.

Update: seems to have worked, system boots, graphics look right.