Radeon GPU prevent autologin + blackscreen at boot

Hello,

Ubuntu Mate 24.04 in Legacy bios mode, with Radeon GPU, dualboot Windows.

System:
  Kernel: 6.8.0-41-generic arch: x86_64 bits: 64 compiler: gcc v: 13.2.0
  Desktop: MATE v: 1.26.2 Distro: MATE 24.04.1 LTS (Noble Numbat)
    base: Ubuntu
Graphics:
  Device-1: AMD Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT]
    vendor: Gigabyte driver: amdgpu v: kernel arch: RDNA-1 bus-ID: 03:00.0
  Display: x11 server: X.Org v: 21.1.11 driver: X: loaded: amdgpu
    unloaded: fbdev,modesetting,radeon,vesa dri: radeonsi gpu: amdgpu
    resolution: 1: 1920x1080~60Hz 2: N/A
  API: EGL v: 1.5 drivers: radeonsi,swrast platforms:
    active: x11,surfaceless,device inactive: gbm,wayland
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.0.9-0ubuntu0.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon RX 5600 XT (radeonsi
    navi10 LLVM 17.0.6 DRM 3.57 6.8.0-41-generic)

With GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" in Grub, Ubuntu doesn't boot and got black screen.
With GRUB_CMDLINE_LINUX_DEFAULT="quiet" in Grub, Ubuntu boot but autologin doesn't work:

$ cat /etc/X11/default-display-manager
/usr/sbin/lightdm
$ cat /etc/lightdm/lightdm.conf
[Seat:*]
autologin-guest=false
autologin-user=philippe
autologin-user-timeout=0

With GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset" in Grub, Ubuntu boot AND autologin works.

Can you help me to allow autologin without use of nomodeset please? Because I'm a gamer and performance ingame are very lower with nomodeset + my scripts with xrandr doesn't work.

DMESG logs with autologin doesn't work:

DMESG logs with autologin works:

um24 VM, username is user
autologin works, not prompted for pw

user@um24:~$ cat /etc/lightdm/lightdm.conf
[Seat:*]
autologin-guest=false
autologin-user=user
autologin-user-timeout=0
[Seat:seat*]
greeter-setup-script=xhost +LOCAL:
#greeter-session=lightdm-gtk-greeter
1 Like

not on mine, so what is the issue?

In Control Panel > MATE User Manager, I don't have the automatic logon enabled, see screenshot.

I edited my first post because root cause found.

Hi, @Philippe :slight_smile:

You wrote:

May I ask if you have also tried, in that same /etc/default/grub file, to have GRUB_CMDLINE_LINUX_DEFAULT with NO options inside ? I mean, like the following:

GRUB_CMDLINE_LINUX_DEFAULT=""

(naturally, please run sudo update-grub after doing that change and then reboot).

I ask that because that's my preferred option and it seems to have helped other people, here in the "Ubuntu MATE Community", in different contexts. See, for instance, the following replies of mine in different topics:

I hope this helps :slight_smile: Please, keep us posted!

1 Like

@ricmarques thanks to take a look.
With GRUB_CMDLINE_LINUX_DEFAULT="" in Grub, Ubuntu boot but autologin doesn't work, same effect with just quiet. My priority is to have autologin works. I think the root cause concern kernel with radeon gpu. I continue to further investigate.

1 Like

In my further investigation, I found a strange behavior.
It's a dual boot with Windows, without splash in Grub.
If Ubuntu boot after a shutdown, or reboot from Ubuntu, autologin doesn't work.
Yet, if Ubuntu boot from a reboot from Windows, then autologin works fine.
What the hell is happening?
I want to startup Ubuntu with autologin works. Any idea how?
What logs to track to compare this behavior?

I am not sure, but it would seem to me that what you get from a Windows reboot is a "fresh boot", whereas a Ubuntu reboot may "cut corners".

If that is the case, don't know if adding the following to your grub file would help:

GRUB_GFXPAYLOAD_LINUX="keep"

Also, instead of using the GUI "Swith-off" + "Reboot" sequence, does it behave differently if you enter the command:

reboot --force

Tested several combinations with your suggests. With and without keep, reboot forced, reboot and standard reboot. Same effect. Autologin only works after reboot from Windows. I got dmesg logs in both situation, I'll analyse then I share here.

1 Like

