Hello all, sharing this in case it can help someone else and see if anyone has the same issues as I consider adding an issue to the issue tracker. I may gloss over some items but feel free to ask for clarification if it helps you and I’ll try and answer back.
When using qubes on a AMD Ryzen based laptop with a renoir APU I am unable to:
- use HDMI to connect to an external monitor
- Adjust brightness of the display (using the hot keys shows brightness widget on screen and changes, but actual brightness does not, writing manual values to /sys area for backlight control does not work either)
Then I tried to update to kernel-latest for dom0 and it pulled a 5.11.x version of the kernel. After that the machine would no longer boot properly and seemed to hang before it would get to specifying the luks password.
After testing (which I will omit specifics on unless someone wants to know), I determined that in my case it was not actually hanging on boot. When the initial boot was handing over the video from the EFI framebuffer to the next stage it just was not able to properly load the graphics, system was still running.
I was able to determine that in this case it was missing amdgpu firmware in the initramfs for the renoir apu’s.
I was able to get things to work by doing the following.
- Downloaded an updated version of linux-firmware package that contained firmware for the renoir apu (linux-firmware-20210208). I used the 20210208 version since it was the closest release version to the release date for kernel 5.11.x as shown by kernel’s git tags.
- Extracted the renoir related firmware (under amdgpu directory, files that start with renoir_ )
- Copied those files to /lib/firmware/amdgpu directory in dom0 and made sure they had same permissions as others in that directory. (This is a test machine that will be wiped so accepted the risk of moving files into dom0).
- Regenerated the initramfs image for the kernel 5.11.x version I installed (kernel-latest) using dracut.
- Replaced the initramfs for kernel 5.11.x in /boot and /boot/efi/EFI/qubes
- Made sure the machine was set to boot that 5.11.x kernel and restored the default kernel options (I had changed back to older kernel to be able to boot back into qubes and had some other setting for debugging) and then rebooted.
After that I was able to boot, got the graphical luks prompt and could log into qubes as normal. I then was able to adjust my screen brightness using the computer hotkeys and connect an external monitor with HDMI.
HP Envy x360, model 15m-eu0013dx I think, has AMD Ryzen 5 processor (5500U) with the integrated AMD graphics (renoir).
I am running just latest updated 4.0.x release of qubes (other than the changes noted above), using UEFI, and I had to remove the
mapbs options from
BOOTX64.cfg file to be able to install (to get the installer to come up).
Longer Term Fix:
I need to find some time and collect up details and open an issue with qubes, if they pull in a sufficiently new linux-firmware package (or otherwise add the renoir_* files) when they generate their version for qubes then this will work without these manual steps.
I did not do systematic testing, I just did what I needed to get my use case working, obviously you may run into other issues and there could be side effects I have not seen.
Also I did try other kernel versions manually between 5.8 and 5.11 and the older 5.8+ versions before 5.11 seemed to report a kernel bug on boot, but since 5.11 worked once I did this I have not gone back and checked if they would work still, might be two separate issues (although it could affect folks if they are trying to run the default kernel and not kernel-latest and qubes updates to one of those versions).
Some possibly related post:
In this post there is talk of support for AMD VFIO and issue seemed similar, the “Failed to start Setup virtual
console” error I had noticed as well and chased that for a bit until I realized it was not the issue.