Bug 484015 - SDDM Wayland does not go into monitor powersave timeout with no user logged in
Summary: SDDM Wayland does not go into monitor powersave timeout with no user logged in
Status: CONFIRMED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.0.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 468807 (view as bug list)
Depends on:
Blocks: 485450
  Show dependency treegraph
 
Reported: 2024-03-19 19:05 UTC by MikeC
Modified: 2024-05-09 15:48 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MikeC 2024-03-19 19:05:08 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

Running Arch Linux with Plasma 6 ( 6.0.2-4 ) under a Wayland session but with SDDM ( 0.21.0-4 ) all fully updated to latest versions runs fine with SDDM running as default under X11. If SDDM is made to run in Wayland by adding in the file /etc/sddm.conf.d/10-wayland.conf with contents:

[General]
DisplayServer=wayland
GreeterEnvironment=QT_WAYLAND_SHELL_INTEGRATION=layer-shell,XKB_DEFAULT_LAYOUT=gb

[Wayland]
CompositorCommand=kwin_wayland --drm --no-lockscreen --no-global-shortcuts --locale1

allows SDDM to run in Wayland, with the correct locale.

However if no user logs in then the monitor remains powered on indefinitely, whereas when running under X11 it will timeout and put the monitor into powersave after the timeout period.

This timeout should also be honoured when running under Wayland in order to conserve energy and the monitor should go into powersave mode after the timeout period until a user moves the mouse or presses a keyboard key and then logs in.

Also if the computer is a server then when detecting IdleMonitor suspend would not be appropriate, even though monitor powersave would be very valuable.

STEPS TO REPRODUCE
1.  Start SDDM service under Wayland
2.  Do not login as any user on the greeter
3.  The monitor screen remains powered on indefinitely.

OBSERVED RESULT

There is no timeout leading to he monitor going into powersave

EXPECTED RESULT

The monitor should go into powersave (without going into suspend) after the timeout period

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:  Plasma 6.0.2-4  sddm 0.21.0-4 kernel 6.6.2-2
(available in About System)
KDE Plasma Version: 6.0.2-4
KDE Frameworks Version:  6.0.0-1
Qt Version: 6.6.2-2

ADDITIONAL INFORMATION
Comment 1 MikeC 2024-03-19 20:06:00 UTC
https://github.com/sddm/sddm/issues/1897 is related
Comment 2 Zamundaaa 2024-04-11 13:30:25 UTC
KWin doesn't handle power saving, it's up to powerdevil - which doesn't run in SDDM.
While it's thinkable to move the idle timeout logic to KWin and have powerdevil only set the timeout value - and have some sane default in SDDM - I dunno how well this works with powerdevil's architecture.
A more proper solution would probably have powerdevil run under the SDDM user and handle this properly
Comment 3 Nate Graham 2024-04-11 15:12:54 UTC
So would this be on SDDM to launch powerdevil, then?
Comment 4 Zamundaaa 2024-04-11 15:50:04 UTC
Maybe. I have a feeling that wouldn't be accepted in SDDM though, with SDDM being independent of Plasma and all
Comment 5 Nate Graham 2024-04-12 16:45:35 UTC
Sounds like we're stuck until we adopt SDDM. :/
Comment 6 MikeC 2024-04-12 20:19:57 UTC
That is a blocker for me - I won't sensibly be able to choose to run sddm wayland  as the login manager unless the monitor can go into powersave - I hope that sddm adoption might happen sooner rather than later in that case.
Comment 7 Zamundaaa 2024-05-09 15:48:30 UTC
*** Bug 468807 has been marked as a duplicate of this bug. ***