mate-desktop / mate-screensaver

MATE screen saver and locker
https://mate-desktop.org
GNU General Public License v2.0
48 stars 40 forks source link

Cannot enter password when screen locks #156

Open ale-carra opened 6 years ago

ale-carra commented 6 years ago

Expected behaviour

It is possible to focus the password textbox and enter the password.

Actual behaviour

It is impossible to focus the password textbox and enter the password, most of the time. I have to click on Switch User and then enter the password.

Steps to reproduce the behaviour

Wait X minutes until the screen locks.

MATE general version

1.20

Package version

1.20.0-1

Linux Distribution

Ubuntu 18.04

alexarnaud commented 6 years ago

Hello @ale-carra

Thanks for the report.

I've experienced the same issue, it was due to GTK issue.

@sthibaul what do you think? Do you think Ubuntu 18.04 could be impacted by our GTK bug?

Best regards, Alex.

raveit65 commented 6 years ago

https://github.com/mate-desktop/mate-screensaver/issues/67#issuecomment-148791076

alexarnaud commented 6 years ago

@ale-carra Do you have a fingerprint?

Best regards, Alex.

ale-carra commented 6 years ago

No, but I do have conky. I changed the conky window type to dock.

2018-07-09 13:17 GMT-03:00 Alex ARNAUD notifications@github.com:

@ale-carra https://github.com/ale-carra Do you have a fingerprint?

Best regards, Alex.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mate-desktop/mate-screensaver/issues/156#issuecomment-403535305, or mute the thread https://github.com/notifications/unsubscribe-auth/ABhFoPQKe3HKGM_0M8ZMag3fRrx-kzHgks5uE4IBgaJpZM4Tz4IU .

sthibaul commented 6 years ago

ubuntu 18.04 does not contain our changes, so I don't think it is related to our work.

guruthree commented 6 years ago

I have this same issue now on my second Gentoo desktop with Mate 1.16.2 (mate-screensaver 1.16.1) after running a system update (emerge -uDNav world). This machine does not have conky. My primary Gentoo desktop, which I have not updated yet, has Mate 1.16.1 (mate-screensaver 1.16.0), conky, and no problems. No fingerprint readers on either system.

Is there anything I can run to help track down the issue?

cmichal2 commented 6 years ago

I see this same issue. My workaround: switch to a text vt with CTRL-ALT-F1, then: DISPLAY=:0 mate-screensaver-command -d unlocks it.

killing marco lets focus go to the screensaver dialog as well. Its all a bit strange. I had a program handy that calls XGetInputFocus. Calling that from the vt shows that the window focus was still with the terminal that had it before the screensaver locked (found with xwininfo -root -tree). It seems that the screensaver-dialog didn't grab the focus? I generally use mouse focus, but changing to click focus didn't seem to change anything. I should add that I'm using Mate 1.12 on Gentoo

Update: to add to the weirdness, I noticed that when I updated, just before this problem started, the versions of mate-screesaver and marco didn't change. So this is something more subtle than some change in one of those.

cmichal2 commented 6 years ago

Ok. moving from gtk+-2.24.31-r1 to gtk+-2.24.32 was the start of the problem for me. If I downgrade back to gtk+-2.24.31-r1, and logout then back in, the screensaver focus works properly again.

raveit65 commented 6 years ago

Surpise surprise, any chance to use the git bisect comand for gtk+-2.14.32 to find out the culprit commit?

cmichal2 commented 6 years ago

I've opened a gentoo bug on this at: https://bugs.gentoo.org/664998 It might help if anyone else who has this issue on Gentoo could chime in there with a "me too" to get it tagged as confirmed at least. I don't have the time to bisect I'm afraid...

cmichal2 commented 6 years ago

The problem seems to come from patch 0011-gdk-do-not-deactivate-surface-on-keyboard-grabs.patch which is part of gtk+-2.24.32-patchset.tar.xz, applied in the 2.24.32 ebuild.

guruthree commented 6 years ago

Thanks, downgrading to 2.24.32-r1 has fixed it for me.

lukefromdc commented 6 years ago

