View previous topic :: View next topic |
Author |
Message |
MadWhiteCat n00b


Joined: 09 Mar 2025 Posts: 5
|
Posted: Sun Mar 09, 2025 8:52 pm Post subject: Enabling KVM for AMD leads to boot hang |
|
|
Hello everyone,
I've been following Gentoo QEMU setup instructions.
I enabled "Virtualization -> KVM for AMD processors support" kernel option (I have Ryzen 7 9800X3D), as well as virtualization support (SVM Mode) in BIOS.
After building kernel and rebooting, the system hangs indefinitely at either "Setting system clock using the hardware clock" or "Activating swap devices" - seemingly random on each reboot.
What made no difference:
- Setting "KVM for AMD processors support" as built-in or module
- Enabling other kernel options suggested in the QEMU guide (Intel module and "Useful kernel configuration options")
I also checked that I have IOMMU enabled in BIOS and valid IOMMU groups according to this Arch Wiki guide.
Tried seeing if anything useful appears in /var/log/rc.log (I enabled logging in /etc/rc.conf), but it seems that writing starts after these failure points. The log file wasn't updated on unsuccessful boots - I checked its contents from my Windows installation after a failed Gentoo boot.
What can I do to debug this further? Has anyone seen a similar problem before?
Last edited by MadWhiteCat on Mon Mar 10, 2025 2:55 pm; edited 2 times in total |
|
Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 6239 Location: Dallas area
|
Posted: Sun Mar 09, 2025 9:06 pm Post subject: |
|
|
Did you set IOMMU_DEFAULT_PASSTHROUGH _________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
 |
MadWhiteCat n00b


Joined: 09 Mar 2025 Posts: 5
|
Posted: Sun Mar 09, 2025 9:39 pm Post subject: |
|
|
Tried this now, rebuilt kernel - still got stuck at "Activating swap devices". |
|
Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 6239 Location: Dallas area
|
Posted: Sun Mar 09, 2025 9:48 pm Post subject: |
|
|
sounds like not all of the kvm stuff is set or set right.
Best to have kvm as a separate module, but kvm_amd needs to also be set the same way (both modules or both built in)
wgetpaste your .config file and maybe something will show there. _________________ UM780, 6.12 zen kernel, gcc 13, openrc, wayland |
|
Back to top |
|
 |
MadWhiteCat n00b


Joined: 09 Mar 2025 Posts: 5
|
Posted: Sun Mar 09, 2025 10:39 pm Post subject: |
|
|
Tried building everything as module, no difference.
Here's my .config - https://0x0.st/8SsR.txt |
|
Back to top |
|
 |
pietinger Moderator

Joined: 17 Oct 2006 Posts: 5482 Location: Bavaria
|
Posted: Mon Mar 10, 2025 11:28 am Post subject: |
|
|
MadWhiteCat,
first of all: Welcome to Gentoo Forums!
You miss two very important settings - please enable both:
Code: | # CONFIG_X86_AMD_PLATFORM_DEVICE is not set
# CONFIG_IRQ_REMAP is not set |
These settings should not be related to your problem but I mention it, because I have seen them:
Code: | 1.
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
2.
CONFIG_BLK_DEBUG_FS=y
3.
# CONFIG_LRU_GEN is not set
4.
CONFIG_EXTRA_FIRMWARE=""
5.
CONFIG_SYSFB_SIMPLEFB=y
6.
CONFIG_I2C_I801=y
# CONFIG_PINCTRL is not set |
1. see: https://wiki.gentoo.org/wiki/User:Pietinger/Experimental/Manual_Configuring_Current_Kernel#Default_CPUFreq_governor
2. disable it
3. enable it for better performance (see also in linked article from above)
4. If you use an initramfs then it is okay if this is empty
5. Should not be necessary (and makes more problems than it helps; you have FB_EFI and FB_VESA enabled)
6. You have an AMD machine; so you will need another i2c-module (I801 is for Intel machines) ... but ... i2c needs PINCTRL; without it i2c will not work ... if you dont have any i2c devices (or sensors) you can disable all. _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
 |
MadWhiteCat n00b


Joined: 09 Mar 2025 Posts: 5
|
Posted: Mon Mar 10, 2025 1:38 pm Post subject: |
|
|
pietinger, thanks a lot! Enabling those two options was the solution.
I will also check out the rest of the guides you linked for improved kernel settings. |
|
Back to top |
|
 |
pietinger Moderator

Joined: 17 Oct 2006 Posts: 5482 Location: Bavaria
|
|
Back to top |
|
 |
MadWhiteCat n00b


Joined: 09 Mar 2025 Posts: 5
|
Posted: Mon Mar 10, 2025 2:57 pm Post subject: |
|
|
Update: Sorry for the confusion, it turns out I was loading the old kernel (grub-mkconfig replaced first entry which had new kernel with old one)... The boot hang is still there when I load my latest build. |
|
Back to top |
|
 |
pietinger Moderator

Joined: 17 Oct 2006 Posts: 5482 Location: Bavaria
|
Posted: Mon Mar 10, 2025 3:07 pm Post subject: |
|
|
MadWhiteCat wrote: | [...] The boot hang is still there when I load my latest build. |
Please describe exactly where it hangs (and what has already been started before) ... perhaps with a photo.
We would need also the content of /boot/grub/grub.cfg _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
 |
|