Description of problem: whenever I login into my GUI (I am using XFCE), xfce-polkit crashes: ben@trouble2> /usr/libexec/xfce-polkit ** (xfce-polkit:15774): CRITICAL **: 00:23:47.492: polkit_agent_listener_register_with_options: assertion 'POLKIT_IS_SUBJECT (subject)' failed (xfce-polkit:15774): GLib-GObject-CRITICAL **: 00:23:50.115: g_object_unref: assertion 'G_IS_OBJECT (object)' failed [1] ben@trouble2> polkit daemon looks alright: root@trouble2> systemctl status polkit /home/ben/tmp ● polkit.service - Authorization Manager Loaded: loaded (/usr/lib/systemd/system/polkit.service; static; vendor preset: enabled) Active: active (running) since Tue 2018-05-22 00:04:54 CEST; 25min ago Docs: man:polkit(8) Main PID: 1136 (polkitd) Tasks: 16 (limit: 4915) Memory: 26.2M CGroup: /system.slice/polkit.service └─1136 /usr/lib/polkit-1/polkitd --no-debug May 22 00:04:54 trouble2 polkitd[1136]: Acquired the name org.freedesktop.PolicyKit1 on the system bus May 22 00:04:54 trouble2 systemd[1]: Started Authorization Manager. May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:3: action=[Action id='org.freedesktop.login1.suspend'] May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=1466 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=t> May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:3: action=[Action id='org.freedesktop.login1.hibernate'] May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=1466 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=t> May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:3: action=[Action id='org.freedesktop.DisplayManager.AccountsService.ReadAny'] May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=1466 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=t> May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:3: action=[Action id='org.freedesktop.DisplayManager.AccountsService.ReadAny'] May 22 00:04:57 trouble2 polkitd[1136]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=1466 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=t> lines 1-20/20 (END) Version-Release number of selected component (if applicable): [1] ben@trouble2> rpm -qa |grep polkit polkit-0.114-1.fc28.x86_64 polkit-libs-0.114-1.fc28.x86_64 polkit-pkla-compat-0.1-12.fc28.x86_64 xfce-polkit-0.2-12.fc28.x86_64 polkit-qt5-1-0.112.0-13.fc28.x86_64 polkit-qt-0.112.0-13.fc28.x86_64 ben@trouble2> How reproducible: everytime Steps to Reproduce: 1. install xfce4 2. login into XFCE and start /usr/libexec/xfce-polkit Actual results: ** (xfce-polkit:15774): CRITICAL **: 00:23:47.492: polkit_agent_listener_register_with_options: assertion 'POLKIT_IS_SUBJECT (subject)' failed Expected results: a working polkit session Additional info: i am happy to provide more information
Created attachment 1439786 [details] strace /usr/libexec/xfce-polkit &>tmp/stace_xfce-polkit
maybe xfce-polkit is only the victim of something else, that went wrong, because this should "just work", right: ben@trouble2> systemctl --user Failed to list units: Process org.freedesktop.systemd1 exited with status 1 [1] ben@trouble2>
the cause for failing "systemctl --user" might be ben@trouble2> echo $XDG_SESSION_ID ben@trouble2> ben@trouble2> rpm -qa |grep systemd ~ python3-systemd-234-5.fc28.x86_64 systemd-container-238-8.git0e0aa59.fc28.x86_64 fail2ban-systemd-0.10.2-1.fc28.noarch kcm_systemd-1.2.1-10.fc28.x86_64 systemd-pam-238-8.git0e0aa59.fc28.x86_64 oci-systemd-hook-0.1.16-1.git05bd9a0.fc28.x86_64 systemd-bootchart-233-1.fc28.x86_64 systemd-libs-238-8.git0e0aa59.fc28.x86_64 python-systemd-doc-234-5.fc28.x86_64 rpm-plugin-systemd-inhibit-4.14.1-7.fc28.x86_64 systemd-238-8.git0e0aa59.fc28.x86_64 libreport-plugin-systemd-journal-2.9.5-1.fc28.x86_64 python2-systemd-234-5.fc28.x86_64 systemd-udev-238-8.git0e0aa59.fc28.x86_64
it looks like that the XDG_SESSION_TYPE must be set to (in my case): XDG_SESSION_TYPE="wayland dbus-run-session xfce4-session" but it was also empty. as I have set it manually and started a xfce-session manually afterwards, policykit worked right away without complaining. now I only have to carve out, where XDG_SESSION_TYPE is getting set...
(In reply to ben haubeck from comment #4) … > now I only have to carve out, where > > XDG_SESSION_TYPE > > is getting set... The XDG environment is usually a job of the display manager. Can you reproduce with gdm as the default of the XFCE spin? https://www.reddit.com/r/archlinux/comments/4efx1h/how_to_actually_start_gnome_on_wayland_without_a/ (In reply to ben haubeck from comment #1) > the cause for failing "systemctl --user" might be > > ben@trouble2> echo $XDG_SESSION_ID > ben@trouble2> It seems you try to use Wayland. Indeed, systemd has a special handling for Wayland sessions. https://www.freedesktop.org/software/systemd/man/pam_systemd.html You could also try the tweaks mentioned for ArchLinux, no guarantee for Fedora: https://wiki.archlinux.org/index.php/GNOME#Wayland_sessions Well, I don't have any idea if upstream has any intentions to support wayland.
Sorry, better try with lightdm instead of gdm or whatever display manager.
so, you aren't supposed to call /usr/libexec/xfce-polkit directly, so thats not expected to work. You can try running something with 'pkexec' to test, ie 'pkexe id' should call pokit, using xfce-polkit and ask you for authentication then run 'id'. I'm assuming thats not working anymore, which makes me think this might be a duplicate of bug 1581495 Do you have 'pam-kwallet' installed? If you disable or remove that package and logout/back in does it start working?
Maybe modify autostart desktop file to properly work with wayland? But I got information that XFCE in general does not support wayland (yet), officially.
@Kevin, comment7: you are great, thx a lot! after removing pam-kwallet that was just there (I assume), because I tried out KDE years ago, it worked flawlessly again! thx! ben
Thank all the folks that tracked down that other bug. ;) It was a weird one... Glad it's working for you now. *** This bug has been marked as a duplicate of bug 1581495 ***