Void-packages: XFCE PolicyKit Agent error

Created on 20 Mar 2020  路  25Comments  路  Source: void-linux/void-packages

Screenshot_2020-03-20_11-36-22

I know this is getting a bit old now, but
sudo xbps-install -Su elogind dbus-elogind polkit-elogind
does not fix the issue after a successful installation.

I can't even mount flash drives with nemo or xfce4-places-plugin, as if elogind was never installed.

I installed Void Linux as of yesterday with the void-live-i686-20191109-xfce.iso network install
immediately installing xorg, xfce4, and lxdm on first boot.
so everything's minimal and up to date

I've run this same installation a few months ago and everything worked fine, so whatever broke was recent.

Most helpful comment

So the iso should definitely be updated. It is interesting to realize how seldom a polkit agent comes into play in XFCE. However we need to have the pokit agent working correctly instead of not having one installed. At the risk of being slightly off-topic, at some point a polkit agent will likely be needed for XFCE or any of the common graphical DEs. Arch uses polkit-gnome instead for this I believe. Any polkit action which has authorization set to "auth_admin" will fail without an agent. The obvious example is Gparted.

All 25 comments

I have not followed any recent saga on this, just this post, but did a fresh install of XFCE yesterday and could not duplicate the problem. It should not matter I think, but I installed elogind, dbus-x11, polkit, instead of the packages you referenced. Elogind should work whether you activate the runit service or not. Polkitd and dbus (x11) services should be activated. Sorry it this repeats previous info.

hopefully my issue caused an unnotified fix (I've been waiting for a response on the matter)
I'll try again when I'm able to test, as I'm currently using the machine I tested with for other things atm.
(the machine I'm installing to can't boot USB drives, and I'm having an issue burning CDs with my primary as they can't be read)

and regarding that elogind bit, I actually tried running elogind as a runit service and was greeted with repeating errors in the tty...
I found out it doesn't work as a runit service, but as a dbus service, and that's the issue I'm reporting here.

and yeah dbus-elogind force-installs dbus
found that out when going through some reddit issues other people were having:
https://www.reddit.com/r/voidlinux/comments/cm7pt1/exercise_caution_ongoing_issues_with_polkit/

I don't have ConsoleKit2, so I didn't worry about that option
hopefully the issue is fixed now :)

I can replicate it over here, I didn't do anything special: installation was done using void-live-x86_64-musl-20191109-xfce.iso, local install, single partition with swap. After rebooting to the system that message appeared, I thought "_meh, probably something to do with older packages, let me update first_", but the same thing appears with an up to date system and searching around led me here.

Wouldn't this warrant new installation media to be created with sane defaults? As it stands users that choose any of the Xfce images are greeted with that message and have a faulty system upon booting.

If that PolicyKit agent is no longer needed or the login manager is to be replaced, new users would appreciate not having to deal with it.

Conditionally, I would have to say YES if the iso now always leads to this error, but I have not installed with it. I did see that error when the transition to elogind from consolekit2 happened, but not recently. You should have polkit, elogind, dbus(-x11), and yes, you should still have xfce-polkit-agent. Does the notification pop-up immediately after starting xfce, or just when using thunar or other file manager and mounting drives?

I still haven't been able to test as of recent, but if it's the same as when I last tested, elogind doesn't do anything like it used to

if you previously installed elogind and updated, it should still work, but if installing anew, it doesn't work at all

It appears right when you get to the desktop @furryfixer, i.e. if you have a graphical login manager you don't see it until you log in, but it can also be seen just by booting the live media. I recorded it in virtual because it's easier to share it here, but I'm seeing the same behavior in the machine:

Void, live boot

For the machine I resorted to installing a base system with the minimal image and build from there. I'm using lightdm with both dbus and elogind services installed and enabled. polkit is installed, but I didn't need to install the Xfce agent. Mounting or rebooting for example work fine.

^ same with me on the i386 machine I last tested with
and yes that's with elogind installed

if you updated packages back when elogind actually worked, then it would still continue to work
I have another installation with exactly this on another i386 machine that works just fine after updates.
but any new installations don't work

So the iso should definitely be updated. It is interesting to realize how seldom a polkit agent comes into play in XFCE. However we need to have the pokit agent working correctly instead of not having one installed. At the risk of being slightly off-topic, at some point a polkit agent will likely be needed for XFCE or any of the common graphical DEs. Arch uses polkit-gnome instead for this I believe. Any polkit action which has authorization set to "auth_admin" will fail without an agent. The obvious example is Gparted.

The obvious example is Gparted.

or mounting drives with nemo (and likely other FMs) or the Places panel plugin
flash drives are a nightmare without elogind ;)

Any polkit action which has authorization set to "auth_admin" will fail without an agent. The obvious example is Gparted.

Indeed! I just checked, installed GParted and unless there was a polkit agent installed and running I wasn't able to run it as an unprivileged user through the menu.

