-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Underlying Desktop flashes for split second when dpms is turned off #99
Comments
I have encountered this problem on my laptop as well:
(This is on the Lenovo Thinkpad X1 Carbon 6th Gen (2018)) |
I've been noticing this too. I have a config similar to @QasimK, in that it turns the display off, then waits a few seconds before locking. I wondered if perhaps turning the screen off effectively froze the contents of the framebuffer, which is then not updated until after the screen has been turned back on, meaning swaylock can't hide the screen contents until it's too late. I wouldn't be surprised if having both set to occur at the same time means that it isn't entirely deterministic which occurs first. |
I also suspect that it has to do with buffering in sway/wlroots. I hacked around in both to flush the buffers before dpms off or right after dpms on. But the way wlroots does its rendering turned out to be beyond me (for now :). I worked around it with this swayidle config:
It does two distinct things for the two cases where the desktop would be visible on my laptop:
My operating theory is that adding a couple of page flips rendering an empty screen somewhere around https://github.com/swaywm/sway/blob/master/sway/config/output.c#L440 (or in the code path leading up to it) would work around the issue. Ideally, the whole renderer would keep going for a couple of page flips leading up to a dpms off to render the lock screen into all buffers. As a PoC I've tried all the variations and locations for a
I could think of but couldn't get it to do this for multiple page flips to clear all buffers. Any guidance on whether I'm even looking in the right direction and how to go about it would be welcome. |
This also seems to affect logind's lid switch feature HandleLideSwitch if you have it suspend. The previous workarounds that were mentioned don't really work for me. |
This should be fixed with the new lockscreen protocol. |
I have two laptops and cant reproduce this issue on both my laptops, but on a dell xps 9380 I've noticed the following strange behaviour.
I lock the screen with:
combined with:
When I lock the screen with
alt+L
, it turns off the screen as expected. However when I start typing, for a split second you can see the underlying desktop before swaylock is rendered over it.NOTE: Running
swaylock
in a terminal on its own does not show this behaviour. It's the combination of dpms off and swaylock at the same time that causes this.My suspicion is that the screen on this laptop is quicker to turn back on than my other laptop which is why I cannot reproduce this behaviour there.
The text was updated successfully, but these errors were encountered: