Compile a dom0 kernel for a git bisect

After updating the kernel in dom0 to 6.1.35, laptop has been rapidly heating to 70 degrees (before the update would stay at 45) within 5 minutes even when no qubes other than dom0 are running (used qubes.skip_autostart when booting).

No processes are using any more cpu/memory than before using both top and xentop.

Version 5.15.103 doesn’t have this issue, so installed some of the kernels from https://yum.qubes-os.org/r4.1/current-testing/dom0/fc32/rpm/ and found that the issue starts between 5.15.103 and 5.15.111

I’m trying to compile and do a git bisect to find what caused it. I tried using Qubes builder to get the kernel source in a fedora-32 qube, but it failed with this message after running make get-sources:

--> Downloading additional sources for linux-firmware...
make[1]: Entering directory '/home/user/qubes-builder/qubes-src/linux-firmware'
make[1]: Leaving directory '/home/user/qubes-builder/qubes-src/linux-firmware'
--> Verifying the sources...
make[1]: Entering directory '/home/user/qubes-builder/qubes-src/linux-firmware'
make[1]: Leaving directory '/home/user/qubes-builder/qubes-src/linux-firmware'
--> Downloading additional sources for linux-kernel...
make[1]: Entering directory '/home/user/qubes-builder/qubes-src/linux-kernel'
if [ -f /usr/bin/qvm-run-vm ]; \
        then qvm-run-vm --no-gui --dispvm 2>/dev/null zcat <macbook12-spi-driver-2905d318d1a3ee1a227052490bf20eddef2592f9.tar.gz.UNTRUSTED > macbook12-spi-driver-2905d318d1a3ee1a227052490bf20eddef2592f9.tar.UNTRUSTED; \
else zcat <macbook12-spi-driver-2905d318d1a3ee1a227052490bf20eddef2592f9.tar.gz.UNTRUSTED > macbook12-spi-driver-2905d318d1a3ee1a227052490bf20eddef2592f9.tar.UNTRUSTED; fi
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `sha256sum --status --strict -c <(printf "1641a09e8ae4fc494b8e44f1bc86d19cefcdc5ad74722ce058148b35a194aeb6  -\n") <macbook12-spi-driver-2905d318d1a3ee1a227052490bf20eddef2592f9.tar.UNTRUSTED || \'
make[1]: *** [Makefile:100: macbook12-spi-driver-2905d318d1a3ee1a227052490bf20eddef2592f9.tar] Error 1
rm macbook12-spi-driver-2905d318d1a3ee1a227052490bf20eddef2592f9.tar.UNTRUSTED
make[1]: Leaving directory '/home/user/qubes-builder/qubes-src/linux-kernel'
make: *** [Makefile:226: linux-kernel.get-sources-extra] Error 2

How do I fix this issue? If it’s relevant, no dispvm were started at this part of the process.

What’s the proper way to build the kernel for a bisect? Should I be using Qubes builder to get Qubes-specific patches, or can I use the source from git.kernel.org directly?

I think you’ll have to backport Disable downloading macbook12-spi-driver · QubesOS/qubes-linux-kernel@d46caa9 · GitHub. If you are using builder v1, then you’ll need to edit kernel.spec.in, removing related lines.

As for bisecting the kernel, when qubes-builder finishes downloading extra sources, you’ll have a tar file of the kernel source. That is the source code used for compiling. So my best guess is you can clone the linux kernel repo, start bisecting between 5.15.103 and 5.15.111, then pack the repo directory as a tar file to replace that source code tar file ( remember that the file name should be same, otherwise the builder will fail to recognize that file ). Then you can readily use qubes-builder to build the kernel to test.

1 Like