NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.31k stars 13.55k forks source link

Pantheon: unable to logout from session #60496

Open davidak opened 5 years ago

davidak commented 5 years ago

Issue description

I reproducibly get this log message when trying to log out from wingpanel.

Apr 30 17:00:14 ethmoid io.elementary.cerbere.desktop[6410]: GDBus.Error:org.freedesktop.login1.NoUserForPID: Caller does not belong to any logged in user or lingering user

When i try to lock the screen:

Apr 30 17:05:52 ethmoid io.elementary.cerbere.desktop[6410]: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ScreenSaver was not provided by any .service files

When i try to suspend:

Apr 30 17:06:18 ethmoid io.elementary.cerbere.desktop[6410]: GDBus.Error:org.freedesktop.DBus.Error.InteractiveAuthorizationRequired: Interactive authentication required.

When i try to shut down:

Apr 30 17:06:52 ethmoid io.elementary.cerbere.desktop[6410]: GDBus.Error:org.freedesktop.DBus.Error.InteractiveAuthorizationRequired: Interactive authentication required.

When i try to restart:

Apr 30 17:07:26 ethmoid io.elementary.cerbere.desktop[6410]: GDBus.Error:org.freedesktop.DBus.Error.InteractiveAuthorizationRequired: Interactive authentication required.

Workaround

Create another user and switch to that user. The login screen appears and the system is practically locked. Just login with your user the next time you need the system.

@worldofpeace

Steps to reproduce

  1. open journalctl -f
  2. try to logout
  3. see only the log message

Technical details

davidak commented 5 years ago

I lost that strange session by:

  1. switch user
  2. try to log back in to the current user
  3. session crash https://github.com/NixOS/nixpkgs/issues/60082

In a new session, i'm unable to reproduce the behavior.

worldofpeace commented 5 years ago

By seeing org.freedesktop.ScreenSaver was not provided by any .service files I'm almost certain that lightlocker isn't running or crashed somehow.

And I can just quickly reproduce the locking issue by killing its daemon and trying to lock the session.

 GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ScreenSaver was not provided by any .service files

For the issues with suspend, shutdown, and restart

GDBus.Error:org.freedesktop.DBus.Error.InteractiveAuthorizationRequired: Interactive authentication required.

means

Access to the requested operation is not permitted. However, it might be available after interactive authentication. This is usually returned by method calls supporting a framework for additional interactive authorization, when interactive authorization was not enabled with the sd_bus_message_set_allow_interactive_authorization(3) for the method call message.

usually it's because you need to be root. Maybe something was inhibiting it?

davidak commented 5 years ago

Maybe something was inhibiting it?

I have closed every desktop program, but maybe something is broken in the background.

Anything i can do to debug when i encounter it next time?

davidak commented 5 years ago

By seeing org.freedesktop.ScreenSaver was not provided by any .service files I'm almost certain that lightlocker isn't running or crashed somehow.

How can i check if it's running? Is it a service?

All systemd services are running except some "session-*.scope".

[root@ethmoid:~]# systemctl --failed
  UNIT              LOAD   ACTIVE SUB    DESCRIPTION                
● session-2.scope   loaded failed failed Session 2 of user davidak  
● session-c10.scope loaded failed failed Session c10 of user lightdm
● session-c11.scope loaded failed failed Session c11 of user lightdm
● session-c12.scope loaded failed failed Session c12 of user lightdm
● session-c13.scope loaded failed failed Session c13 of user lightdm
● session-c14.scope loaded failed failed Session c14 of user lightdm
● session-c15.scope loaded failed failed Session c15 of user lightdm
● session-c16.scope loaded failed failed Session c16 of user lightdm
● session-c17.scope loaded failed failed Session c17 of user lightdm
● session-c18.scope loaded failed failed Session c18 of user lightdm
● session-c2.scope  loaded failed failed Session c2 of user lightdm 
● session-c3.scope  loaded failed failed Session c3 of user lightdm 
● session-c4.scope  loaded failed failed Session c4 of user lightdm 
● session-c5.scope  loaded failed failed Session c5 of user lightdm 
● session-c7.scope  loaded failed failed Session c7 of user lightdm 
● session-c8.scope  loaded failed failed Session c8 of user lightdm 
● session-c9.scope  loaded failed failed Session c9 of user lightdm 

"session-9.scope" is active running. "Session 9 of user davidak"

I added a workaround i use now to the issue description.

qaldak commented 4 years ago

same problem here on shutdown Unable to shutdown: GDBus.Error:org.freedesktop.DBus.Error.InteractiveAuthorizationRequired: Interactive authentication required.

if found an issue to this topic: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1847896

is there a workaround?

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info