xfce-polkit worked just fine however... It was the only change I performed besides installing GParted. After a reboot (for some reason it didn't like just logging out) I could launch GParted as expected. Maybe the only thing missing in the live environment and installations from it is elogind? I'll make an installation from the Xfce live in a VM and see if I can pinpoint the issue.

Everything is working fine for me so far otherwise.

Well, that was fast, it seems installing and enabling elogind is enough to have the system running as expected.

  • Local install from the live media.
  • Update the system (xbps-install -Syu) and reboot.
  • Install elogind and enable its service (ln -s /etc/sv/elogind /var/service/).
  • I just rebooted at this point, but done, no more polkit error when entering the desktop.

Checked GParted as well and the authentication dialog appears as expected. I wonder what I did or didn't do when I installed the system, but it wasn't that big of a deal installing things manually 馃槅

I've been following this thread from a distance for a few days. Is the conclusion that xfce should include elogind?

@KaoDome that actually doesn't work for me
if you do Ctrl+Alt+F1 I get a constant error log every second, I forget what with

Oops. I did not fully realize that the forementioned iso did not install it. Yes, going forward, I think nearly any Void installation would need elogind to be installed as the default. I question whether the runit elogind service needs to be activated in many cases though.

And you're correct once again @furryfixer! The service seems not to be needed, as long as it is installed xfce-polkit acts as expected. @ericonr's conclusion is correct as well, at least that's what I see here.

What do you have in tty1 @Tcll? Mine don't show anything out of the ordinary, both the VM and machine running Void (elogind was still enabled at the time of the recording):

Void, polkit

@furryfixer:

Yes, going forward, I think nearly any Void installation would need elogind to be installed as the default.

Well, i wouldn't go that far. :-) We actively support people not wanting to use elogind. (i don't use it myself - it's a large piece of software, with a large attack surface, that i simply don't need.) Merely having it installed, without the service enabled and running, is enough for it to get activated via D-BUS, which people might not want, and which might cause surprises, e.g. when they find that acpid and elogind are fighting over power management.

That said, it does seem to me that elogind should be included in flavours that apparently need it, such as the XFCE flavour.

What do you have in tty1

unfortunately the machine I need to switch HDDs on to test the OS with has been in constant use for more than 26 days...
I'll need either some free time or a new machine capable of running a VM before I'll be able to answer that. :(

EDIT:
but to describe, every second it prints an error in tty1

I'll have to do some reading on elogind, didn't know it had such a bad reputation.

It is part of systemd right? If memory still serves polkit existed before that, it may be possible to look at the code of xfce-polkit and find out what's up, but for now I have found no way to have it work without elogind.

Switching to other authentication agents seems to require more dependencies, at least the ones of GNOME and MATE require something else (they complain about being unable to determine the session they're in when run through a terminal).

@Tcll: I wonder what the problem could be on your end, but there's no hurry we'll see it at one point or another ;)

@KaoDome: elogind is a standalone version of systemd-logind; it can be used to provide a logind for things which require one, like GNOME, without having to pull in the entire systemd system.

Flexibeast, I understand. However for live-installs or most installation iso's, I think the default should be to include it, with rare exceptions. There are likely to be far fewer issues/complaints from the casual user, and the well-informed such as yourself :) can easily remove it.

KaoDome, elogind is a substitute for systemd/logind, which allows software developed with a logind dependency, to run without systemd itself. There are pros and cons, but the consolekit2 alternative is becoming more difficult to use all the time.

@furryfixer: i'm definitely sympathetic to where you're coming from, as i made a similar argument in #21862. :-) However, as the comments there show, the policy is to not include something unless it's strictly needed. elogind is definitely not strictly needed on a base install, and casual users are much more likely to be using a flavour. In cases where users build up their system from a base install, elogind could theoretically be added as a dependency of xfce4, or whichever other DEs require it. (Whether pkg-committers think that's a good idea is another issue.)

Also, yeah, CK2 is unmaintained (last commit to the repo was in December 2017).

  • Install elogind and enable its service (ln -s /etc/sv/elogind /var/service/).

if you do Ctrl+Alt+F1 I get a constant error log every second, I forget what with

welp, finally got a chance to test this, and it looks like whatever updates were done "fixed" the error
guess we'll never know what was logged in tty1 cause it no longer shows

buuuuut the polkit error still shows up, and that's with both dbus-elogind and polkit-elogind installed as well

it seems I have fixed my issue
what you want is dbus and elogind separately
what you don't want is dbus-elogind as that's broken and does nothing
polkit-elogind is not needed

when creating services, you specifically want dbus as a service, not elogind as dbus starts that
my issue was that dbus was not a service after installation
which is weird as I don't believe it's a service on my other installation

but this wouldn't be my first time dealing with inconsistent results after having nemo fix itself without internet
(I'll post a screenshot if anyone wants me to)

EDIT:
nvm, I just got my other installation hooked up
and I'm wrong, dbus is very much a service
but I don't remember setting it up >.>

welp... there ya go, ya need dbus as a service with elogind installed to fix the issue

e1b0938f2a11d7fd03419300255705076a91c79c

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LinArcX picture LinArcX  路  5Comments

Vaelatern picture Vaelatern  路  4Comments

Vaelatern picture Vaelatern  路  6Comments

no2spam picture no2spam  路  4Comments

whoizit picture whoizit  路  4Comments