Bug 216277
Summary: | X11 doesn't wait for amdgpu driver to be up | ||
---|---|---|---|
Product: | Drivers | Reporter: | dark_sylinc |
Component: | Video(DRI - non Intel) | Assignee: | drivers_video-dri |
Status: | NEW --- | ||
Severity: | normal | CC: | alexdeucher |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.18.11+ | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
Xorg log when it fails
Xorg log when it succeeds |
Description
dark_sylinc
2022-07-24 14:55:50 UTC
Created attachment 301479 [details]
Xorg log when it fails
Created attachment 301480 [details]
Xorg log when it succeeds
Maybe the driver or firmware is not available in your initrd so the driver can't be loaded during boot? Thanks for the hint! The amdgpu driver (nor the firmware) are definitely NOT in /boot/initrd.img-5.18.11+ I will have to lookup how to include them into initrd. Though it may be worth mentioning neither are they included in 5.13 (my custom build) nor in Ubuntu's official kernels. I do wonder if previously was working fine by mere luck (i.e. race condition was just much harder to trigger) or if something changed that causes whatever Ubuntu does to wait on amdgpu to no longer wait Your hint is very good. It tells me upstream kernel devs expect the amdgpu driver & firmware should be in initrd; while Ubuntu does not do that. This is starting to look more and more like an Ubuntu bug. I looked further into the matter and found out that /lib/udev/rules.d/78-graphics-card.rules has entries for 1. "drm": i915, radeon, nouveau, vmwgfx 2. "graphics": amdgpu, i915, radeon, nouveau, efifb, efi-framebuffer, vesa-framebuffer I just edited the rules file to include amdgpu on both sections and see what happens. So far rebooted only once and Xorg didn't crash. I'll monitor how it goes and if the crashes stop I'll close this ticket and report it to Ubuntu. OK today it happened again so changing 78-graphics-card.rules did not fix it. I just found this: https://bbs.archlinux.org/viewtopic.php?id=260525 Which leads me to this: https://github.com/sddm/sddm/issues/1316 Apparently SDDM was having the same issue and the "fix" was to add QThread::sleep(1); Does the Kernel have an interface to know if a GPU driver will be or is being loaded and get notified when it's done? I assumed there was, but looking at those threads it appears there is not and graphical initialization is basically just YOLO? Adding amdgpu to initramfs seems to have workarounded the problem. I have not experienced this problem after it. I can also visibly see the boot process is slightly different (splash becomes 1920x1080 a bit sooner) If anyone is having the same issue, the workaround is (Ubuntu): echo "amdgpu" | sudo tee --append /etc/initramfs-tools/modules sudo update-initramfs -c -k $(uname -r) If done properly then running: lsinitramfs /boot/initrd.img-$(uname -r) | grep amdgpu Should return multiple hits Then reboot. This ticket can be closed; but probably a new one to track an interface to notify when kernel is done loading all video interfaces should be created. |