XDpms in screenlocker

Oliver Henshaw oliver.henshaw at gmail.com
Sun Jan 13 23:41:03 UTC 2013


On 13 January 2013 22:57, Thomas Lübking <thomas.luebking at gmail.com> wrote:
> ** please keep me in cc as well as likely dario **
>
> I looked into the powerdevil sources, reactivated the turnOffScreen dbus
> method, implemented it and that works - more or less (screeen turns black
> for a moment and then comes back up)
>
> // Let's pretend we're resuming
> core()->onResumeFromSuspend();
>
> Commenting that away works just as expected.

The same fix is in https://git.reviewboard.kde.org/r/106795/ which I
forgot about, sorry. Note that I think this is really due to an X bug,
if you 'sleep 10; xset -q' before asking powerdevil to turn off the
screen you can see that X11 thinks that the screen is still off when
it has come back on.

> [1] There's actually an explanation for that behavior which might be
> relevant in this case:
> * The calls to usleep below are necessary to
> * delay the actual DPMS mode setting briefly.
> * Without them, it's likely that the mode will be
> * set between the Down and Up key transitions, in
> * which case the Up transition may immediately
> * turn the display back on.

I think it's more than that, as mentioned above. Or maybe xset is
papering over the same bug?


More information about the Plasma-devel mailing list