Annoying issues with Entropy on AMD

So this isnt so much of a question but I finally figured out my issues with GDM just sometimes not starting forever on my system.

I realized that I was having https://wiki.archlinux.org/title/GDM#GDM_does_not_start_until_input_is_provided

except it would sometimes not even start when user input was provided. The system would just hang at boot waiting for GDM. I finally decided to enable Haveged which i havent had to use in years.

This got me to wondering, why has every AMD system Ive owned run into Entropy issues on linux? My Intel systems minus one time a long ways back on a Haswell system have never had issues generating Entropy at boot but consistently from Athlon64->Bulldozer and now on Ryzen I run into entropy issues on AMD?

Ive managed to somewhat solve the issue after using haveged to test and enabling random.trust_cpu=on, but its still slightly annoying.

So if you run into issues with GDM similar to mine where it only appears every couple boots try seeing if its the system not generating enough entropy. Now I havent run into the issue since over the last several days.

I don’t have any issues with my AMD but I’m on KDE. :wink:

1 Like

Youll never convert me :rofl:

but that is curious, does KDE not worry about Entropy to start the Display Manager? is this just a GDM thing?

I dont know why my AMD systems always run into Entropy issues at boot time. I know back in the wayback there was a hardware bug around athlon64 or so era but these days youd think itd be solved. Ive enabled the CPU random generator and seems to be fine but without random.trust_cpu=on it seems to be an issue for my system.

Does systemd-random-seed.service have anything to do with this issue or is that something different?

That’s Great!

Isn’t that an issue?
:exploding_head:

Click!

Just kidding!

honestly dont know, it very well could be but also seems to be due to GDM also as its even specifically on the GDM part of the wiki

1 Like

It happens that just today I switched to gdm/gnome only to give it another try. I did not notice any delays with gdm during several boot processes.

CPU: 8-Core AMD Ryzen 7 3700X
Mobo: Gigabyte model: X570 AORUS ULTRA

Not Gnome-orly! :rofl:

2 Likes
[ricklinux@eos-kde ~]$ cat /proc/sys/kernel/random/entropy_avail
3194
[ricklinux@eos-kde ~]$ 

Edit:

Machine:   Type: Desktop Mobo: Micro-Star model: MPG X570 GAMING PLUS (MS-7C37) v: 2.0 serial: <superuser required> 
           UEFI: American Megatrends LLC. v: A.E0 date: 06/22/2021 
CPU:       Info: 8-Core model: AMD Ryzen 7 3800X bits: 64 type: MT MCP cache: L2: 4 MiB 
           Speed: 3601 MHz min/max: 2200/3900 MHz Core speeds (MHz): 1: 3601 2: 2053 3: 2058 4: 2057 5: 2199 6: 2199 7: 2199 
           8: 2193 9: 2054 10: 2057 11: 2201 12: 2199 13: 2206 14: 2200 15: 3591 16: 2047 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] driver: amdgpu 
           v: kernel 
           Display: x11 server: X.Org 1.20.13 driver: loaded: amdgpu,ati unloaded: fbdev,modesetting,vesa 
           resolution: 1680x1050~60Hz 
           OpenGL: renderer: Radeon RX 590 Series (POLARIS10 DRM 3.42.0 5.14.5-arch1-1 LLVM 12.0.1) v: 4.6 Mesa 21.2.1 

I haven’t had any issues either on

Machine:   Type: Laptop System: LENOVO product: 82A2 v: Yoga Slim 7 14ARE05 serial: <filter> 
           Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN serial: <filter> UEFI: LENOVO 
           v: DMCN38WW date: 01/18/2020 
CPU:       Info: 8-Core model: AMD Ryzen 7 4800U with Radeon Graphics bits: 64 type: MT MCP 
           cache: L2: 4 MiB 
           Speed: 1397 MHz min/max: 1400/1800 MHz Core speeds (MHz): 1: 1397 2: 1397 3: 1397 
           4: 1397 5: 1397 6: 1397 7: 1396 8: 1398 9: 1397 10: 1397 11: 1397 12: 1395 13: 1392 
           14: 1396 15: 1397 16: 1397 
Graphics:  Device-1: AMD Renoir driver: amdgpu v: kernel 
           Device-2: Chicony Integrated Camera type: USB driver: uvcvideo 
           Display: wayland server: X.org 1.20.13 driver: loaded: amdgpu,ati 
           unloaded: fbdev,modesetting,vesa resolution: <missing: xdpyinfo> 
           Message: Unable to show advanced data. Required tool glxinfo missing.

The output of journalctl --unit systemd-random-seed for the last couple of boots:

-- Boot 2b1be611f5d7497887248362b56ecd22 --
Sep 15 07:20:39 enos-gnome systemd[1]: Starting Load/Save Random Seed...
Sep 15 07:20:39 enos-gnome systemd[1]: Finished Load/Save Random Seed.
Sep 16 00:31:09 enos-gnome systemd[1]: Stopping Load/Save Random Seed...
Sep 16 00:31:09 enos-gnome systemd[1]: systemd-random-seed.service: Deactivated successfully.
Sep 16 00:31:09 enos-gnome systemd[1]: Stopped Load/Save Random Seed.
-- Boot ef506ede3f51427ab5c68b500ec1cdcb --
Sep 16 06:37:20 enos-gnome systemd[1]: Starting Load/Save Random Seed...
Sep 16 06:37:20 enos-gnome systemd[1]: Finished Load/Save Random Seed.
-- Boot f70e4164c16b4813bb2a9df9c181fa46 --
Sep 16 19:54:38 enos-gnome systemd[1]: Starting Load/Save Random Seed...
Sep 16 19:54:38 enos-gnome systemd[1]: Finished Load/Save Random Seed.

Unfortunately this doesnt show too much, once Im able to get the system booted previously i had no problems with Entropy. The issue was that frequently and at no particular time it would refuse to start GDM until rebooted several times.

Now that Ive enabled CPU rand its fine but it wasnt previously and now i boot consistently without issue.

1 Like

My systemd journal doesnt show anything of note related to GDM besides an issue with gsd-color and account services.

gsd-color just complains about LUTs but thats to be expected as Gnome Shell doesnt do perceptual LUT transformations nor does it apply them to the GDM login afaik and it even complained today which didnt cause any issues.

The only other GDM related one is
Gdm: Failed to contact accountsservice: Error calling StartServiceByName for org.freedesktop.Accounts: Refusing activation, D-Bus is shutting down

which also happened today, the only clue i have is that tinkering with CPU rand adn haveged fixed the issue :expressionless:

It maybe could be something else but i have 17 days of entries to go through atm to even guess.

1 Like

Im not saying all AMD systems have this, just that every time Ive used an AMD system ive run into this yet not one of my intel systems ever has minus my old haswell system once due to some bug or something YEARS ago :thinking:

Not sure what the entropy threshold is in GDM. Never had any issues so far on an AMD notebook though.

Just move the mouse around a little bit :man_shrugging:

Ive fixed it now and havent had a bad boot in days. I previously had been dealing with it since I got my Ryzen system and couldnt figure it out as i didnt even think it would help as systemd didnt tell me anything was wrong. Even moving the mouse wouldnt worked some boots, it was very frustrating.

Again not saying every single person is going to have some issue like this, just that Ive run into it in some for on every AMD system ive owned since Athlon 64 3400+ → FX 8120 then when i swapped to Intel for a while nothing. Now i own AMD and Intel systems and the intel ones never an issue but of course my awesome desktop being AMD finds its way back to it :upside_down_face:

Im just tossing this out here if someone encounters a similar issue and doesn think to try this like i did for a long while.

1 Like