Kernel 5.x Laptop can't wake up from sleep

Hello,
I'm new to the Forum and I registered cause I've been trying to solve this problem for a while now but the only working solution up until now has been to use the Kernel 4.9.

More specifically:
When using the latest Manjaro stable build on a fresh install:

  • XFCE can't boot (black screen before login screen) and in nomodeset says that LightDM crashes (whatever I don't use XFCE it was just a test)
  • KDE (my main DE) works fine with some slowdowns UNTIL I suspend the system, by either closing the lid or via systemctl suspend, from which it cannot wake up or sometimes manages to (???) but it seems to be janky and keeps restarting "desktop effects" (I assume the compositor)
  • Gnome almost the same as KDE only that I haven't tested it other than once in Live just closing the lid and reopening, after which it gave a black screen

To try and see what was happening I ssh'd into my laptop and ran a journalctl -f while suspending it using systemctl suspend and this is what I got:

dic 24 21:32:13 wolfen ksmserver[1369]: lock called
dic 24 21:32:13 wolfen kdeinit5[1319]: bluedevil: About to suspend
dic 24 21:32:13 wolfen NetworkManager[581]: <info>  [1577219533.3866] manager: sleep: sleep requested (sleeping: no  enabled: yes)
dic 24 21:32:13 wolfen NetworkManager[581]: <info>  [1577219533.3867] device (p2p-dev-wlp1s0): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
dic 24 21:32:13 wolfen NetworkManager[581]: <info>  [1577219533.3872] manager: NetworkManager state is now ASLEEP
dic 24 21:32:13 wolfen polkitd[573]: Unregistered Authentication Agent for unix-process:2575:14108 (system bus name :1.196, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
dic 24 21:32:13 wolfen ksmserver[1369]: Lock window Id:  25165831
dic 24 21:32:13 wolfen org_kde_powerdevil[1440]: powerdevil: Pausing all media players before sleep
dic 24 21:32:13 wolfen ksmserver[1369]: CreateNotify: 25165831
dic 24 21:32:13 wolfen ksmserver[1369]: CreateNotify: 25165833
dic 24 21:32:13 wolfen ksmserver[1369]: CreateNotify: 71303172
dic 24 21:32:13 wolfen kscreenlocker_greet[2581]: Qt: Session management error: networkIdsList argument is NULL
dic 24 21:32:13 wolfen ksmserver[1369]: CreateNotify: 71303176
dic 24 21:32:13 wolfen ksmserver[1369]: CreateNotify: 71303188
dic 24 21:32:13 wolfen ksmserver[1369]: CreateNotify: 71303197
dic 24 21:32:13 wolfen kscreenlocker_greet[2581]: kf5.kpackage: No metadata file in the package, expected it at: "/home/stackwolfed/Pictures/"
dic 24 21:32:13 wolfen kscreenlocker_greet[2581]: kf5.kpackage: No metadata file in the package, expected it at: "/home/stackwolfed/Pictures/"
dic 24 21:32:13 wolfen kscreenlocker_greet[2581]: kf5.kpackage: No metadata file in the package, expected it at: "/home/stackwolfed/Pictures/"
dic 24 21:32:13 wolfen kscreenlocker_greet[2581]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:76:9: Unable to assign [undefined] to QStringList
dic 24 21:32:13 wolfen kscreenlocker_greet[2581]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:75:9: Unable to assign [undefined] to int
dic 24 21:32:13 wolfen ksmserver[1369]: CreateNotify: 71303199
dic 24 21:32:13 wolfen ksmserver[1369]: CreateNotify: 71303201
dic 24 21:32:13 wolfen ksmserver[1369]: MapNotify: 71303199
dic 24 21:32:13 wolfen ksmserver[1369]: CreateNotify: 39847757
dic 24 21:32:13 wolfen ksmserver[1369]: CreateNotify: 71303203
dic 24 21:32:13 wolfen ksmserver[1369]: MapNotify: 25165831
dic 24 21:32:13 wolfen systemd[1]: Starting TLP suspend/resume...
dic 24 21:32:14 wolfen kscreenlocker_greet[2581]: UdevQt: unable to create udev monitor connection
dic 24 21:32:14 wolfen ksmserver[1369]: CreateNotify: 71303214
dic 24 21:32:14 wolfen kscreenlocker_greet[2581]: Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
dic 24 21:32:14 wolfen kscreenlocker_greet[2581]: file:///usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/components/SessionManagementScreen.qml:64:5: Unable to assign [undefined] to int
dic 24 21:32:14 wolfen kscreenlocker_greet[2581]: file:///usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/components/ActionButton.qml:33:5: Unable to assign [undefined] to int

I should add that:

  • Logs and everything posted here is from the Kernel 5.4.2
  • Kernel 4.9 works flawlessly
  • My inxi:
System:    Host: wolfen Kernel: 5.4.2-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.4-x86_64 root=UUID=37f6d5af-0c38-4f4b-8288-017ad95bb623 rw quiet apparmor=1
           security=apparmor udev.log_priority=3
           Console: tty 3 dm: SDDM Distro: Manjaro Linux
Machine:   Type: Laptop System: HUAWEI product: KPL-W0X v: M1D serial: <filter>
           Mobo: HUAWEI model: KPL-W0X v: M1D serial: <filter> UEFI: HUAWEI v: 1.22 date: 02/26/2019
Battery:   ID-1: BAT1 charge: 43.3 Wh condition: 55.0/56.3 Wh (98%) volts: 8.6/7.6 model: DYNAPACK HB4593R1ECW type: Li-ion
           serial: <filter> status: Charging cycles: 81
CPU:       Topology: Quad Core model: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx bits: 64 type: MT MCP arch: Zen
           family: 17 (23) model-id: 11 (17) stepping: N/A microcode: 8101007 L2 cache: 2048 KiB
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 31949
           Speed: 1370 MHz min/max: 1600/2000 MHz boost: enabled Core speeds (MHz): 1: 1369 2: 1378 3: 1369 4: 1368 5: 1468
           6: 1602 7: 1368 8: 1369
           Vulnerabilities: Type: itlb_multihit status: Not affected
           Type: l1tf status: Not affected
           Type: mds status: Not affected
           Type: meltdown status: Not affected
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
           Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: disabled, RSB filling
           Type: tsx_async_abort status: Not affected
Graphics:  Device-1: AMD Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] vendor: Huawei driver: amdgpu v: kernel
           bus ID: 02:00.0 chip ID: 1002:15dd
           Display: server: X.org 1.20.6 driver: amdgpu FAILED: ati unloaded: modesetting alternate: fbdev,vesa
           compositor: kwin_x11 tty: 212x50
           Message: Advanced graphics data unavailable in console. Try -G --display
