Problem with resume from sleep induced from lid close on Nvidia Laptop

I’m using Fedora 43 (KDE) on my older Nvidia Laptop (it’s from ASUS and it has an Nvidia GeForce GTX 970M). The akmod-nvidia drivers are installed in version “580.119.02”. I have an external monitor connected that is set as my primary display. My sleep mode is set to “deep”.

I previously had a sleep issue when sleeping from the button in the app menu. It would immediately wake up. I fixed this by creating a systemd service to disable the XHC service which caused the wakeup. The laptop now sleeps and resumes normally when using the button in the menu.

Next I tried sleeping through lid close. “Same thing”, I thought, but I was wrong. The laptop When I opened the lid, the laptop’s internal screen remained completely black. The external monitor woke up, and I was able to log in, but what I found was that the desktop seemed to be gone.

  • No desktop, no taskbar, but all my applications that were open were still there.
  • Usually when plasma crashes, I get error messages and it tries to reboot, so maybe it’s not actually crashed.
  • I was able to switch between them using Alt+Tab
  • I was able to use shortcuts like Ctrl+Alt+T to launch a terminal.
  • I tried to start the desktop with kstart plasmashell (command I found online), but it didn’t work. This is the output: Imgur: The magic of the Internet
  • I was able to launch other apps, like zen-browser, which showed the same error message (see the image).

I created a pastebin with the latest journalctl entries (can provide more lines if needed): Journalctl - Pastebin.com (edit: updated the pastebin to have everything from lid close onward)

There weren’t too many errors, which surprised me. The errors are:

  • Feb 02 19:23:29 rog-ultramarine wireplumber[2025]: spa.bluez5.midi: org.bluez.GattManager1.RegisterApplication() failed: GDBus.Error:org.bluez.Error.AlreadyExists: Already Exists
  • Feb 02 19:23:31 rog-ultramarine ModemManager[1077]: [plugin-manager] task 3,enp3s0: error when checking support with plugin ‘generic’: (generic) Missing port probe for port (net/enp3s0)
  • Feb 02 19:23:36 rog-ultramarine kscreenlocker_greet[3080]: Could not create EGL surface (EGL error 0x3003)

The behavior is consistent.

  • I have tried removing the systemd service I created for the other issue, but the behavior didn’t change.
  • I tried disabling nvidia-suspend and nvidia-hibernate, since I found some posts where disabling them fixed the issue. However, that just caused my laptop to not go to sleep properly.
  • If I sleep from menu first, then close the lid, then open it, my laptop wakes up normally. So maybe the problem comes from what happens when the lid closes.
  • If I sleep through lid close and then wake up, the laptop screen remains dead when I sleep and wake again through the sleep button (not lid close)
  • I had one instance where plasma didn’t die after resuming from lid close sleep, but it died after I slept and resumed from the button in the situation above.
  • I was able to restart plasma using systemctl --user restart plasma-plasmashell. My laptop monitor didn’t come back, but plasma was working again. Though my desktop widget on the external monitor moved to the left for some reason.
  • Sometimes with black screens, the monitor is still there but just doesn’t show anything. This isn’t the case here, my laptop screen is completely disabled. I actually can enable it in the plasma display settings (after restarting plasma), and then it starts working again.
  • I also found out that my system won’t go to sleep (as in, it doesn’t finish suspending) if I have Flatpak apps open (not all Flatpaks, but tested with Haruna, Ungoogled Chromium and Fastmail). This is the journalctl for that: Feb 02 20:21:40 rog-ultramarine systemd[1833]: Started dbus-:1.2-org.fcitx.Fcitx - Pastebin.com

I would like to please request your assistance with this issue. My goal is to have my laptop resume from sleep normally when opening the lid.