Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xfce4 logout not working #15474

Closed
romildo opened this issue May 15, 2016 · 8 comments
Closed

Xfce4 logout not working #15474

romildo opened this issue May 15, 2016 · 8 comments
Labels

Comments

@romildo
Copy link
Contributor

romildo commented May 15, 2016

Issue description

On NixOS unstable, when trying to logout (or reboot, or shutdown) of Xfce using its logout window, the action is not completed and Xfce continues to run and manage my windows.

In a second try to logout a dialog appears the error message:

Failed to run action "Log Out..."

Session manager must be in idle state when requesting a shutdown

screenshot - 05152016 - 07 35 48 am

Steps to reproduce

  1. Launch the Log Out dialog window in the Xfce menu.
  2. Click the Log out button. The action is not completed.
  3. Relaunch the Log Out dialog window in the Xfce menu. An error dialog window appears.

Technical details

  • System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)

    NixOS 16.09pre83100.25e3c09 (Flounder)

  • Nix version: (run nix-env --version)

    nix-env (Nix) 1.11.2

  • Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)

    "16.09pre83100.25e3c09"

@boobiesinc
Copy link

boobiesinc commented May 18, 2016

Right, still true with:
16.09.git.f8177f7M (Flounder)

systemd[1]: [/nix/store/q5pq4afqsy8sywr88w35vy154rr5rhz5-rtkit-0.11/etc/systemd/system/rtkit-daemon.service:32] Unknown lvalue 'ControlGroup' in section 'Service'

File contents:

# You should have received a copy of the GNU General Public License
# along with RealtimeKit. If not, see <http://www.gnu.org/licenses/>.

[Unit]
Description=RealtimeKit Scheduling Policy Service

[Service]
ExecStart=/nix/store/q5pq4afqsy8sywr88w35vy154rr5rhz5-rtkit-0.11/libexec/rtkit-daemon
Type=dbus
BusName=org.freedesktop.RealtimeKit1
NotifyAccess=main
CapabilityBoundingSet=CAP_SYS_NICE CAP_DAC_READ_SEARCH CAP_SYS_PTRACE CAP_SYS_CHROOT CAP_SETGID CAP_SETUID
PrivateTmp=yes
PrivateNetwork=yes

# Work around the fact that the Linux currently doesn't assign any RT
# budget to CPU control groups that have none configured explicitly
ControlGroup=cpu:/

[Install]
WantedBy=graphical.target

Hmm looks like that's some leftover from 2013: https://www.freedesktop.org/wiki/Software/systemd/MyServiceCantGetRealtime/
or something else.

My current systemd:

$ /nix/store/f9f515zyr3k2ppnx4msjxzg3l9slja4g-systemd-229/lib/systemd/systemd --version
systemd 229
+PAM +AUDIT -SELINUX +IMA +APPARMOR -SMACK -SYSVINIT +UTMP -LIBCRYPTSETUP +GCRYPT -GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID -ELFUTILS +KMOD -IDN

Contents of ~/.xfce4-session.verbose-log:

TRACE[xfsm-startup.c:700] xfsm_startup_autostart_xdg(): TryExec set and xfsm_check_valid_exec failed, skipping
TRACE[xfsm-manager.c:823] xfsm_manager_signal_startup_done(): Manager finished startup, entering IDLE mode now

TRACE[xfsm-manager.c:303] xfsm_manager_set_state(): 
state is now XFSM_MANAGER_IDLE
TRACE[xfsm-manager.c:1130] xfsm_manager_save_yourself_global(): enteringTRACE[xfsm-manager.c:303] xfsm_manager_set_state(): 
state is now XFSM_MANAGER_SHUTDOWN

A sane logout would look like this(from my host):

[  199182] TRACE[xfsm-manager.c:1130] xfsm_manager_save_yourself_global(): entering[  199183] TRACE[xfsm-manager.c:303] xfsm_manager_set_state(): 
state is now XFSM_MANAGER_SHUTDOWN
[  199183] TRACE[sm-layer.c:304] sm_save_yourself_done(): Client Id = 290e5417f-18c0-4040-a64a-dd32f2d741ed, received SAVE YOURSELF DONE [Success = True]

