Artix Linux Forum

Artix Linux => Applications & Software => Topic started by: kapa on 21 November 2023, 20:16:18

Title: [Solved] Laptop freezes when waking from sleep/suspend (when opening lid)?
Post by: kapa on 21 November 2023, 20:16:18
Setup:
Dinit + KDE + Wayland + SDDM + Lightly + gtk4 theme
If it happens to be relevant it has a 12th gen U series i5 and mobile 3050.

My laptop has been having a pretty bizarre issue. Every time I try to wake it from sleep by opening it or with the power button it displays the wrong lock screen (different to the one I set and the one I see when I simply log out (also different to sddm)). It freezes after about 1 second. The keyboard and mouse go unresponsive but if I hold the power button for about 5 seconds it unfreezes the keyboard only and I can get in but the settings are 'off' and the touch pad gets disabled if you do this. The other option is to hold power for 10s and turn it off and on. There are no issues if I just let it go to sleep without closing it, when booting, rebooting, logging in and out, after dimming the screen. What I described up to this point is what happens on Wayland. On x11 it doesn't freeze completely but it starts glitching out and having artifacts and freezes later?

To sum up it only happens if I close it or put it to sleep by pressing the power button and then try to wake it up.

What I've tried:

I don't really think it's a nvidia issue but I did see some similar issues in the KDE subreddit with Walyand from 2 years ago with no real resolution. I went through logs a bit but if I'm honest I don't know what exactly I am looking for. I did see
Quote
dbus-deamon[623]: [system] Activated service 'org.freedesktop.login1' failed: Process org.freedesktop.login1 received signal 15
(ModemManager: 860): Glib-GIO-WARNING **:00:07:39.339: Error releasing name  org.freedesktop.ModemManager1: The connection is closed
. And there was also a [base-manager] couldn't check support for device in there somewhere.

Any clue to what could be wrong?
Title: Re: Laptop freezes when waking from sleep (specifically when opening laptop)?
Post by: Artt on 21 November 2023, 22:58:20
I do not know what is up, but I think you should try doing it with a different DE, like XFCE or GNOME. That will give us more info
Title: Re: Laptop freezes when waking from sleep (specifically when opening laptop)?
Post by: kapa on 22 November 2023, 00:14:02
Or maybe it really could be an nvidia suspend issue. It's the same as this thread. (https://www.reddit.com/r/artixlinux/comments/10o8ery/wayland_suspend/)
Title: Re: Laptop freezes when waking from sleep (specifically when opening laptop)?
Post by: kapa on 23 November 2023, 22:56:41
Update: I made it work!

After going back to X11 and not enjoying it I decided to give it another go and was successful this time.

How I got nvidia+wayland+dinit working for me:

Right now I don't really know how much each of these helped but I'm assuming it might actually be linux-lts kernel and/or nvidia-dkms + the kernel parameters. When I tried gnome with regular nvidia drivers, kernel and without changing the sleep script it left me hanging on the sddm screen (I had to use x11). I'm guessing this should also be working on KDE but haven't tried it yet.