Skip to main content
Topic: [SOLVED] Polkit issues (maybe) (Read 724 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Polkit issues (maybe)

Since yesterday my DE's (KDE) partition GUI tool doesn't ask for password at launch and it tells me this: "Partition Manager requires privileges in order to work. Please refresh the devices and authenticate when prompted".

I'm guessing the problem lies with polkit because then I tried using GParted and it tells me that no authentication agent was found, but I do have it:
Code: [Select]
world/polkit-kde-agent 6.0.2-3 (plasma) [instalado]
Thanks in advance.



Re: Polkit issues (maybe)

Reply #1
i suppose check to see if the agent is running:
Code: [Select]
pidof polkit-kde-authentication-agent-1
if it isn't, trying to run it directly might shed some light:
Code: [Select]
/usr/lib/polkit-kde-authentication-agent-1

in the unlikely event of a missing dependency, paccheck (from pacutils package) can be handy:
Code: [Select]
sudo paccheck | grep "unsatisfied"

Re: Polkit issues (maybe)

Reply #2
Thank you for helping @ncmprhnsbl. Pidof shows no output so I'd guess the agent is not running... but then htop/KDE's System Monitor show me that it is running.

This is what I got when trying to start it from a terminal:
Code: [Select]
New PolkitAgentListener  0x5f6895e04f60
Adding new listener  PolkitQt1::Agent::Listener(0x5f6895dc9290) for  0x5f6895e04f60
Listener online
Authentication agent result: true
I'm still not sure what the problem is. I've already reinstalled polkit-related packages to see if that did anything but nothing happened.

Paccheck didn't show any missing dependencies.

Re: Polkit issues (maybe)

Reply #3
Pidof shows no output so I'd guess the agent is not running... but then htop/KDE's System Monitor show me that it is running.
strange, if htop says so it should be so...   typo with pidof maybe?
i'm running kde (dinit flavour) here and it's working as it should.
what happens if you run pkexec in a terminal?

Re: Polkit issues (maybe)

Reply #4
Pidof shows no output so I'd guess the agent is not running... but then htop/KDE's System Monitor show me that it is running.
strange, if htop says so it should be so...   typo with pidof maybe?
i'm running kde (dinit flavour) here and it's working as it should.
what happens if you run pkexec in a terminal?
Sorry for taking time to answer again. I use fish instead of bash/zsh so that was why pidof didn't show any output, I tried using pidof in bash and the PID for the agent is 772.

Pkexec gives me this:
Code: [Select]
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ====
Authentication is needed to run `/bin/fish' as the super user
Authenticating as: asus
Password:
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ====
Error executing command as another user: Not authorized

This incident has been reported.
I also use Dinit (with turnstile) in case that's relevant.

Re: Polkit issues (maybe)

Reply #5
I've found out that the real culprit was turnstile (or the D-Bus user service file I used from dinituserservd) I disabled it and polkit is working fine again. I think that I installed it and set up the PAM module correctly... to be fair they tell you that if the pam_elogind script is used polkit may not authenticate because it may not treat something running in turnstile as a local session.

Thanks for helping me @ncmprhnsbl. I'm going to mark it as solved now.

 

Re: [SOLVED] Polkit issues (maybe)

Reply #6
I re-installed Artix again yesterday (latest weekly base iso and Dinit) and pkexec still gives me the same error (tried running it in KDE and in a terminal) as before... which is weird because I didn't install turnstile at all.

My guess is that an update to a package related to polkit is the reason behind it (like elogind or pam) or maybe something else in the configuration files for pam?

It's not a world-ending issue, but I want to know why it's happening and see if there's something I could do about it.

EDIT: Tested pkexec with the agent for KDE in Arch and it works fine.