[  199183] TRACE[xfsm-manager.c:1295] xfsm_manager_save_yourself_done(): entering[  199183] TRACE[sm-layer.c:304] sm_save_yourself_done(): Client Id = 2e425eb2a-7f69-4b67-8587-09e5c42cbc2b, received SAVE YOURSELF DONE [Success = True]

[  199183] TRACE[xfsm-manager.c:1295] xfsm_manager_save_yourself_done(): entering[  199183] TRACE[sm-layer.c:304] sm_save_yourself_done(): Client Id = 2940a7756-2e85-45eb-84b4-2d617624da8b, received SAVE YOURSELF DONE [Success = True]

[  199183] TRACE[xfsm-manager.c:1295] xfsm_manager_save_yourself_done(): entering[  199183] TRACE[sm-layer.c:304] sm_save_yourself_done(): Client Id = 21242381b-9649-4c40-955c-afa51bb5c5f8, received SAVE YOURSELF DONE [Success = True]

[  199183] TRACE[xfsm-manager.c:1295] xfsm_manager_save_yourself_done(): entering[  199183] TRACE[sm-layer.c:232] sm_interact_request(): Client Id = 2bf98da5a-79f4-4f80-9d85-6ec33a782820, received INTERACT REQUEST [Dialog type = Normal]

[  199184] TRACE[sm-layer.c:246] sm_interact_done(): Client Id = 2bf98da5a-79f4-4f80-9d85-6ec33a782820, received INTERACT DONE [Cancel shutdown = False]

[  199184] TRACE[sm-layer.c:304] sm_save_yourself_done(): Client Id = 2fc8acefa-01f6-48d5-8921-853f90ce7595, received SAVE YOURSELF DONE [Success = True]

[  199184] TRACE[xfsm-manager.c:1295] xfsm_manager_save_yourself_done(): entering[  199184] TRACE[sm-layer.c:290] sm_save_yourself_phase2_request(): Client Id = 2bf98da5a-79f4-4f80-9d85-6ec33a782820, received SAVE YOURSELF PHASE2 REQUEST

[  199184] TRACE[xfsm-manager.c:1271] xfsm_manager_save_yourself_phase2(): entering[  199184] TRACE[sm-layer.c:304] sm_save_yourself_done(): Client Id = 2f8e4a142-58b2-450e-a919-288d4f4458b4, received SAVE YOURSELF DONE [Success = True]

[  199184] TRACE[xfsm-manager.c:1295] xfsm_manager_save_yourself_done(): entering[  199184] TRACE[xfsm-manager.c:1554] xfsm_manager_maybe_enter_phase2(): Client Id = 2bf98da5a-79f4-4f80-9d85-6ec33a782820 enters SAVE YOURSELF PHASE2.

[  199184] TRACE[xfsm-properties.c:629] xfsm_properties_set_from_smprop(): -> Set strv (DiscardCommand)
[  199184] TRACE[sm-layer.c:304] sm_save_yourself_done(): Client Id = 2bf98da5a-79f4-4f80-9d85-6ec33a782820, received SAVE YOURSELF DONE [Success = True]

[  199184] TRACE[xfsm-manager.c:1295] xfsm_manager_save_yourself_done(): entering[  199184] TRACE[xfsm-manager.c:1573] xfsm_manager_complete_saveyourself(): Manager finished SAVE YOURSELF, session data will be stored now.

[  199184] TRACE[xfsm-manager.c:1459] xfsm_manager_perform_shutdown(): entering[  199184] TRACE[xfsm-manager.c:303] xfsm_manager_set_state(): 
state is now XFSM_MANAGER_SHUTDOWNPHASE2
[  199184] TRACE[xfsm-properties.c:555] xfsm_properties_set_uchar(): -> Set uchar (RestartStyleHint, 0)
[  199184] TRACE[xfsm-properties.c:555] xfsm_properties_set_uchar(): -> Set uchar (RestartStyleHint, 0)
[  199184] TRACE[xfsm-properties.c:555] xfsm_properties_set_uchar(): -> Set uchar (RestartStyleHint, 0)
[  199184] TRACE[xfsm-properties.c:555] xfsm_properties_set_uchar(): -> Set uchar (RestartStyleHint, 0)