Here is comparison of dmesg logs, between autologin works (after reboot from windows) with autologin doesn't work (reboot from ubuntu). Hard to conclude.
Got with:
$ diff '/home/philippe/autologin_ok_trim.log' '/home/philippe/autologin_nok_trim.log' > diff0trim.log

You state that the report was for

diff '/home/philippe/autologin_ok_trim.log' '/home/philippe/autologin_nok_trim.log' > diff0trim.log

But should that be

diff '/home/philippe/autologin_nok_trim.log' '/home/philippe/autologin_ok_trim.log' > diff0trim.log

I ask ... because I see no failure messages in the "nok" file, but I see them in the "ok" file.

For me, the key lines are these (line numbers added):

244 < systemd[1]: Starting console-setup.service - Set console font and keymap...

246 < systemd[1]: Starting plymouth-read-write.service - Tell Plymouth To Write Out Runtime Data...

249 < systemd[1]: Finished console-setup.service - Set console font and keymap.

251 < systemd[1]: Finished plymouth-read-write.service - Tell Plymouth To Write Out Runtime Data.


265 < systemd[1]: plymouth-start.service - Show Plymouth Boot Screen was skipped because of an unmet condition check                  (ConditionKernelCommandLine=splash).
266 < systemd[1]: Started systemd-ask-password-console.path - Dispatch Password Requests to Console Directory Watch.
267 < systemd[1]: systemd-ask-password-plymouth.path - Forward Password Requests to Plymouth Directory Watch was skipped because      of an unmet condition check (ConditionPathExists=/run/plymouth/pid).


302 < systemd[1]: plymouth-start.service - Show Plymouth Boot Screen was skipped because of an unmet condition check                  (ConditionKernelCommandLine=splash).
303 < systemd[1]: systemd-ask-password-plymouth.path - Forward Password Requests to Plymouth Directory Watch was skipped because      of an unmet condition check (ConditionPathExists=/run/plymouth/pid).


370 < systemd[1]: plymouth-start.service - Show Plymouth Boot Screen was skipped because of an unmet condition check                  (ConditionKernelCommandLine=splash).
371 < systemd[1]: systemd-ask-password-plymouth.path - Forward Password Requests to Plymouth Directory Watch was skipped because      of an unmet condition check (ConditionPathExists=/run/plymouth/pid).

If the diff report is from the modified command I proposed, then

Line 265 identifies a condition not met. That is re-attempted twice and fails for both re-attempts. What is causing that is beyond my personal experience to explain. You will need the advice from someone with more expertise.

If the diff report is from your originally stated command, I have no clue what is happening, because there is nothing being reported in that log, suggesting that Plymouth may not even be attempted, since there is no trace.

If you again offered a report of the dmesg log for both scenarios, or a diff file again, maybe it would show more. My take is dmesg covers much more of the boot-time actions, and may offer more insights as to what is broken. Just a thought.

Sorry I can't be of more help. :frowning:

I added in first post dmesg logs with autologin OK and not OK.

I'm sorry, but I don't see that. The file is gone from "Pastebin", if that is where you added that. :frowning:

yep, now it works, try again

Sorry Philippe, but I think you need to update the URL for Pastebin:

pastebin_Error

Hi, @ericmarceau and @Philippe :slight_smile:

I think the Pastebin ("PrivateBin") "confusion" in this topic is related to the fact that @Philippe has put "PrivateBin" links in two different messages / posts in this topic:

