Bug 483056

Summary: Laptop will not go to sleep when lid is closed or menu item Sleep is selected
Product: [Unmaintained] Powerdevil Reporter: elman <elman>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED DOWNSTREAM    
Severity: normal CC: me, mj.akarsh, natalie_clarius, nicolas.fella
Priority: NOR Keywords: qt6
Version First Reported In: 6.0.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description elman 2024-03-10 02:35:39 UTC
SUMMARY
***
After upgrade to Plasma 6, my laptop will not go to sleep. When I ran `systemd-inhibit --list --mode=block`, I get only 1 result:

WHO        UID  USER  PID  COMM            WHAT                                                                       WHY                      MODE 
PowerDevil 1000 elman 6789 org_kde_powerde handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch KDE handles power events block

Power and Batter widget does not report any app blocking sleep. Manual sleep blocking is off.
***


STEPS TO REPRODUCE
1. No idea. Maybe some problem when upgrading Plasma 5 to Plasma 6?

OBSERVED RESULT
Screen turns off, but after a short while, lock screen is shown.

EXPECTED RESULT
Laptop should go to sleep.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Manufacturer: ASUSTeK COMPUTER INC.
Comment 1 Aakarsh MJ 2024-03-10 12:55:28 UTC
Hi, thanks for the report. 

> After upgrade to Plasma 6, my laptop will not go to sleep. When I ran `systemd-inhibit --list --mode=block`, I get only 1 result:
>WHO        UID  USER  PID  COMM            WHAT                                                                       WHY                      MODE 
>PowerDevil 1000 elman 6789 org_kde_powerde handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid->switch KDE handles power events block
This is an expected result

Can you share the output of `journalctl` command, thanks!
Comment 2 elman 2024-03-11 02:03:59 UTC
Hi. Thanks for pointing me in the right directions. The issue was with Nvidia drivers and specifically PreserveVideoMemoryAllocations setting. Now sleep on AC works just like before.

I did find crash when trying to wake from sleep on BAT, but I will open new bug for that.

Thanks Aakarsh!