Bug#972417: xfce4-power-manager: System left idle => 'display power management' auto-locks session => no X session or lightdm greeter

2020-11-02 Thread Yves-Alexis Perez
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

control: forcemerge 870641 -1

On Sun, 2020-10-18 at 10:23 +0200, franck wrote:
> Package: xfce4-power-manager
> Version: 1.6.1-1
> Severity: grave
> 
> Dear Maintainer,
> 
> [ Bug description ]
> Bug happens when the screen auto-locks due to user inactivity. Then the
> screen switches off.
> To easily test that, set following to 1 min or so
> Xfce menu Applications -> Settings -> Power Manager -> Display -> 'Switch
> off after'
> 
> After such auto-lock, it appears not possible to get back the X session
> anymore.
> Because
> - by moving mouse or typing on keyboard the screen does not wake up. It
> stays off, black.
> - with Ctrl+Alt-F7 one gets
>     This session is locked
>     You’ll be redirected to the unlock
>     dialog automatically in a few seconds
>   but after waiting a few seconds the screen switches off again.
> => no way to get to the lightdm greeter.
> In both cases: not possible to get back the running X session anymore.

The lightdm greeter is on tty8, so try with Ctrl-Alt-F8.
> 
> => I filled this bug against xfce4-power-manager
> But I have no clue whether xfce4-power-manager
> - processes the locking completely by itself ?
> - just prepares locking, like deactivating keyboard/mouse? and then trigger
> like light-locker-command --lock...
> - only asks another package to do the full locking procedure.
> 
> 
> 
> Bug occurred under (at least) both kernels:
> linux-image-4.19.0-11-amd64-unsigned 4.19.146-1
> linux-image-5.8.0-0.bpo.2-amd64  5.8.10-1~bpo10+1
> 
> 

> 
> Also this bug gives a bad image to the user:
> - 'system crashed'
> - wondering what is the cause:
>     - is my graphic card not properly waking up ?
>     - or a bug in kernel ?
>     - or Xorg ?
>     - or light-locker ?
>     ...
> Thus they are probably numerous of open bugs that could be closed by fixing
> this bug.

Actually it's (or should be) already fixed in stable.
> 
> 
> [ Bugs reported against other packages, & that seem linked to this bug ]
> Bugs in source package light-locker
>   #906902 System left idle makes system freeze
>   #870641 light-locker, lightdm: screen stays off after resume
>   and all the merged one:
>   805711, 846278, 868087, 908329, 922095, 929461, 929834, 931555
>   #835461 light-locker breaks suspend/resume with nvidia legacy 340 drivers
> Bugs in source package lightdm
>   #867620 lightdm unlock screen randomly doesn't appear

With all those bugs already opened and the mess we're already in, why opening
*yet another one*? Honestly it adds more confusion than anything at that
point.

As indicated in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=870641#218
the bug *should* be fixed in 10.5 with kernel 4.19.0-10. You indicated that
you tested with linux-image-4.19.0-11-amd64-unsigned 4.19.146-1

Can you retry with that kernel and check you have the “atomic” message in the
kernel log:

broken atomic modeset userspace detected, disabling atomic

Regards,
- -- 
Yves-Alexis
-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEE8vi34Qgfo83x35gF3rYcyPpXRFsFAl+gRRsACgkQ3rYcyPpX
RFvT2Qf+K/oere1FxlQi2jg+f/iL6ejQLL/jowc5R3pg34Jp3jJMPvWe6HYz7c2L
+88W5GqwhI88Qk5oiGMdEf+3s8eKwoJi2kBp92g6HFyk6Xjbe7vzs7FOhUeeHadE
9ezgXfKzrDlhM4Knm3JtTEgKbgnEeOSop78hfzkaTrH94sbR75taK8yMo7Yuec3i
gIezlzkkOTuT37oDzrG2hyD9A/mEnQTWw3pw97kqHZo3meEtTjwZ9/vutd2MuzQM
zJG5qpCLH7G8fywBWzW6SZSDhChAo44Phz2fHDmlPLKtHUTAn03nHPwkdgUgg0Kw
3iaNBwgSZaPfZrPRh4yIhhN9rUodhQ==
=SWS6
-END PGP SIGNATURE-



Bug#972417: xfce4-power-manager: System left idle => 'display power management' auto-locks session => no X session or lightdm greeter

2020-10-18 Thread franck
Package: xfce4-power-manager
Version: 1.6.1-1
Severity: grave

Dear Maintainer,

[ Bug description ]
Bug happens when the screen auto-locks due to user inactivity. Then the screen 
switches off.
To easily test that, set following to 1 min or so
Xfce menu Applications -> Settings -> Power Manager -> Display -> 'Switch off 
after'

