TurboVNC / turbovnc

Main TurboVNC repository
https://TurboVNC.org
GNU General Public License v2.0
763 stars 138 forks source link

GNOME 3: Cannot unlock screen saver (Fedora 31+, Ubuntu 20.04+, Solaris 11.4+) #238

Closed dcommander closed 3 years ago

dcommander commented 3 years ago

After swiping up to see the screen saver's password prompt, the password prompt continuously displays "Authentication error", even though nothing has been typed, and it doesn't allow the password to be typed. This is known to occur with TurboVNC, TigerVNC, and other X proxies running on Fedora 31+ and Ubuntu 20.04. It does not occur on RHEL/CentOS 8. In Fedora 32 and later, the issue manifests slightly differently. (The screen saver doesn't continuously display "Authentication error", and it does allow the password to be typed, but after typing it, the screen saver doesn't exit.)

Workaround:

The workaround suggested here does not fix the issue.

dcommander commented 3 years ago

Some additional info:

With the latest TurboVNC release (including deleting ~/.vnc/xstartup.turbovnc so that the TurboVNC Server can re-write it) and Ubuntu 20.04 updates, I can now only reliably reproduce the issue in a TurboVNC session if GNOME 3 is also running in either a local session or a TigerVNC 1.11 session and the local session or TigerVNC session was started before the TurboVNC session. (TigerVNC 1.11 introduced a new systemd-friendly window manager startup mechanism, albeit one with serious limitations. You have to be root in order to configure and start a TigerVNC session now, TigerVNC sessions have to be started on specific X displays rather than automatically choosing an available X display, and you can't generally start multiple TigerVNC sessions with GNOME 3. Also, the window manager decorations in TigerVNC 1.11 running on Ubuntu 20.04 are just plain wrong.) The freeze seems to have something to do with D-Bus. TurboVNC sessions use independent D-Bus session addresses, so they don't seem to interfere with each other in this manner, but when a local or TigerVNC 1.11 session is also running, it seems to somehow hijack the screen saver in such a way that you can only unlock it from the local or TigerVNC session (which also unlocks the TurboVNC session.) Attempting to unlock it from the TurboVNC session produces the freeze. Unfortunately, I can now confirm that loginctl unlock-session doesn't work around the freeze. However, once you have managed to unlock the screen, you can run gsettings set org.gnome.desktop.lockdown disable-lock-screen true to prevent it from locking again.

dcommander commented 3 years ago

I was able to reproduce the issue both with TigerVNC on :1 and TurboVNC on :2 and vice versa, so the display number doesn't seem to matter.

dcommander commented 3 years ago

Further observations:

dcommander commented 3 years ago

Another note regarding comparisons with TigerVNC:

This issue and #51 are the only known issues with GNOME 3 in a TurboVNC environment that are believed to be systemd-related. TigerVNC, despite using a systemd-friendly startup mechanism, also experiences #51.

There is no way to verify whether or not TigerVNC experiences this issue, because it simply does not allow multiple simultaneous GNOME 3 sessions under the same user account. If you are logged in locally with GNOME 3, attempting to start GNOME 3 in a TigerVNC session under the same user account results in a black screen. If you are running GNOME 3 in a TigerVNC session, attempting to start GNOME 3 in another TigerVNC session under the same user account similarly results in a black screen.

So the long and the short of it is: GNOME 3 is not multi-session-friendly, in general. TurboVNC's approach, which uses independent D-Bus session addresses for each VNC session, at least allows multiple GNOME 3 sessions to co-exist under the same user account, with a reasonable workaround. (If you don't want the screen saver to freeze, either disable screen saver locking-- which isn't very useful in a VNC session anyhow-- or don't try to use GNOME 3 simultaneously in a local and TurboVNC session or simultaneously in a TigerVNC and TurboVNC session.) I prefer our solution to not allowing multiple GNOME 3 sessions at all.

levinit commented 2 years ago

additional, ref https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2196