@boobiesinc
Copy link

boobiesinc commented May 19, 2016

I wonder if this patch would fix it http://pkgs.fedoraproject.org/cgit/rpms/xfce4-session.git/commit/xfce4-session-4.10.1-systemd.patch?id=9e8af8b3ee7e8e91817d087e80de29b1af6d4943
But I've no idea how to put it in currently and ... giving up trying to fix this issue.

@boobiesinc
Copy link

Well, saving session never ends! (even though, I had unchecked save session when I tried to logout(above) so you'd think that the fact that saving session is broken shouldn't affect whether logout would work or not)

sessionvirtualbox_nixos2_19_05_2016_23_03_52

This is in ~/.xsessions-errors:
(xfce4-session:894): xfce4-session-WARNING **: xfsm_manager_load_session: Something wrong with /home/z/.cache/sessions/xfce4-session-vbox1:0, Does it exist? Permissions issue?

Only this folder exists:
drwx------ 1 z users 22 May 19 00:06 thumbs-vbox1:0

@boobiesinc
Copy link

I even made that folder myself AND gave full crazy permissions to all and ~/.xsessions-errors still says:

(xfce4-session:1765): xfce4-session-WARNING **: xfsm_manager_load_session: Something wrong with /home/z/.cache/sessions/xfce4-session-vbox1:0, Does it exist? Permissions issue?

I copy pasted it and ls-ed it, it does exist! no typos!

drwx------ 1 z users 22 May 19 00:06 thumbs-vbox1:0
drwxrwxrwx 1 z users  0 May 19 23:19 xfce4-session-vbox1:0
$ l /home/z/.cache/sessions/xfce4-session-vbox1:0 /home/ /home/z/ /home/z/.cache/
/home/:
total 16K
drwxr-xr-x 1 root root    2 May 18 22:57 .
drwxr-xr-x 1 root root  104 May 18 23:21 ..
drwxrwxrwx 1 z    users 668 May 19 23:23 z

/home/z/:
total 68K
drwxrwxrwx 1 z    users  668 May 19 23:23 .
drwxr-xr-x 1 root root     2 May 18 22:57 ..
-rw------- 1 z    users 4.0K May 19 23:23 .bash_history
drwxrwxrwx 1 z    users   64 May 19 23:23 .cache
drwxr-xr-x 1 z    users    0 May 19 23:23 .compose-cache
drwx------ 1 z    users   82 May 19 23:17 .config
drwx------ 1 z    users   22 May 18 23:59 .dbus
drwxr-xr-x 1 z    users    0 May 18 23:59 Desktop
-rw------- 1 z    users   16 May 18 23:22 .esd_auth
drwxr-xr-x 1 z    users   38 May 18 23:59 .gstreamer-0.10
-rw------- 1 z    users 3.1K May 19 23:23 .ICEauthority
-rw------- 1 z    users  144 May 19 10:41 .lesshst
drwxr-xr-x 1 z    users   10 May 18 23:59 .local
drwxr-xr-x 1 z    users   26 May 18 23:22 .nix-defexpr
lrwxrwxrwx 1 z    users   40 May 18 23:22 .nix-profile -> /nix/var/nix/profiles/per-user/z/profile
drwxr-xr-x 1 z    users   10 May 18 23:22 .task
-rw-r--r-- 1 z    users 2.2K May 18 23:22 .taskrc
-rw-r----- 1 z    users    5 May 19 23:23 .vboxclient-clipboard.pid
-rw-r----- 1 z    users    5 May 19 23:23 .vboxclient-display.pid
-rw-r----- 1 z    users    5 May 19 23:23 .vboxclient-draganddrop.pid
-rw-r----- 1 z    users    5 May 19 23:23 .vboxclient-seamless.pid
drwxr-xr-x 1 z    users   20 May 19 02:13 .vim
-rw------- 1 z    users  11K May 19 17:56 .viminfo
-rw------- 1 z    users   50 May 19 23:23 .Xauthority
-rw-r--r-- 1 z    users 1.3K May 19 23:23 .xfce4-session.verbose-log
-rw-r--r-- 1 z    users 1.3K May 19 23:20 .xfce4-session.verbose-log.last
-rw-r--r-- 1 z    users  549 May 19 23:23 .xsession-errors