After such auto-lock, it appears not possible to get back the X session anymore.
Because
- by moving mouse or typing on keyboard the screen does not wake up. It stays 
off, black.
- with Ctrl+Alt-F7 one gets
This session is locked
You’ll be redirected to the unlock
dialog automatically in a few seconds
  but after waiting a few seconds the screen switches off again.
=> no way to get to the lightdm greeter.
In both cases: not possible to get back the running X session anymore.


[ Guilty package ]
Bug is _not_ triggered when user locks computer by doing any of
  Ctrl-Alt-Del
  xflock4  (in fact = Ctrl-Alt-Del)
  light-locker-command --lock
  dm-tool lock
As moving the mouse or typing on keyboard wakes up the screen and display the 
lightdm greeter.

=> I filled this bug against xfce4-power-manager
But I have no clue whether xfce4-power-manager
- processes the locking completely by itself ?
- just prepares locking, like deactivating keyboard/mouse? and then trigger 
like light-locker-command --lock...
- only asks another package to do the full locking procedure.


[ Workaround if locked out ]
Following allows to get the running X session back:
switch to tty1 by Ctrl+Alt+F1
  funny note: sometimes the mouse pointer is displayed on top of tty1 (moving 
the mouse does not move pointer).
log as root
run
  loginctl unlock-sessions
switch back to X by Alt+F7


[ Related packages version ]
All below are up to date Buster packages
dpkg -l "xfce4-power-manager" "lightdm*" "light-locker" "xfce4-session"
||/ NameVersion
ii  light-locker1.8.0-3
ii  lightdm 1.26.0-4
un  lightdm-greeter 
ii  lightdm-gtk-greeter 2.0.6-1
ii  xfce4-power-manager 1.6.1-1
ii  xfce4-session   4.12.1-6

Bug occurred under (at least) both kernels:
linux-image-4.19.0-11-amd64-unsigned 4.19.146-1
linux-image-5.8.0-0.bpo.2-amd64  5.8.10-1~bpo10+1

I tried Bullseye/Sid version: 1.6.6-1 by backporting it
Bug still occurs.
dpkg -l "xfce4-power-manager*" "lightdm*" "light-locker*" "xfce4-session*" 
"libxfce4ui*"
||/ NameVersion
ii  libxfce4ui-1-0:amd644.12.1-3 
ii  libxfce4ui-1-dev:amd64  4.12.1-3 
ii  libxfce4ui-2-0:amd644.14.1-1~bpo10+1 
ii  libxfce4ui-2-dev:amd64  4.14.1-1~bpo10+1 
ii  libxfce4ui-build-deps   4.14.1-1~bpo10+1 
ii  libxfce4ui-common   4.12.1-3 
ii  libxfce4ui-utils4.12.1-3 
ii  light-locker1.8.0-3  
ii  lightdm 1.26.0-4 
un  lightdm-greeter
ii  lightdm-gtk-greeter 2.0.6-1  
ii  xfce4-power-manager 1.6.6-1~bpo10+1  
ii  xfce4-power-manager-data1.6.6-1~bpo10+1  
ii  xfce4-power-manager-plugins 1.6.6-1~bpo10+1  
ii  xfce4-session   4.12.1-6 


[ Severity justification ]
As described in several reports, users usually handle the black screen by
  restarting the system 
or if users has root access:
  killall Xorg=> restarts X session
  killall lightdm => restarts X session
  killall light-locker=> X sessions won't lock anymore
All except last cause loss of unsaved data, last causes a security concern.
=> severity = grave

Also this bug gives a bad image to the user:
- 'system crashed'
- wondering what is the cause:
- is my graphic card not properly waking up ?
- or a bug in kernel ?
- or Xorg ?
- or light-locker ?
...
Thus they are probably numerous of open bugs that could be closed by fixing 
this bug.


[ Bugs reported against other packages, & that seem linked to this bug ]
Bugs in source package light-locker
  #906902 System left idle makes system freeze
  #870641 light-locker, lightdm: screen stays off after resume
  and all the merged one:
  805711, 846278, 868087, 908329, 922095, 929461, 929834, 931555
  #835461 light-locker breaks suspend/resume with nvidia legacy 340 drivers
Bugs in source package lightdm
  #867620 lightdm unlock screen randomly doesn't appear

Kind regards,
Franck Richter

-- System Information:
Debian Release: 10.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 
'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.8.0-0.bpo.2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages xfce4-power-manager depends on:
ii  libc6 2.28-10
ii  libcairo2 1.16.0-4
ii