1 - @Philippe wrote his original post - "Radeon GPU prevent autologin + blackscreen at boot" - in this topic, on 6h September 2024, without any "PrivateBin" links. Two days ago (on 26th September 2024) he edited that same post to add two PrivateBin links. Both links are working now (I'm writing this reply on 28th September 2024), although both have a warning saying that "This document will expire in 27 days.":

"DMESG logs with autologin doesn't work:"
https://privatebin.net/?3603dd2d122017f4#5XDUxMYZykLDNHdWWNFwC1J9xcQA13gcTFdzimEyaz5H

"DMESG logs with autologin works:"
https://privatebin.net/?81b5ce525d6c1915#CwbmivZLC7XRzkHUJUbpVMouVwXHYFJWDJXVyDLbPK8G

2 - Then, in another reply from @Philippe in this topic - "Radeon GPU prevent autologin + blackscreen at boot - #13 by Philippe" - that he posted 8 days ago (on 20th September 2024), @Philippe has included another "PrivateBin" link and that one is indeed NOT working (shows the error message "Could not get paste data: Paste does not exist, has expired or has been deleted."). For clarity, I'm referring to the following "PrivateBin" link:

"Here is comparison of dmesg logs, between autologin works (after reboot from windows) with autologin doesn't work (reboot from ubuntu). Hard to conclude.
Got with:
$ diff '/home/philippe/autologin_ok_trim.log' '/home/philippe/autologin_nok_trim.log' > diff0trim.log

https://privatebin.net/?3c7262967647a499#HvVLJ7kysD8kaYXbTQNA4sdDVB5dBbHRq78iyUybxzWy

I hope this post of mine helps to clear up the confusion :slight_smile:

2 Likes

Well spotted ric! The diff log has been removed. Here is the diff log, got with:

diff '/home/philippe/autologin_ok.log' '/home/philippe/autologin_nok.log' > diff.log
2 Likes

For further investigate, I cloned my system on another SSD drive. Same grub, same OS, same pc, and surprise, autologin works fine. The only difference is the drive. My main setup is on nvme, slot 1 and the other is on SSD by USB. I don't give up I want the autologin. I'll continue to do test.

2 Likes

This is very interesting. I have no real idea what is causing this problem, but based upon the facts you have provided so far, I can make a wild-donkey guess (my avatar image is a donkey! :grin:).

To recap, I believe you said:

  • If you boot up with the splash boot option, the system hangs at a black screen.
  • If you boot up without the splash boot option, the system boots, but autologin still doesn't work -- I'm guessing the system hangs with a black screen when autologin is about to begin?
  • If you boot up with the nomodeset boot option, the system boots and autologin works -- but games run very slow (probably using the swrast / llvmpipe software rendering graphics driver instead of the radeonsi driver, which uses the GPU's computing capabilities).
  • If you first boot into Windows, then reboot into Ubuntu MATE, everything works, even autologin, even with modesetting enabled (as it is by default).
  • If you boot from a USB-/SATA-connected SSD instead of your normal NVMe-attached SSD, everything works even without first booting into Windows.

Now here's my suspicion: I suspect this is a problem involving the PCI Express bus(es) to which both your graphics card and your SSD are connected. After all, NVMe is Non-Volatile Memory Express -- PCI Express. You probably have a multi-core CPU, and when you have modesetting enabled and your NVMe SSD, the drivers for the two devices probably load at the same time. I'll bet that when you load Ubuntu MATE with modesetting enabled, Linux tries to load some "firmware" used to drive the GPU, at the same time that it's trying to communicate with the SSD to load the rest of the operating system -- they probably step on each other's toes, the firmware doesn't get loaded into the GPU, and the graphics therefore doesn't work.

But if you load Windows first, then reboot, Windows probably loads the firmware into the GPU; then when you reboot into Linux, the firmware has already been loaded into the GPU, so Linux can concentrate on communicating with the SSD and no conflicts occur on the PCI Express bus.

And if you boot from the SSD attached via USB: While the USB controller in your system is most likely attached via PCI Express, it's probably integrated on your system's chipset and thus uses a separate, internal PCI Express bus, instead of the external PCI Express slots that your graphics card and NVMe SSD use. There's no conflict if the SSD and GPU use different busses.

So, what to do? I sadly don't know. I kid you not, my hardware is so old and lame that I don't have to worry about weird conflicts like this. But whatever the specific solution is, it sounds to me like you need to find some way to ensure that the driver for your NVMe loads after the driver for your GPU has loaded completely and has loaded the firmware, too. Whatever the answer is, you probably need to research boot parameters understood by your initrd or initramfs.


Also, is it possible for you to boot up in UEFI mode instead of legacy BIOS mode? Because my general experience with legacy BIOS mode is Linux will boot with the graphics initially in VGA mode, which does not use the GPU hardware at all (it uses fallback hardware with no fancy GPU computing capabilities) -- then Linux switches into full-resolution mode, using the GPU hardware (which requires the firmware to be loaded). Whereas, every UEFI I've seen initializes the GPU in full-resolution mode from the very start, giving Linux a bit of a head start (so it never needs to begin in VGA mode and then initialize the GPU totally afresh). I'll bet modesetting will work with your NVMe SSD on Linux if you enable UEFI boot.

3 Likes