Audio:     Device-1: Advanced Micro Devices [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio vendor: Huawei
           driver: snd_hda_intel v: kernel bus ID: 02:00.1 chip ID: 1002:15de
           Device-2: Advanced Micro Devices [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor vendor: Huawei driver: N/A
           bus ID: 02:00.5 chip ID: 1022:15e2
           Device-3: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: Huawei driver: snd_hda_intel v: kernel
           bus ID: 02:00.6 chip ID: 1022:15e3
           Sound Server: ALSA v: k5.4.2-1-MANJARO
Network:   Device-1: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel bus ID: 01:00.0 chip ID: 8086:24fd
           IF: wlp1s0 state: up mac: <filter>
           IF-ID-1: docker0 state: down mac: <filter>
Drives:    Local Storage: total: 238.47 GiB used: 31.15 GiB (13.1%)
           ID-1: /dev/sda vendor: SanDisk model: SD9SN8W256G1027 size: 238.47 GiB block size: physical: 512 B logical: 512 B
           speed: 6.0 Gb/s serial: <filter> rev: 2027 scheme: GPT
Partition: ID-1: / raw size: 125.20 GiB size: 122.74 GiB (98.03%) used: 31.11 GiB (25.3%) fs: ext4 dev: /dev/sda7
Sensors:   System Temperatures: cpu: 41.5 C mobo: N/A gpu: amdgpu temp: 41 C
           Fan Speeds (RPM): N/A
Info:      Processes: 248 Uptime: 2m Memory: 6.76 GiB used: 872.8 MiB (12.6%) Init: systemd v: 242 Compilers: gcc: 9.2.0
           Shell: zsh v: 5.7.1 running in: tty 3 (SSH) inxi: 3.0.37

Also thanks for the great community and OS that Manjaro has :wink:

Edit: Every time I mention 4.9 I meant 4.19, my bad lol

Which is a solution, not a workaround, we are not Arch! :stuck_out_tongue_winking_eye:

Since you think it's a kernel issue, I suggest you post/contribute upstream Plasma and/or kernel org.
Have you tried kernel 4.19?

If the issue is caused by the compositor, you may use a systemd service to handle it on sleep, as several KDE users had to do. This is a workaround :wink:
Try this

1 Like

Hi and thanks for the response, I just tried this and no luck. systemctl suspend > wake it up aaaaand... stuck on a black screen

My bad, I kept writing 4.9 but I meant 4.19. and yes that version of the Kernel works perfectly. I'm just bothered from the 5.4 version being flagged as LTS but somehow its broken lol

For the note, ctrl + alt + F2 or other ttys dont work during that black screen time.
Also I updated my bios to the latest version

The restart service ? And you are sure you have no error?
Then do the rest (post upstream... etc) and wait on 4.19. :wink:

5.4 hasn't been around for long, even an LTS has to start somewhere. I don't know about XFCE but in KDE switching from opengl to xrender might help. I spoke to somebody else having the suspend issue a couple of weeks ago and that fixed the problem.

Of course there's nothing wrong with using 4.19 while 5.4 matures, if it aint broke don't fix it.

1 Like

Can't check on resume (since I can't do anything) but this is a journalctl -f before it:

dic 24 22:54:29 wolfen NetworkManager[661]: <info>  [1577224469.3142] manager: sleep: sleep requested (sleeping: no  enabled: yes)
dic 24 22:54:29 wolfen kdeinit5[1275]: bluedevil: About to suspend
dic 24 22:54:29 wolfen NetworkManager[661]: <info>  [1577224469.3143] device (p2p-dev-wlp1s0): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
dic 24 22:54:29 wolfen ksmserver[1329]: lock called
dic 24 22:54:29 wolfen NetworkManager[661]: <info>  [1577224469.3148] manager: NetworkManager state is now ASLEEP
dic 24 22:54:29 wolfen polkitd[652]: Unregistered Authentication Agent for unix-process:2522:8100 (system bus name :1.211, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
dic 24 22:54:29 wolfen ksmserver[1329]: Lock window Id:  25165831
dic 24 22:54:29 wolfen ksmserver[1329]: CreateNotify: 25165831
dic 24 22:54:29 wolfen org_kde_powerdevil[1392]: powerdevil: Pausing all media players before sleep
dic 24 22:54:29 wolfen ksmserver[1329]: CreateNotify: 25165833
dic 24 22:54:29 wolfen ksmserver[1329]: CreateNotify: 73400324
dic 24 22:54:29 wolfen kscreenlocker_greet[2528]: Qt: Session management error: networkIdsList argument is NULL
dic 24 22:54:29 wolfen ksmserver[1329]: CreateNotify: 73400328
dic 24 22:54:29 wolfen ksmserver[1329]: CreateNotify: 73400340
dic 24 22:54:29 wolfen ksmserver[1329]: CreateNotify: 73400349
dic 24 22:54:29 wolfen kscreenlocker_greet[2528]: kf5.kpackage: No metadata file in the package, expected it at: "/home/stackwolfed/Pictures/"
dic 24 22:54:29 wolfen kscreenlocker_greet[2528]: kf5.kpackage: No metadata file in the package, expected it at: "/home/stackwolfed/Pictures/"
dic 24 22:54:29 wolfen kscreenlocker_greet[2528]: kf5.kpackage: No metadata file in the package, expected it at: "/home/stackwolfed/Pictures/"
dic 24 22:54:29 wolfen kscreenlocker_greet[2528]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:76:9: Unable to assign [undefined] to QStringList
dic 24 22:54:29 wolfen kscreenlocker_greet[2528]: file:///usr/share/plasma/wallpapers/org.kde.image/contents/ui/main.qml:75:9: Unable to assign [undefined] to int
dic 24 22:54:29 wolfen ksmserver[1329]: CreateNotify: 73400351
dic 24 22:54:29 wolfen ksmserver[1329]: CreateNotify: 73400353
dic 24 22:54:29 wolfen ksmserver[1329]: MapNotify: 73400351
dic 24 22:54:29 wolfen ksmserver[1329]: CreateNotify: 73400355
dic 24 22:54:29 wolfen ksmserver[1329]: MapNotify: 25165831
dic 24 22:54:29 wolfen systemd[1]: Created slice system-kwin\x2drestart.slice.
dic 24 22:54:29 wolfen systemd[1]: Starting Kwin Suspend/Resume Service...
dic 24 22:54:29 wolfen systemd[1]: Starting TLP suspend/resume...
dic 24 22:54:29 wolfen audit[2599]: USER_ACCT pid=2599 uid=1000 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="stackwolfed" exe="/usr/bin/sudo" hostname=? addr=? terminal=? res=success'
dic 24 22:54:29 wolfen sudo[2599]: stackwolfed : TTY=unknown ; PWD=/ ; USER=stackwolfed ; ENV=DISPLAY=:0 ; COMMAND=/usr/bin/zsh -c qdbus org.kde.KWin /Compositor suspend
dic 24 22:54:29 wolfen audit[2599]: CRED_REFR pid=2599 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:setcred grantors=pam_unix,pam_permit,pam_env acct="stackwolfed" exe="/usr/bin/sudo" hostname=? addr=? terminal=? res=success'
dic 24 22:54:29 wolfen kernel: audit: type=1101 audit(1577224469.791:130): pid=2599 uid=1000 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="stackwolfed" exe="/usr/bin/sudo" hostname=? addr=? terminal=? res=success'
dic 24 22:54:29 wolfen kernel: audit: type=1110 audit(1577224469.791:131): pid=2599 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:setcred grantors=pam_unix,pam_permit,pam_env acct="stackwolfed" exe="/usr/bin/sudo" hostname=? addr=? terminal=? res=success'
dic 24 22:54:29 wolfen sudo[2599]: pam_unix(sudo:session): session opened for user stackwolfed by (uid=0)
dic 24 22:54:29 wolfen audit[2599]: USER_START pid=2599 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="stackwolfed" exe="/usr/bin/sudo" hostname=? addr=? terminal=? res=success'
dic 24 22:54:29 wolfen kernel: audit: type=1105 audit(1577224469.798:132): pid=2599 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="stackwolfed" exe="/usr/bin/sudo" hostname=? addr=? terminal=? res=success'
dic 24 22:54:29 wolfen bash[2599]: Could not connect to D-Bus server: org.freedesktop.DBus.Error.NotSupported: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
dic 24 22:54:29 wolfen sudo[2599]: pam_unix(sudo:session): session closed for user stackwolfed
dic 24 22:54:29 wolfen audit[2599]: USER_END pid=2599 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="stackwolfed" exe="/usr/bin/sudo" hostname=? addr=? terminal=? res=success'
dic 24 22:54:29 wolfen audit[2599]: CRED_DISP pid=2599 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:setcred grantors=pam_unix,pam_permit,pam_env acct="stackwolfed" exe="/usr/bin/sudo" hostname=? addr=? terminal=? res=success'
dic 24 22:54:29 wolfen systemd[1]: kwin-restart@stackwolfed.service: Main process exited, code=exited, status=1/FAILURE
dic 24 22:54:29 wolfen systemd[1]: kwin-restart@stackwolfed.service: Failed with result 'exit-code'.
dic 24 22:54:29 wolfen systemd[1]: Failed to start Kwin Suspend/Resume Service.
dic 24 22:54:29 wolfen audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=kwin-restart@stackwolfed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
dic 24 22:54:29 wolfen kernel: audit: type=1106 audit(1577224469.835:133): pid=2599 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="stackwolfed" exe="/usr/bin/sudo" hostname=? addr=? terminal=? res=success'
dic 24 22:54:29 wolfen kernel: audit: type=1104 audit(1577224469.835:134): pid=2599 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='op=PAM:setcred grantors=pam_unix,pam_permit,pam_env acct="stackwolfed" exe="/usr/bin/sudo" hostname=? addr=? terminal=? res=success'
dic 24 22:54:29 wolfen kernel: audit: type=1130 audit(1577224469.835:135): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=kwin-restart@stackwolfed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
dic 24 22:54:29 wolfen kscreenlocker_greet[2528]: UdevQt: unable to create udev monitor connection

That Failed to start KWin Suspend/Resume service message is worrying me. Also the script seems to exit with a failure code

Probably will do if XRender won't fix it lol

Check service status, to see better the problem.
Currently the error does not make sense

The service uses DBUS_SESSION_BUS_ADDRESS in Exec line, so something maybe wrong or needs improvement.

But... enough for tonight.
Christmas is early in the morning.
Have a good night! :wave:

Ok yes, this did it. It has some hiccups in the first few seconds but then it goes back to normal :tada:
so if it's a compositor issue, why did it only show up after updating the Kernel? Also would it be possible to try another compositor (like compton)?

Thanks for the help and have a great Christmas day to everyone who helped me! :smiley:

Sweet, pick the most dashing username and mark it as solved.

Edit: You can try compton in XFCE, I'm not sure KDE supports it.

It depends how the user wrote the unit and which method was used to enable it. Without the full units contents, naming convention, and how it was enabled it is difficult to say what the issue is.

My guess would be that the "%U" should be replaced by the users UID. The UID is generally 1000, but his UID could be a different numerical value.

That would be my guess as to why it's not working, but the plasma & kwin restart services are very finicky to get exactly right.

I actually did that, substituted %i too just to be sure since the original post said to do that in case bash isn't the default shell (and I use zsh which SHOULD be compatible but never know)

Also the issue has been solved changing compositor settings (XRender instead of OpenGL)

Sadly those using shells other than bash tend to have problems with the services to restart kwin and the plasma shell.

You could try this variation:

ExecStart=/usr/bin/env bash -lc  "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%U/bus DESKTOP_SESSION=/usr/share/xsessions/plasma sudo -iu %i DISPLAY=:0 qdbus org.kde.KWin /Compositor suspend"
ExecStop=/usr/bin/env bash -lc "sleep 10; DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%U/bus DESKTOP_SESSION=/usr/share/xsessions/plasma sudo -iu %i DISPLAY=:0 qdbus org.kde.KWin /Compositor resume"

Hello there
What worked for me was changing Rendering backend in Compositor from OpenGL 3.1 to XRender

This topic was automatically closed after 180 days. New replies are no longer allowed.

Forum kindly sponsored by