/home/z/.cache/:
total 4.0K
drwxrwxrwx 1 z users  64 May 19 23:23 .
drwxrwxrwx 1 z users 668 May 19 23:23 ..
drwx------ 1 z users   8 May 19 23:23 mc
drwxrwxrwx 1 z users  70 May 19 23:19 sessions
-rw-r--r-- 1 z users  75 May 19 23:23 xfce4-notifyd-theme.rc

'/home/z/.cache/sessions/xfce4-session-vbox1:0':
total 0
drwxrwxrwx 1 z users  0 May 19 23:19 .
drwxrwxrwx 1 z users 70 May 19 23:19 ..

So yeah, I'm losing my mind :)

Even after a full reboot, same thing:

In ~/.xfce4-session.verbose-log:

TRACE[xfsm-manager.c:303] xfsm_manager_set_state(): 
state is now XFSM_MANAGER_IDLE
TRACE[xfsm-manager.c:1130] xfsm_manager_save_yourself_global(): enteringTRACE[xfsm-manager.c:303] xfsm_manager_set_state(): 
state is now XFSM_MANAGER_CHECKPOINT
TRACE[xfsm-legacy.c:349] xfsm_legacy_perform_session_save(): window has no client leader or supports xspm, skipping
TRACE[xfsm-legacy.c:349] xfsm_legacy_perform_session_save(): window has no client leader or supports xspm, skipping

Full ~/.xsession-errors:

Failure: Module initialization failed
()
xfce4-session: No GPG agent found

(xfce4-session:890): xfce4-session-WARNING **: xfsm_manager_load_session: Something wrong with /home/z/.cache/sessions/xfce4-session-vbox1:0, Does it exist? Permissions issue?

(xfsettingsd:916): xfsettingsd-WARNING **: Failed to get the _NET_NUMBER_OF_DESKTOPS property.

(xfwm4:899): xfwm4-WARNING **: Error opening /dev/dri/card0: No such file or directory

(xfce4-panel:903): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed

(xfce4-panel:903): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed

(xfce4-panel:903): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed

(xfce4-panel:903): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed

Meanwhile mousepad is spamming these while running:

(mousepad:1148): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:1148): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(mousepad:1148): GtkSourceView-CRITICAL **: gtk_source_style_scheme_get_id: assertion 'GTK_IS_SOURCE_STYLE_SCHEME (scheme)' failed

(mousepad:1148): GtkSourceView-CRITICAL **: gtk_source_style_scheme_manager_get_scheme: assertion 'scheme_id != NULL' failed

(mousepad:1148): dconf-WARNING **: failed to commit changes to dconf: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name ca.desrt.dconf was not provided by any .service files

@vcunat
Copy link
Member

vcunat commented May 22, 2016

Mousepad was having problems for quite a long time #14862, but the logout issue is relatively new (a couple months at most) – and there were no systemd, xfce4-session etc. updates in the meantime. Even with closure-size changes I didn't have this problem and now I do.

@vcunat
Copy link
Member

vcunat commented May 22, 2016

Ah, no, it still works on the machine where it worked before. I can only reproduce it on another one which I mostly use just as a build slave. Hang during saving the session is also a point where these two machines differ; however, unchecking the "save session" option during logout doesn't help.

It's a bit strange, as the machines now use the same nixpkgs version, almost identical configuration.nix and similar dotfiles (hardware differs significantly).

@ianfarmer
Copy link

I am also having this problem.

I am looking at the code for xfsm_manager_save_yourself_global in xfsm-manager.c and it looks to me like it relies on the existence of at least one client that needs to save. If there are no clients with state to save then nothing else happens and xfsm_manager_complete_saveyourself is never reached.

What am I missing? There must be some process that is always expected to be attached to the session manager but I don't know what it is or how I lost it.

@ianfarmer
Copy link

Looks like adding:

propagatedBuildInputs = [ xorg.libICE xorg.libSM ];

in libxfce4ui.nix fixes it. These two build dependencies must have somehow been propagated from somewhere else before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants