I tried gnome3 and gnome3-staging ppas to test running Gnome 3.8. After a while I decided that Gnome 3.8 wasn't for me, so I did a ppa-purge of both the ppas. As described in gnome3-staging ppa page, I also did:

$ sudo apt-get purge libpam-systemd
$ sudo apt-get install libpam-xdg-support

The trouble is, I can't mount my external USB device anymore. When I try to mount it as a user, it fails:

$ udisks --mount /dev/sdc1 
Mount failed: Not Authorized

I am logged in an XFCE session, but the same thing happens in a fallback Gnome session, or from a Unity session. Also, in XFCE, "suspend" and "shut down" menus are grayed out.

I can't also open synaptic package manager from XFCE menus (sudo synaptic works).

After a lot of searching, it seems like it is a policykit issue. I see the following in my ~/.xsession-errors:

(polkit-gnome-authentication-agent-1:5805): polkit-gnome-1-WARNING **: Unable to determine the session we are in: No session for pid 5805

PID 5805 doesn't exist. If I try to start polkit-dnome-authentication-agent-1 from an xterm, I get the same error (different PID):

$ /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
(polkit-gnome-authentication-agent-1:15971): polkit-gnome-1-WARNING **: Unable to determine the session we are in: No session for pid 15971

(the ... lines are warnings from GTK about missing css files etc.).

polkitd is running:

$ pidof polkitd

Is there something I am missing?


For whatever DM you use (kdm, gdm, lightdm, etc.), do the following:

  1. Append the following to the top of the /etc/pam.d/<your_dm> file:

    session required pam_loginuid.so
    session required pam_systemd.so
  2. Logout, Restart X, Login

  3. Check that everything works

  4. Remove fix you applied in step 1.

  5. Logout, Restart X, Login

  6. Check that everything STILL works!

This so-called fix can be removed once you login and check that you have a working system. It apparently allows the upgraded system to complete some process that fixes the underlying problem. Once done (after an admin login?), the fix can be removed.

It also cleared up all the crash reports I was getting directly after login.


PolicyKit was broken somewhere during the update from 13.04 to 13.10, the bugreport is


It contains two workarounds:

  1. If you are using lxdm, append to /etc/pam.d/lxdm these lines:

    session required pam_loginuid.so
    session required pam_systemd.so
  2. or try running

    sudo pam-auth-update --force

After a lot of searching, I decided to reinstall policykit-1 package. When I did sudo apt-get install --reinstall policykit-1, I got a message saying that the package could not be installed because it wasn't available in the repository (sorry about the lack of the exact message!).

So, an I ran:

apt-cache policy $(dpkg -l | awk 'NR >= 6 {print $2}') | less

This showed me that a bunch of packages had versions like 0.105-1ubuntu1pitti2, whereas the available version from Ubuntu repositories were something like 0.105-1ubuntu1. It seems like gnome3 ppa pulled packages from this ppa.

So, I ran the following command (the names of the packages are the ones that had the pitti versions installed):

sudo aptitude install dbus=1.6.8-1ubuntu6 dbus-x11=1.6.8-1ubuntu6 gir1.2-polkit-1.0=0.105-1ubuntu1 libdbus-1-3=1.6.8-1ubuntu6 libdbus-1-3:i386=1.6.8-1ubuntu6 libdbus-1-dev=1.6.8-1ubuntu6 libpolkit-agent-1-0=0.105-1ubuntu1 libpolkit-backend-1-0=0.105-1ubuntu1 libpolkit-gobject-1-0=0.105-1ubuntu1

The above command installed the official Ubuntu repository versions of the packages. The version numbers come from the output of apt-cache policy command above. And now everything is working.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.