Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Broken polkit: no more suspend or mount flash drive
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
pbarill
n00b
n00b


Joined: 08 Jul 2015
Posts: 14

PostPosted: Wed Jul 08, 2015 12:37 am    Post subject: Broken polkit: no more suspend or mount flash drive Reply with quote

Two things don't work anymore, after a number of updates, and they seem related. Since when? A few weeks ago. I thought it would "naturally" go away with subsequent, and it does not.

Issues:

* Unable to suspend (put machine to sleep). Although `pm-suspend` works as root, I cannot click the usual "sleep" icon disappeared from KDE.

* Unable to mount usb flash drive normally (it works as root with `mount`). In KDE, the lower-right popup appears as usual, then where you click the icon to connect (or mount), it says

Quote:
You are not authorized to perform this operation: Not authorized to perform operation (polkit authority not available and caller is not uid 0)


The first issue is annoying. The second one is frustrating.

Seems to be about polkit. When I run `pkaction`, I get

Quote:
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildSignaled: Process org.freedesktop.PolicyKit1 received signal 11


What I did: remerge any installed package that has 'polkit', 'dbus' or 'consolekit' in its name. Result: No effect. Tried downgrading polkit. No effect.

Disclaimer: I know nothing about polkit, other than its existence (so at least it's not about me breaking it). Yes, I glanced at the wiki…

System: amd64 stable, openrc, KDE4, kernel 4.0.5 (had this before updating kernel), with latest updates (deep/bdeps/newuse) as of 1 day ago (webrsync).

I'm out of ideas at this point.
Back to top
View user's profile Send private message
robinmarlow
Apprentice
Apprentice


Joined: 10 Mar 2004
Posts: 167

PostPosted: Fri Jul 10, 2015 10:41 am    Post subject: Reply with quote

I'm in the process of setting up a new laptop and seem to have hit this process too.

In the end I appeared to solve it by adding to :

/etc/polkit-1/rules.d/50-default.rules

Code:
polkit.addRule(function(action, subject) {
   if ((
        action.id == "org.freedesktop.udisks2.filesystem-mount" ||
        action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
        action.id == "org.freedesktop.udisks2.filesystem-unmount-others" ||
        action.id == "org.freedesktop.udisks2.eject-media-system" ||
        action.id == "org.freedesktop.udisks2.eject-media" ||
        action.id == "org.freedesktop.login1.power-off" ||   
        action.id == "org.freedesktop.login1.hibernate" ||   
        action.id == "org.freedesktop.login1.suspend")) {   
       return polkit.Result.YES;
    }
});


Not sure if this will fix your problem, as i don't really understand what the hell polkit is for either.
I use XFCE where I know there is something to do with making sure there is a polkit agent, but if you're on KDE then that should be fine.

Good luck!
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Fri Jul 10, 2015 12:04 pm    Post subject: Reply with quote

I do not have any writing rights for using my optical drive and that laptop is 6 years old. So my group permissions whatever should be alright. I will test later if I get the permissions back when I try your "hack"

Thanks

Now I am able to erase CDRW which I could not before as ordinary user.

This is definitely needed for i3wm with minimal setup
Back to top
View user's profile Send private message
Navar
Guru
Guru


Joined: 20 Aug 2012
Posts: 353

PostPosted: Wed Aug 26, 2015 1:01 am    Post subject: Reply with quote

It wasn't a *kit related issue for me, particularly if you can:
Code:
# echo mem >/sys/power/state
with expected results. The other hint is if Redhat's
Code:
# pm-suspend
script fails when it functioned prior to ~May/June 2015.

If you're running openrc (where the login1 references in prior post wouldn't apply versus systemd naming changes, aka upower-pm-utils vs upower) and possibly have /bin/sh set to anything other than bash, have a look at bug affecting sys-power/pm-utils.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum