<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Kernel on tsvinc</title>
		<link>https://tsvinc.dev/tags/kernel/</link>
		<description>Recent content in Kernel on tsvinc</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Mon, 26 Oct 2026 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://tsvinc.dev/tags/kernel/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Load gpu_unlock before nvidia on Bazzite for an RTX 3090</title>
				<link>https://tsvinc.dev/guides/gpu-unlock-on-bazzite/</link>
				<pubDate>Mon, 26 Oct 2026 00:00:00 +0000</pubDate>
				<guid>https://tsvinc.dev/guides/gpu-unlock-on-bazzite/</guid>
				<description>&lt;p&gt;This installs the &lt;code&gt;gpu_unlock&lt;/code&gt; kernel module on Bazzite so that it runs from the initramfs, before &lt;code&gt;nvidia&lt;/code&gt; binds the card, and leaves an RTX 3090 with full-rate FP16/BF16 (FP32-accumulate) and TF32 tensor math on every boot that carries the kernel option &lt;code&gt;gpu_unlock.targets=all&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&lt;dl class=&#34;guide-scope&#34;&gt;&lt;div class=&#34;guide-scope-row&#34;&gt;&lt;dt&gt;Tested on&lt;/dt&gt;&lt;dd&gt;Bazzite 44.20261023 (&lt;code&gt;bazzite-nvidia-open&lt;/code&gt; image, kernel 7.2.9-ogc3.1.fc44), NVIDIA open driver 615.78.08, RTX 3090 (&lt;code&gt;10de:2204&lt;/code&gt;) with VBIOS 94.02.26.80.8C, Secure Boot off; gpu-unlock at upstream commit &lt;code&gt;af28cbb&lt;/code&gt;, NVIDIA firmware pin 610.43.03 (2026-10-26).&lt;/dd&gt;&lt;/div&gt;&lt;div class=&#34;guide-scope-row is-gap&#34;&gt;&lt;dt&gt;Not verified&lt;/dt&gt;&lt;dd&gt;the redo after an image update brings a new kernel (none has arrived yet); the file-removal half of Undo; the login check on a real failed boot (tested with its override variables only); Secure Boot; any card other than this one RTX 3090; the boot-menu keys in Recovery come from Bazzite&#39;s docs.&lt;/dd&gt;&lt;/div&gt;&lt;div class=&#34;guide-scope-row&#34;&gt;&lt;dt&gt;Needs&lt;/dt&gt;&lt;dd&gt;a login user that can read the kernel log with &lt;code&gt;journalctl -k&lt;/code&gt; (on the tested box: a member of &lt;code&gt;wheel&lt;/code&gt;); an rpm-ostree image that puts &lt;code&gt;nvidia&lt;/code&gt; in its initramfs (Bazzite&#39;s &lt;code&gt;nvidia&lt;/code&gt; and &lt;code&gt;nvidia-open&lt;/code&gt; images do); a GA102/GA103/GA104/GA106 GeForce card from the upstream list; sudo; about 340 MB of downloads; a keyboard on the box to reach the hidden boot menu.&lt;/dd&gt;&lt;/div&gt;&lt;div class=&#34;guide-scope-row&#34;&gt;&lt;dt&gt;Time&lt;/dt&gt;&lt;dd&gt;30 min (plus one full power off).&lt;/dd&gt;&lt;/div&gt;&lt;div class=&#34;guide-scope-row&#34;&gt;&lt;dt&gt;Risk&lt;/dt&gt;&lt;dd&gt;if the unlock fails partway, the card can stay unusable until a full power off; on a single-GPU box that is a black screen, recovered from the boot menu (Recovery below). Reversible: the option lives in one deployment, the speed selectors do not survive a power off. Step 11 (optional) removes the rollback entry for good.&lt;/dd&gt;&lt;/div&gt;&lt;/dl&gt;&#xA;&lt;p&gt;The steps replace upstream&#39;s &lt;code&gt;make install&lt;/code&gt; (DKMS plus packages), which cannot work on rpm-ostree: &lt;code&gt;/usr&lt;/code&gt; is read-only, and the image&#39;s prebuilt initramfs loads &lt;code&gt;nvidia&lt;/code&gt; before anything on the root file system runs. Here the module, its firmware and a loader script live in &lt;code&gt;/etc&lt;/code&gt;, &lt;code&gt;rpm-ostree initramfs-etc&lt;/code&gt; adds them to the initramfs as an overlay, and a &lt;code&gt;modprobe.d&lt;/code&gt; &lt;code&gt;install&lt;/code&gt; rule runs the loader before every load of &lt;code&gt;nvidia&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>A -&gt; B -&gt; C -&gt; A: benchmarking a kernel cmdline change you have to reboot for</title>
				<link>https://tsvinc.dev/posts/kernel-cmdline-ab-four-boots/</link>
				<pubDate>Fri, 16 Oct 2026 00:00:00 +0000</pubDate>
				<guid>https://tsvinc.dev/posts/kernel-cmdline-ab-four-boots/</guid>
				<description>&lt;p&gt;The third boot that afternoon changed nothing, on purpose. Same kernel, &lt;code&gt;7.2.9-300.fc45&lt;/code&gt;. Same command line, byte for byte. Same IOMMU group summary in its &lt;code&gt;meta.txt&lt;/code&gt;: one &lt;code&gt;DMA&lt;/code&gt; group, 32 &lt;code&gt;DMA-FQ&lt;/code&gt;, two &lt;code&gt;identity&lt;/code&gt;. It was the baseline boot again, run because the test plan said to, and its bench started about 22 minutes after the first baseline&#39;s.&lt;/p&gt;&#xA;&lt;p&gt;gpt-oss-120b&#39;s Vulkan prefill at 64k context came out 6.2 % faster than on the first baseline boot.&lt;/p&gt;</description>
			</item>
			<item>
				<title>128k context is the floor, and prefill is the wall</title>
				<link>https://tsvinc.dev/posts/128k-floor-prefill-wall/</link>
				<pubDate>Sun, 11 Oct 2026 00:00:00 +0000</pubDate>
				<guid>https://tsvinc.dev/posts/128k-floor-prefill-wall/</guid>
				<description>&lt;div class=&#34;tldr&#34;&gt;&#xA;  &lt;span class=&#34;tldr-label&#34;&gt;TL;DR&lt;/span&gt;&#xA;  Is a 128 GB Ryzen AI Max+ 395 box worth it for long-context agent work? Memory isn&#39;t the limit: an 87 GiB model ran a 256k context with GTT peaking under 70 GiB. Prefill is. On gpt-oss-120b the marginal prefill rate falls 48×, from 1186.5 tok/s at an empty context to 24.6 tok/s at 127k, and filling that context once took 29 minutes. Qwen3.8-Flash-Next starts at less than half that prefill, overtakes it between 32k and 64k, and is 4.3× faster at ~128k, though gpt-oss still generates faster there. On kernel 7.2, one model hit a GPU compute ring timeout at 64k on all three attempts; the &lt;code&gt;amdgpu.lockup_timeout=10000,60000,10000,10000&lt;/code&gt; workaround from llama.cpp #25664 let that row complete.&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The arithmetic that sells a 128 GB box goes like this. Weights are 63 GB. The KV cache for a long context is a few more. Add it up, it&#39;s under 128, so it fits. And if it fits, it runs.&lt;/p&gt;</description>
			</item>
			<item>
				<title>120 GiB for the GPU, set in the kernel, not the BIOS</title>
				<link>https://tsvinc.dev/posts/gpu-120gib-in-the-kernel/</link>
				<pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate>
				<guid>https://tsvinc.dev/posts/gpu-120gib-in-the-kernel/</guid>
				<description>&lt;div class=&#34;tldr&#34;&gt;&#xA;  &lt;span class=&#34;tldr-label&#34;&gt;TL;DR&lt;/span&gt;&#xA;  On a Ryzen AI Max+ 395 with 128 GB, set the BIOS&#39;s Dedicated Graphics Memory to its minimum (0.5 G) and raise the TTM limit on the kernel command line: &lt;code&gt;ttm.pages_limit=31457280 ttm.page_pool_size=31457280&lt;/code&gt;. The unit is 4 KiB pages, so that is 120 GiB. Linux then sees 124.9 GiB, and the GPU can map up to 120 GiB of it on demand. &lt;code&gt;amdgpu.gttsize&lt;/code&gt; is deprecated and not needed. A firmware reset (F3, Optimized Defaults) quietly puts the carve-out back to 64 G. With the memory fixed, llama.cpp&#39;s Vulkan backend beat Fedora&#39;s ROCm build on every model tested. The two were different llama.cpp builds, though, and the benchmark&#39;s mean-power column measures something other than efficiency.&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The A9 Mega&#39;s setup menu keeps its GPU memory setting under Advanced → GFX Configuration, and it goes from 0.5 G to 96 G. The machine has 128 GB of LPDDR5X soldered to the board, and it was bought to run models whose weights alone are 63 GB. Dedicated Graphics Memory went to 96 G, the top of the list.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Packing a battery-first kernel into an HTC Desire Z boot.img</title>
				<link>https://tsvinc.dev/posts/battery-first-kernel/</link>
				<pubDate>Thu, 07 Aug 2025 00:00:00 +0000</pubDate>
				<guid>https://tsvinc.dev/posts/battery-first-kernel/</guid>
				<description>&lt;p&gt;Before I built a kernel for my HTC Desire Z, I wrote a plan for it, and the plan was confident about the end. Build the kernel and its modules, dump the boot partition, take the image apart, swap the kernel, put it back, flash it, check the frequency table, measure idle current. The middle of that, everything between &amp;quot;dump&amp;quot; and &amp;quot;flash&amp;quot;, was a single comment line. I wrote that line. I have some notes for the man who wrote it.&lt;/p&gt;</description>
			</item>
			<item>
				<title>HTC Desire Z custom kernel killed Wi-Fi: version magic and insmod</title>
				<link>https://tsvinc.dev/posts/wifi-version-magic/</link>
				<pubDate>Fri, 30 May 2025 00:00:00 +0000</pubDate>
				<guid>https://tsvinc.dev/posts/wifi-version-magic/</guid>
				<description>&lt;p&gt;The fix, for anyone in a hurry: rebuild the Wi-Fi module from inside the kernel tree, take one &lt;code&gt;-Werror&lt;/code&gt; out of the Broadcom driver&#39;s Makefile, copy the new &lt;code&gt;bcm4329.ko&lt;/code&gt; over the old one in &lt;code&gt;/system/lib/modules&lt;/code&gt;, and reboot. On the way I also added a firmware symlink, and for a while I believed the symlink was the second half of the fix. It was the second half of a mistake I had made a few minutes earlier, and this post is mostly about how I found that out after the fact.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Desire Z undervolt: a battery kernel next to CONFIG_JESUS_PHONE</title>
				<link>https://tsvinc.dev/posts/config-jesus-phone-undervolt/</link>
				<pubDate>Mon, 21 Apr 2025 00:00:00 +0000</pubDate>
				<guid>https://tsvinc.dev/posts/config-jesus-phone-undervolt/</guid>
				<description>&lt;p&gt;The whole job, in the order it happened: twelve minutes of reading kernel source and writing a plan, a defconfig, an undervolt, three build failures, seven hours in which nobody touched it, a fourth build failure, a successful build, one &lt;code&gt;fastboot flash boot&lt;/code&gt;, and a phone that came back up on a kernel I had compiled myself. The phone is my HTC Desire Z, the 2010 keyboard slider that runs CyanogenMod 7 (Android 2.3) in this series, and that I had just told, in so many words, to put its battery ahead of everything else. Speed second. Fun, apparently, third.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
