DPMS disabled after upgrade to kubuntu 22.04

Duncan 1i5t5.duncan at cox.net
Tue Apr 18 05:28:07 BST 2023


Erik Rull posted on Fri, 14 Apr 2023 09:10:01 +0200 as excerpted:

> Hi all,
> 
> I have no clue yet what went wrong, at least there was no error message
> during the upgrade process from 20.04 LTS to 22.04 LTS kubuntu...
> 
> But - since this upgrade, the two screens of my system never switch off
> - I set the screen power off to 10 minutes - nothing happens.
> If I call the switchoff via xset manually, the screens go into standby
> immediately.
> Works - but not really usable when locking the system and leaving the
> room.
> 
> And - if I set some settings in xset, I see the settings changing but
> they do not work (eg. xset +dpms 30 30 30 and xset s 30 10 have no
> effect at all, but they are shown in xset q)
> And also interesting - when applying new power off times in the power
> management dialog, then DPMS gets always disabled when calling xset q
> afterwards (before it was enabled by me)
> The system is still on X11, not on Wayland - why - I don't know - I
> thought that ubuntu 22.04 based installations will default to Wayland...
> 
> Maybe something is mixed up between Wayland and X?

Are you /sure/ "the system is still on X11, not on Wayland"?  How are you 
checking?  Because that sounds very much like the behavior on wayland here 
(without xorg even installed, xwayland running on top of wayland as the X-
server).

As for what I do on wayland, I don't normally screenlock, and either use 
the TV remote to turn off my TV-monitors, xset -off as you mention, or just 
leave them on (I have an all-black plasmashell activity I can switch to, 
for that purpose).

I /think/ DPMS is supposed to be available on wayland as well, but it 
hasn't ever worked for me -- not that it has been a priority to /get/ 
working, so I've not really looked into doing so.

Meanwhile, depending on how you are checking, it's possible xwayland is 
fooling you into thinking you're still on X, which X-client apps are, 
actually, only they're on the xwayland X-server on top of wayland, not on 
an independent full xorg X-server.

That is, for instance, how xset runs when run on wayland, and why setting 
many of its values don't seem to actually take effect -- they get overruled 
by the wayland settings which haven't been changed.  In fact, many of the 
generic X tools will still run but only partially work.  xprop will still 
report properties for native X apps, for instance, since they all run in 
the same xwayland instance (at least by default, don't know if it's 
possible to change), but won't see wayland apps at all.  Similarly, xrandr 
will normally report correct screen resolutions and layouts as xwayland 
sees that and passes it to xrandr, but you can't use it to actually 
/change/ screen resolutions/layouts.

So how to check?

An easy but foolable way is to run konsole and see if the WAYLAND_DISPLAY 
variable is set (if something unsets it or sets it to some artificial 
value...), similar to the DISPLAY variable that is normally set for X (on 
wayland both should be set, DISPLAY for X-based apps via xwayland of 
course).

$ echo $WAYLAND_DISPLAY 

The proper kde-ish way is of course to check the (help menu) about 
<whatever-app> dialog, components tab.  For wayland it should say "The 
wayland windowing system".  On xorg, it'll say something about X instead.  
(Altho on wayland, that too can be fooled if the QPA platform is selected 
to X so it runs in X mode on xwayland instead of in native wayland mode.  
Similarly, I read that kwin_wayland can be run in windowed mode on X, tho 
I've never done it.)

There are of course other ways to check... wmctrl -lG (ell for list, not 
one, if there's a bunch of X apps listed including plasmashell, you're 
likely on X, none or just a couple legacy apps, wayland), xprop/xkill 
select-window-mode (if it sees a window it's an X window, if not...), I'm 
sure there's many more...

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman



More information about the kde-linux mailing list