elementary / gala

Gala Window Manager for elementary OS and Pantheon
https://elementary.io
GNU General Public License v3.0
273 stars 76 forks source link

Odin: Quick glimpse at unlocked Desktop possible after resume #988

Open marbetschar opened 3 years ago

marbetschar commented 3 years ago

What Happened

When my laptop suspends the screen goes dark. So far everythings fine. But when I wake it up again, I can get a quick glimpse at the unlocked Desktop before the Greeter is shown.

Expected Behavior

The only thing visible after resume should be the Greeter, so a user must login before they can see anything of the Desktop.

Steps to Reproduce

  1. Boot and login as usual
  2. Send the laptop to sleep
  3. Resume the laptop and you'll get a quick glimpse at the Desktop at the state it had before hibernation
  4. The Greeter is shown and hides the Desktop

Platform Information

hanaral commented 3 years ago

@cassidyjames sorry for tagging you like this, but I wanted to know your thoughts on the current late-locking function. It seems to introduce a few security issues like the ones listed above....

cassidyjames commented 3 years ago

@hanaral I recall seeing this on earlier versions of elementary OS without the new screen shield, so I'm not sure this is new. @davidmhewitt might have thoughts on how to reduce the flash of unlocked content, but I'm not sure.

davidmhewitt commented 3 years ago

Yeah it's actually improved for me with the new screen shield. With light locker, I got 2-5 seconds of my unlocked session before the unlock screen, now it's just a split second. But it seems to be hardware dependant.

It might be possible to improve on it. Next time I'm digging in that area, I'll take a look.

hanaral commented 3 years ago

Alright, but I hope you guys are also aware that the late-locking black screen can allow for system sounds to play, and for the viewing of anything that draws over everything else (like Steam private messages, and I'm sure there are more). I really think that locking should go directly to the greeter...

davidmhewitt commented 3 years ago

and for the viewing of anything that draws over everything else (like Steam private messages, and I'm sure there are more).

Well that sounds like a bug that can be fixed, I thought I'd seen a separate bug about that somewhere that I can't find now.

vjr commented 3 years ago

Yup , split second desktop is visible when resume... this is on a laptop with intel core i5 1135g7 cpu with its integrated iris xe igpu.

jeremypw commented 3 years ago

This happens for me on Odin daily, when resuming from suspend but not when resuming after locking the screen with keyboard or when resuming after suspending from the greeter screen. The desktop shows for about 1 second. Maybe should lock the screen first then suspend??

hanaral commented 3 years ago

This happens for me on Odin daily, when resuming from suspend but not when resuming after locking the screen with keyboard or when resuming after suspending from the greeter screen. The desktop shows for about 1 second. Maybe should lock the screen first then suspend??

I, including some others have suggested making this default beaviour, but it seems to be a part of the 'late locking' design which has the sole purpose (afaik) to allow music to continue playing. I personally don't think it's worth the risk of the desktop compositor being at the surface after being 'locked', even if the delay is minimised. If lockscreen media is a need, there should be an actual API devs can use rather than a workaround.

jeremypw commented 3 years ago

it seems to be a part of the 'late locking' design which has the sole purpose (afaik) to allow music to continue playing.

For me, "Suspend" implies the computer stops everything it is doing - including playing music. I can see the point of continuing to play while the screen is locked though.

I don't know enough about the Gala code base atm, but I want to learn more. There are an awful lot of outstanding PRs awaiting review for a start.