I noticed in the linked gentoo bug report that this was with mate-screensaver 1.12, which uses GTK2. This should have no effect on GTK 3.22 based MATE 1.20, as GTK 2 is not used there. I recall a similar keyboard grab issue coming up with mate-panel (in https://github.com/mate-desktop/mate-panel/pull/863 ) and we probably won't get any fixes for this from GTK3 as the behavior was deliberately changed.

sthibaul commented 6 years ago

There were issues with that commit, yes, but it was supposed to be fixed by 853f786727a954d10ed78405adc18e0772ccd1cb , did that not get applied too?

cmichal2 commented 6 years ago

It looks like that was missed in the gentoo build. I updated the gentoo bug with a pointer to that patch. Thanks.

tari01 commented 5 years ago

Same thing on Manjaro MATE with mate-screensaver 1.20.3.

sthibaul commented 5 years ago

@tari01 : which exact version of gtk do you have? A pure 2.24.32 version wouldn't have the issue. If your distribution contains commit 00b17063ac8e ("gdk: do not deactivate surface on keyboard grabs"), it needs to include commit 853f786727a9 ("gdk: activate window on keyboard grabs") as well.

tari01 commented 5 years ago

@sthibaul

Manjaro's MATE is gtk3, currently 3.24.5. In the meantime, I have (accidently) figured out that the input focus is grabbed by a desktop applet belonging to the "my-weather-indicator" application. The curious thing is the following: when I am unable to log in, I switch to the shell and do...

DISPLAY=:0 xprop _NET_ACTIVE_WINDOW 
DISPLAY=:0 xwininfo -id $(printf %i THE_ID)

...but xwininfo cannot find a window with the id that xprop gives me.

Reading the bug reports and comments, it is obvious that there is a number of application windows that keep the input focus when the unlock dialog appears. Maybe mate-screensaver should somehow forcefully pass the focus to the dialog?

Lutgolhein commented 5 years ago

Hello, guys...

I'm having this same issue since forever with my Solus/Mate desktop.

As commented by others, when screensaver is locked I'm randomly unable to type my password in order to unlock it.

My workaround until now was to click on "Switch User" and back on in a new session, but lately since few days this issue is getting worse in a way that by doing this same workaround will direct me again to the same previous unlocked/untypeable screen lock.

So my new workaround has to be

CTRL + ALT + F1

log in with my credentials and run "htop" to kill the screensaver process.

This is starting to be frustrating :(

I will appreciate any advice...

mate-screensaver --version mate-screensaver 1.22.0

GTK: libjavascriptcoregtk-4.0.so.18 -> libjavascriptcoregtk-4.0.so.18.11.5 libgtkdsv-3.so.0 -> libgtkdsv-3.so.0.8.5 libgtkd-3.so.0 -> libgtkd-3.so.0.8.5 libgtkmm-3.0.so.1 -> libgtkmm-3.0.so.1.1.0 libcanberra-gtk3.so.0 -> libcanberra-gtk3.so.0.1.9 libnm-gtk.so.0 -> libnm-gtk.so.0.0.0 libdbusmenu-gtk.so.4 -> libdbusmenu-gtk.so.4.0.12 libgtk-x11-2.0.so.0 -> libgtk-x11-2.0.so.0.2400.31 libpeas-gtk-1.0.so.0 -> libpeas-gtk-1.0.so.0.2200.0 libcanberra-gtk.so.0 -> libcanberra-gtk.so.0.1.9 libgtkmm-2.4.so.1 -> libgtkmm-2.4.so.1.1.0 libdbusmenu-gtk3.so.4 -> libdbusmenu-gtk3.so.4.0.12 libgtksharpglue-2.so -> libgtksharpglue-2.so libgtkdgl-3.so.0 -> libgtkdgl-3.so.0.8.5 libgtksourceview-3.0.so.1 -> libgtksourceview-3.0.so.1.8.0 libwebkit2gtk-4.0.so.37 -> libwebkit2gtk-4.0.so.37.33.5 libgtk-3.so.0 -> libgtk-3.so.0.2200.30

I also use Conky on my desktop.

m00tiny commented 4 years ago

Same thing on Manjaro MATE with mate-screensaver 1.20.3.

I'm experiencing this on Manjaro as well, xfwm4 using mate-screensaver

I was not running virtualbox or freerdp (local Xorg).

I didn't do any of the debug steps the other people have mentioned to see where focus was either. But I do KNOW that focus was last left mate-terminal. I did not kill that terminal, I only killed mate-screensaver.

I WAS also using the weather applet (I didn't kill it either, I only killed mate-screensaver).

I could not tab, alt-tab, etc.. into the dialog, though the mouse would interact (hovering over buttons showed response as well).

I am using a mouse from a HID keyboard/mouse combo in a situation where the keyboard is no longer in the relationship (widowed), the mouse is sleeping with a wired USB keyboard and the original laptop keyboard.. she's not a slut, the HID keyboard knew the laptop keyboard was always going to be in the picture, it just couldn't handle sharing the mouse.

My X.org log shows a shitload of event7 keyboards being removed and added, like a SHITLOAD during the time period where I was trying to input my password. I only unplugged the USB keyboard once to try another port (it's even still plugged into that other port, the NumLock LED kind of signified to me that the keyboard itself was fine). It doesn't do that normally, it's not constantly searching for the HID keyboard or anything (or those udev events aren't making it to log).

I saved the X.org log, but they appear to be informational, the very end of the log is most likely from me killing mate-screensaver: [214235.207] (EE) client bug: timer event7 debounce: offset negative (-333ms) [214235.207] (EE) client bug: timer event7 debounce short: offset negative (-346ms)

My Xorg is clean after that (as well, the screensaver hadn't popped back on).

I'm running back out now, so I expect to run into this issue when I get back in 2 or 3 or 4 hours. If not and I forget about it, you can e-mail me at sgray@grayhatservices.com if you would like me to reproduce it and catch any information for you. Pardon the setup:

Xorg > sddm > xfwm4 / xfce4-session > mate-screensaver (Only MATE/Marco stuff running is/was mate-screensaver and mate-terminal *just conferring with mate-terminal DID have focus, I will close it and open uxvrt and leave it with focus this time)

Cheers and good luck (I think the keyboard is crashing/udev - but I don't know shit).

m00tiny commented 4 years ago

Sorry, that's mate-screensaver-1.22.1-1 and I'm doing a quick yay --rebuildall -Syyu mate-screensaver before I run out for ya.. see if it happens again. Cheers!

(Leaving Chrome open, as it was open before.. literally only difference is the keyboard is still plugged into this other port and mate-terminal will be closed, uxvrt will be open and have focus)