Kernel panic during installation on AMD 7840HS with 780M iGPU

Same issue with this version. Still reboots.

I’m a bit out of ideas then…

Maybe there would be some option in the bios that would help, but I can’t tell where to look.

I was thinking that maybe there is some more log that I cannot see. Can I pass some parameters to “avoid GPU stuff”? The line (XEN) Xen is reqlinquishing VGA console is not appearing anymore or maybe it appears for a millisecond with this latest version. I cannot tell what that last log line is that is flashing up shortly because then everything gets black immediately after this line appeared and a few seconds later there is a reboot.

I tried many BIOS combinations but without success. Can I somehow save the log output to a USB drive?

I have found out more. I get a kernel panic.

With this settings I can read the error.


It is a kernel panic.

Here people are talking about the same issue:
https://lore.kernel.org/lkml/652989ad8a7f110bad16cf1244c4c68a823f0afe.1693606609.git.chunkeey@gmail.com/T/

1 Like

I have written down the call stack:

<TASK>
? die+0x36/0x90
? do_trap+0xda/0x100
? amd_cpuid4+0x18f/0x270
? do_error_trap+0x6a/0x90
? amd_cpuid4+0x18/0x270
? exec_divide_error+0x38/0x50
? amd_cpuid4+0x18f/0x270
? asm_exec_divide_error+0x1a/0x20
? amd_cpuid4+0x18/0x270
cpuid4_cache_lookup_regs+0x148/0x160
populate_cache_leaves+0x159/0x1a0
? pfx_cacheinfo_cpu_online+0x10/0x10
detec_cache_attributes+0x84/0x120
cacheinfo_cpu_online+0x15/0x60
cpuhp_invoke_callback+0xf8/0x460
? __pfx_smpboot_thread_fn+0x10/0x10
cpuhp_thread_fun+0xe8/0x170
smpboot_thread_fn+0xdc/0x1x0
kthread+0xe8/0x120
? __pfx_kthread+0x10/0x10
ret_from_fork+0x2c/0x50
</TASK>

It seems it’s a bug in the linux kernel, and still not patched (the patch linked is from early september).

I successfully installed Linux Mint 21.2 and tried to run whonix in virtual box. I also get a similar error there on boot.

Thank you. Can I do something? How long do you think will it take for the patch to make its way into the kernel and finally into QubesOS? I am thinking about returning the laptop. It is very new, says Mfg Date 2023/09/18. I bought it specifically to use QubesOS.

I’m not very up-to-date on Linux kernel development pace, but I think you won’t see that in Qubes OS before a few months from now. First, the patch need to be reviewed and included in Linux code, then Qubes OS should ship latest kernel releases, the patch would make it into linux 6.7 or 6.8 I guess, so yeah, a few months seems realistic.

But it’s curious Linux Mint boots and works! So maybe there is something else, or they added some custom patch to their kernel :thinking:

1 Like

I see the problem seems to occur with AMD Ryzen7 7840HS, 7840U, 7940HS

Here the someone with the same laptop (Ideapad 5 Pro Ryzen7 7840HS) also cannot run virtualbox.

And German:

Also the virtualbox forum is full of this problem:

All of these people did not come as far as we did and still have no clue, I have at least found the mailing list. Someone should tell them on virtualbox forum about this thread. I tried but it Oracle requests too much info like telephone number and postal address which I am not willing to provide just to post in that forum.

Thank you for this info then I guess I will return it. Or can I somehow compile a kernel patch into an ISO of QubesOS. I have some coding and build system experience but never compiled a kernel. How difficult is that? Do you think I just apply the patch to some git repo and adjust some build variables to point to the patched repo directory and create a patched ISO of QubesOS? Is it along these lines or is it more complicated?

But it’s curious Linux Mint boots and works! So maybe there is something else, or they added some custom patch to their kernel :thinking:

Indeed I am also wondering about this but somehow it must have to do with virtualization, not with a custom patch because I can also run a old Ubuntu live system on this laptop.

It seems that the virtualbox manifestation of this problem often causes a freeze at the message freeing initrd memory but I guess this is just because the log level is not high enough (like for me it freezed at (XEN) Xen is relinquishing VGA console. before I increased the log level). I could only provide the above screenshot of error output from whonix startup in virtualbox by switching to rescue mode boot for whonix boot in virtualbox .

I will post a link to this thread on some forums where people are clueless about this issue.

From what I have read it seems that it is impossible to

  • Install QubesOS
  • Run Linux images in virtualbox on Windows host
  • Run Linux images in virtualbox on Linux host

on AMD CPUs 7840U, 7840HS, 7940HS (maybe whole 7040 generation?) as long as the QubesOS/Linux image kernel is not patched.

Interestingly some people are claiming the problem disappears after a BIOS update.

Unfortunately there is no new BIOS for me at the moment.

1 Like

From the mailing list there is a virtualbox command:

Are you a VirtualBox user with an Ryzen Zen 4 Mobile and
are affected by this division by 0? Well try:

vboxmanage setextradata $VM VBoxInternal/CPUM/HostCPUID/80000006/edx 0x02009140
(Where $VM is the target VM. Then just start the VM again, it just
should now run).

And indeed after running this command I can start the virtual box image that did not work before. So my question is:

Is there a similar command or configuration for xen that I can apply to override the HostCPUID/80000006/edx value to 0x02009140?

1 Like

Xen’s xl domain configuration file syntax states

cpuid=“LIBXL_STRING” or cpuid=[ “XEND_STRING”, “XEND_STRING” ]

Configure the value returned when a guest executes the CPUID instruction. Two versions of config syntax are recognized: libxl and xend.

Xend format consists of an array of one or more strings of the form “leaf:reg=bitstring,…”. e.g. (matching the libxl example above):

cpuid=["1:ecx=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0,edx=xx0xxxxxxxxxxxxxxxxxxxxxxxxxxxxx", ...]

“leaf” is an integer, either decimal or hex with a “0x” prefix. e.g. to specify something in the AMD feature leaves, use “0x80000001:ecx=…”.

So I think a xen configuration equivalent to the above
vboxmanage setextradata $VM VBoxInternal/CPUM/HostCPUID/80000006/edx 0x02009140
should look like

cpuid=["0x80000006:edx=0x02009140"]

But where do I place this? I am almost there please help me what I should do with this xen cpuid configuration string.