[GH-ISSUE #21] debian: package ships only an initramfs-tools drop-in, so on a dracut backend the module silently never reaches the initramfs #16

Open
opened 2026-10-31 06:58:14 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @haichongck on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/nlzy/turing-unlock/issues/21

Problem

The Debian package builds and installs the module correctly, but the module never reaches the initramfs on dracut-based systems, so the unlock silently does nothing.

Two separate problems compound here.

1. debian/rules never calls install-dracut

packaging/boot/dracut.conf exists and the install-dracut Makefile target exists, but debian/rules only runs:

override_dh_auto_install:
	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp ASSETS="$(ASSETS)" \
		install-dkms install-firmware install-initramfs-tools

install-dracut is missing from that list, so no dracut drop-in is shipped in the .deb.

2. The shipped drop-in path is read by nothing

The deb does install /usr/share/initramfs-tools/modules.d/turing-unlock.conf, but on this system nothing reads that directory:

$ grep -rls "modules\.d" /usr/share/initramfs-tools/ /usr/sbin/update-initramfs /etc/initramfs-tools/
(no output)

And on Ubuntu 26.04 update-initramfs is already a dracut backend — update-initramfs -v prints dracut[I]: lines — so /etc/initramfs-tools/modules is dead as well:

$ dpkg-query -W -f='${Package} ${Version}\n' dracut initramfs-tools
dracut 110-11ubuntu0.1
initramfs-tools (installed, but not the active backend)

Observed behaviour

Everything reports success:

Loading new turing-unlock/2.0.0 DKMS files...
Building initial module turing-unlock/2.0.0 for 7.0.0-38-generic
Signing module /var/lib/dkms/turing-unlock/2.0.0/build/turing_unlock.ko
Installing /lib/modules/7.0.0-38-generic/updates/dkms/turing_unlock.ko.zst
Running depmod.... done.
update-initramfs: Generating /boot/initrd.img-7.0.0-38-generic     ← exit 0

But the image contains none of it:

$ sudo lsinitramfs /boot/initrd.img-$(uname -r) | grep -i turing
(empty)

The only user-visible symptom is the absence of the module's log line — no error anywhere. A user would reasonably conclude their card is unsupported.

Workaround

Use the project's own dracut config, which is exactly the right content:

printf '%s\n' 'force_drivers+=" turing_unlock "' | sudo tee /etc/dracut.conf.d/50-turing-unlock.conf
sudo update-initramfs -u -k "$(uname -r)"

After this, dracut emits rd.driver.pre=turing_unlock and the image picks up the module plus all six firmware blobs, because the module declares them via MODULE_FIRMWARE:

$ sudo lsinitramfs /boot/initrd.img-$(uname -r) | grep -i turing
usr/lib/firmware/turing-unlock/610.43.03/booter_load_tu102.bin
usr/lib/firmware/turing-unlock/610.43.03/gsp_boot_desc_tu102.bin
usr/lib/firmware/turing-unlock/610.43.03/gsp_boot_tu102.bin
usr/lib/firmware/turing-unlock/610.43.03/gsp_tu10x.bin
usr/lib/firmware/turing-unlock/610.43.03/sec2_bl_tu102.bin
usr/lib/firmware/turing-unlock/610.43.03/v67-tu102-610.43.03.bin
usr/lib/modules/7.0.0-38-generic/updates/dkms/turing_unlock.ko.zst

rd.driver.pre is what makes the ordering correct: nvidia.ko is itself pulled into the image by hooks/framebuffer-nvidia (copy_modules_dir_filter updates/dkms nvidia, whose inner manual_add_modules adds it to the load list), so the unlock module has to be earlier or it hits -EBUSY on pdev->driver.

Suggested fix

  • Add install-dracut to override_dh_auto_install in debian/rules, installing to /usr/lib/dracut/dracut.conf.d/.
  • Keep the initramfs-tools drop-in for systems that are actually on that backend.
  • If shipping both unconditionally is undesirable, detect the active backend in postinst (e.g. presence of dracut in use, or which tool produced /boot/initrd.img-*) and only then rebuild.
  • At minimum, document in the Debian/Ubuntu install notes that dracut users must add the drop-in manually — this is currently a completely silent failure.

Also worth noting (minor, same install path)

dpkg-buildpackage fails on the build-dependency check because dh-sequence-dkms does not exist as a Debian package; the real provider is dh-dkms.

dpkg-checkbuilddeps: error: unmet build dependencies: debhelper-compat (= 13) dh-sequence-dkms

Working around it with apt install debhelper dh-dkms + dpkg-buildpackage -us -uc -d produces a correct package with a proper dh_dkms postinst, so this looks like purely a packaging metadata issue.

Environment

  • Ubuntu 26.04, kernel 7.0.0-38-generic
  • NVIDIA 595.99.02 (proprietary, nvidia-dkms-595), DKMS 3.2.2
  • dracut 110-11ubuntu0.1 (active backend behind update-initramfs)
  • turing-unlock 2.0.0, main @ 417f333, firmware 610.43.03
  • Cards: 2× RTX 2080 Ti 22 GB (10de:1e07)

With the drop-in in place, both cards unlock on every boot (compatibility report filed separately).

Originally created by @haichongck on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/nlzy/turing-unlock/issues/21 ## Problem The Debian package builds and installs the module correctly, but the module **never reaches the initramfs** on dracut-based systems, so the unlock silently does nothing. Two separate problems compound here. ### 1. `debian/rules` never calls `install-dracut` `packaging/boot/dracut.conf` exists and the `install-dracut` Makefile target exists, but `debian/rules` only runs: ```make override_dh_auto_install: $(MAKE) DESTDIR=$(CURDIR)/debian/tmp ASSETS="$(ASSETS)" \ install-dkms install-firmware install-initramfs-tools ``` `install-dracut` is missing from that list, so no dracut drop-in is shipped in the `.deb`. ### 2. The shipped drop-in path is read by nothing The deb does install `/usr/share/initramfs-tools/modules.d/turing-unlock.conf`, but on this system **nothing reads that directory**: ``` $ grep -rls "modules\.d" /usr/share/initramfs-tools/ /usr/sbin/update-initramfs /etc/initramfs-tools/ (no output) ``` And on Ubuntu 26.04 `update-initramfs` is already a **dracut backend** — `update-initramfs -v` prints `dracut[I]:` lines — so `/etc/initramfs-tools/modules` is dead as well: ``` $ dpkg-query -W -f='${Package} ${Version}\n' dracut initramfs-tools dracut 110-11ubuntu0.1 initramfs-tools (installed, but not the active backend) ``` ## Observed behaviour Everything reports success: ``` Loading new turing-unlock/2.0.0 DKMS files... Building initial module turing-unlock/2.0.0 for 7.0.0-38-generic Signing module /var/lib/dkms/turing-unlock/2.0.0/build/turing_unlock.ko Installing /lib/modules/7.0.0-38-generic/updates/dkms/turing_unlock.ko.zst Running depmod.... done. update-initramfs: Generating /boot/initrd.img-7.0.0-38-generic ← exit 0 ``` But the image contains none of it: ``` $ sudo lsinitramfs /boot/initrd.img-$(uname -r) | grep -i turing (empty) ``` The only user-visible symptom is the **absence** of the module's log line — no error anywhere. A user would reasonably conclude their card is unsupported. ## Workaround Use the project's own dracut config, which is exactly the right content: ```bash printf '%s\n' 'force_drivers+=" turing_unlock "' | sudo tee /etc/dracut.conf.d/50-turing-unlock.conf sudo update-initramfs -u -k "$(uname -r)" ``` After this, dracut emits `rd.driver.pre=turing_unlock` and the image picks up the module plus all six firmware blobs, because the module declares them via `MODULE_FIRMWARE`: ``` $ sudo lsinitramfs /boot/initrd.img-$(uname -r) | grep -i turing usr/lib/firmware/turing-unlock/610.43.03/booter_load_tu102.bin usr/lib/firmware/turing-unlock/610.43.03/gsp_boot_desc_tu102.bin usr/lib/firmware/turing-unlock/610.43.03/gsp_boot_tu102.bin usr/lib/firmware/turing-unlock/610.43.03/gsp_tu10x.bin usr/lib/firmware/turing-unlock/610.43.03/sec2_bl_tu102.bin usr/lib/firmware/turing-unlock/610.43.03/v67-tu102-610.43.03.bin usr/lib/modules/7.0.0-38-generic/updates/dkms/turing_unlock.ko.zst ``` `rd.driver.pre` is what makes the ordering correct: `nvidia.ko` is itself pulled into the image by `hooks/framebuffer-nvidia` (`copy_modules_dir_filter updates/dkms nvidia`, whose inner `manual_add_modules` adds it to the load list), so the unlock module has to be earlier or it hits `-EBUSY` on `pdev->driver`. ## Suggested fix - Add `install-dracut` to `override_dh_auto_install` in `debian/rules`, installing to `/usr/lib/dracut/dracut.conf.d/`. - Keep the initramfs-tools drop-in for systems that are actually on that backend. - If shipping both unconditionally is undesirable, detect the active backend in `postinst` (e.g. presence of `dracut` in use, or which tool produced `/boot/initrd.img-*`) and only then rebuild. - At minimum, document in the Debian/Ubuntu install notes that dracut users must add the drop-in manually — this is currently a completely silent failure. ## Also worth noting (minor, same install path) `dpkg-buildpackage` fails on the build-dependency check because `dh-sequence-dkms` does not exist as a Debian package; the real provider is `dh-dkms`. ``` dpkg-checkbuilddeps: error: unmet build dependencies: debhelper-compat (= 13) dh-sequence-dkms ``` Working around it with `apt install debhelper dh-dkms` + `dpkg-buildpackage -us -uc -d` produces a correct package with a proper `dh_dkms` postinst, so this looks like purely a packaging metadata issue. ## Environment - Ubuntu 26.04, kernel `7.0.0-38-generic` - NVIDIA `595.99.02` (proprietary, `nvidia-dkms-595`), DKMS 3.2.2 - dracut `110-11ubuntu0.1` (active backend behind `update-initramfs`) - turing-unlock `2.0.0`, `main @ 417f333`, firmware `610.43.03` - Cards: 2× RTX 2080 Ti 22 GB (`10de:1e07`) With the drop-in in place, both cards unlock on every boot (compatibility report filed separately).
Author
Owner

@gongdao123 commented on GitHub (Oct 28, 2026):

Can confirm, with a couple of details that may help the fix.

Environment: Ubuntu 26.04.1, kernel 7.0.0-38-generic, dracut 110-11ubuntu0.1, NVIDIA 595.99.02 open (Ubuntu's prebuilt linux-modules-nvidia-595-open-7.0.0-38-generic, no nvidia-dkms), turing-unlock 2.0.0 @ 417f333, 2× RTX 2080 Ti 22 GB (10de:1e04, NV2).

Here dracut is the only backend, not just the active one. initramfs-tools is not installed at all, only initramfs-tools-core, and update-initramfs itself belongs to the dracut package:

$ dpkg -l initramfs-tools initramfs-tools-core dracut | grep -E '^(ii|un)'
ii  dracut                110-11ubuntu0.1
un  initramfs-tools       <none>
ii  initramfs-tools-core  0.151ubuntu1
$ dpkg -S /usr/sbin/update-initramfs
dracut: /usr/sbin/update-initramfs

As far as I can tell, every Ubuntu 26.04 user of the .deb hits this. A stale /etc/initramfs-tools/initramfs.conf is still lying around, which made it look like initramfs-tools at first glance.

An easy tell: after installing the two debs, the regenerated initrd was the same size as before (60,395,171 → 60,393,199 bytes), even though gsp_tu10x.bin alone is 29 MB. With the drop-in it grew to 75,719,221 bytes. lsinitrd then shows the module, the six firmware files, and etc/cmdline.d/20-force_drivers.conf = rd.driver.pre=turing_unlock, and both cards log TU102 FEAT UNLOCKED / unlocked at boot. With Ubuntu's prebuilt nvidia modules, nvidia*.ko is not in the dracut image at all, so the ordering race does not come up in this setup; rd.driver.pre covers both cases anyway.

On the build-dependency note: I think that part is fine as it is. dh-dkms declares Provides: dh-sequence-dkms (3.2.2-1ubuntu1 here), so make install-deb → apt-get build-dep <dir> installs dh-dkms, and dpkg-buildpackage -us -uc then passes without -d. dpkg-checkbuilddeps only complains when the build deps were installed some other way.

Fix: the RPM spec already ships the dracut drop-in via install-dracut, so the Debian side needs the same two lines. I tested this: the resulting turing-unlock-dkms contains both /usr/lib/dracut/dracut.conf.d/turing-unlock.conf and the initramfs-tools drop-in, and dh_missing is clean. The existing postinst/postrm already call update-initramfs, which is dracut's shim here, so they need no change. Each drop-in is ignored by the other generator, so shipping both unconditionally seems simplest.

--- a/debian/rules
+++ b/debian/rules
@@ -17,4 +17,4 @@ override_dh_auto_build:
 
 override_dh_auto_install:
 	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp ASSETS="$(ASSETS)" \
-		install-dkms install-firmware install-initramfs-tools
+		install-dkms install-firmware install-initramfs-tools install-dracut
--- a/debian/turing-unlock-dkms.install
+++ b/debian/turing-unlock-dkms.install
@@ -1,3 +1,4 @@
 usr/src
 usr/share/initramfs-tools
+usr/lib/dracut
 usr/share/doc/turing-unlock

Happy to open a PR with this if that helps.

<!-- gh-comment-id:6459924181 --> @gongdao123 commented on GitHub (Oct 28, 2026): Can confirm, with a couple of details that may help the fix. **Environment:** Ubuntu 26.04.1, kernel 7.0.0-38-generic, dracut 110-11ubuntu0.1, NVIDIA 595.99.02 open (Ubuntu's prebuilt `linux-modules-nvidia-595-open-7.0.0-38-generic`, no nvidia-dkms), turing-unlock 2.0.0 @ 417f333, 2× RTX 2080 Ti 22 GB (`10de:1e04`, NV2). **Here dracut is the only backend, not just the active one.** `initramfs-tools` is not installed at all, only `initramfs-tools-core`, and `update-initramfs` itself belongs to the dracut package: ``` $ dpkg -l initramfs-tools initramfs-tools-core dracut | grep -E '^(ii|un)' ii dracut 110-11ubuntu0.1 un initramfs-tools <none> ii initramfs-tools-core 0.151ubuntu1 $ dpkg -S /usr/sbin/update-initramfs dracut: /usr/sbin/update-initramfs ``` As far as I can tell, every Ubuntu 26.04 user of the `.deb` hits this. A stale `/etc/initramfs-tools/initramfs.conf` is still lying around, which made it look like initramfs-tools at first glance. **An easy tell:** after installing the two debs, the regenerated initrd was the same size as before (60,395,171 → 60,393,199 bytes), even though `gsp_tu10x.bin` alone is 29 MB. With the drop-in it grew to 75,719,221 bytes. `lsinitrd` then shows the module, the six firmware files, and `etc/cmdline.d/20-force_drivers.conf` = `rd.driver.pre=turing_unlock`, and both cards log `TU102 FEAT UNLOCKED` / `unlocked` at boot. With Ubuntu's prebuilt nvidia modules, `nvidia*.ko` is not in the dracut image at all, so the ordering race does not come up in this setup; `rd.driver.pre` covers both cases anyway. **On the build-dependency note:** I think that part is fine as it is. `dh-dkms` declares `Provides: dh-sequence-dkms` (3.2.2-1ubuntu1 here), so `make install-deb` → `apt-get build-dep <dir>` installs `dh-dkms`, and `dpkg-buildpackage -us -uc` then passes without `-d`. `dpkg-checkbuilddeps` only complains when the build deps were installed some other way. **Fix:** the RPM spec already ships the dracut drop-in via `install-dracut`, so the Debian side needs the same two lines. I tested this: the resulting `turing-unlock-dkms` contains both `/usr/lib/dracut/dracut.conf.d/turing-unlock.conf` and the initramfs-tools drop-in, and `dh_missing` is clean. The existing `postinst`/`postrm` already call `update-initramfs`, which is dracut's shim here, so they need no change. Each drop-in is ignored by the other generator, so shipping both unconditionally seems simplest. ```diff --- a/debian/rules +++ b/debian/rules @@ -17,4 +17,4 @@ override_dh_auto_build: override_dh_auto_install: $(MAKE) DESTDIR=$(CURDIR)/debian/tmp ASSETS="$(ASSETS)" \ - install-dkms install-firmware install-initramfs-tools + install-dkms install-firmware install-initramfs-tools install-dracut --- a/debian/turing-unlock-dkms.install +++ b/debian/turing-unlock-dkms.install @@ -1,3 +1,4 @@ usr/src usr/share/initramfs-tools +usr/lib/dracut usr/share/doc/turing-unlock ``` Happy to open a PR with this if that helps.
Author
Owner

@haichongck commented on GitHub (Oct 28, 2026):

Thanks — and you're right about the build dependency, I'm withdrawing that part. dh-dkms here is also 3.2.2-1ubuntu1 and declares Provides: dh-sequence-dkms, so apt-get build-dep covers it and dpkg-buildpackage -us -uc passes without -d. My "missing metapackage" note was a wrong conclusion drawn from dpkg-checkbuilddeps output, not a real defect.

I checked your fix against the tree and it lines up exactly:

  • install-dracut exists at Makefile:81 and installs packaging/boot/dracut.conf → /usr/lib/dracut/dracut.conf.d/turing-unlock.conf
  • that file is byte-identical to the workaround I had been running by hand (force_drivers+=" turing_unlock " dropped into /etc/dracut.conf.d/), which is a good sign the packaging simply never shipped what the RPM already does
  • debian/rules really does end at install-dkms install-firmware install-initramfs-tools, and debian/turing-unlock-dkms.install really has no usr/lib/dracut

My environment matches yours item for item: dracut 110-11ubuntu0.1, initramfs-tools uninstalled (un), initramfs-tools-core 0.151ubuntu1, and dpkg -S /usr/sbin/update-initramfs → dracut: /usr/sbin/update-initramfs. So the two reports are the same failure from the same packaging gap.

Please do open the PR. Your two-line diff is right, and having it arrive with your own build evidence (dh_missing clean, both drop-ins present in the result) is better than me writing it from the outside without having built the package.

Two small data points for the maintainer:

  • My cards report 10de:1e07 (TU102 2080 Ti Rev. A) rather than your 10de:1e04, so this is not variant-specific — both are affected, and unlock works once the drop-in is in place.
  • Your rd.driver.pre reasoning holds here too: with Ubuntu's prebuilt linux-modules-nvidia-595-open there is no nvidia*.ko in the dracut image at all, so the ordering race cannot happen, but rd.driver.pre covers the dkms case as well.
<!-- gh-comment-id:6461176815 --> @haichongck commented on GitHub (Oct 28, 2026): Thanks — and you're right about the build dependency, I'm withdrawing that part. `dh-dkms` here is also `3.2.2-1ubuntu1` and declares `Provides: dh-sequence-dkms`, so `apt-get build-dep` covers it and `dpkg-buildpackage -us -uc` passes without `-d`. My "missing metapackage" note was a wrong conclusion drawn from `dpkg-checkbuilddeps` output, not a real defect. I checked your fix against the tree and it lines up exactly: - `install-dracut` exists at `Makefile:81` and installs `packaging/boot/dracut.conf` → `/usr/lib/dracut/dracut.conf.d/turing-unlock.conf` - that file is **byte-identical to the workaround I had been running by hand** (`force_drivers+=" turing_unlock "` dropped into `/etc/dracut.conf.d/`), which is a good sign the packaging simply never shipped what the RPM already does - `debian/rules` really does end at `install-dkms install-firmware install-initramfs-tools`, and `debian/turing-unlock-dkms.install` really has no `usr/lib/dracut` My environment matches yours item for item: dracut `110-11ubuntu0.1`, `initramfs-tools` uninstalled (`un`), `initramfs-tools-core 0.151ubuntu1`, and `dpkg -S /usr/sbin/update-initramfs` → `dracut: /usr/sbin/update-initramfs`. So the two reports are the same failure from the same packaging gap. Please do open the PR. Your two-line diff is right, and having it arrive with your own build evidence (`dh_missing` clean, both drop-ins present in the result) is better than me writing it from the outside without having built the package. Two small data points for the maintainer: - My cards report `10de:1e07` (TU102 2080 Ti Rev. A) rather than your `10de:1e04`, so this is not variant-specific — both are affected, and unlock works once the drop-in is in place. - Your `rd.driver.pre` reasoning holds here too: with Ubuntu's prebuilt `linux-modules-nvidia-595-open` there is no `nvidia*.ko` in the dracut image at all, so the ordering race cannot happen, but `rd.driver.pre` covers the dkms case as well.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nlzy/turing-unlock#16
No description provided.