28

I upgraded to 16.04 [Ubuntu Gnome]. I am using a Lenovo Y700 with a GTX960M.

After suspend or closing the lid I ended locked outside the login after that message appeared. It happened twice today, I suspect the problem arises when closing the lid, not when using the suspend button hitting alt button while hitting the power button onscreen. Using open source NVIDIA version 364.19 nvidia-364.

1
  • Same pb. on Ubuntu 18.04 LTS
    – SebMa
    Oct 19, 2020 at 10:13

4 Answers 4

42

It's caused by lm-sensors. Click on the thermometer indicator (which is lm-sensors) -> Preferences -> Providers. Then untick 'Enable support of udisks2'. That seems to make it go away. (Source)

screenshot

5
  • 6
    In case there is no thermometer icon: the desktop app is called psensor, can be started from command line or via unity/gnome
    – knb
    Mar 13, 2018 at 8:03
  • 2
    Would've never guessed this was the culprit. Thank you!
    – Gabriel
    Oct 22, 2018 at 14:34
  • 2
    What is udisk2? I've also suddenly been seeing this weirdness since I've been suspending the machine instead of shutting down. If I uncheck it, what am I losing? Sep 11, 2019 at 19:53
  • 3
    seems to work on Ubuntu 20.04 as well 👍
    – spirit
    Aug 25, 2021 at 19:16
  • Any idea how to do this via the command line? It's impossible to get to this dialog with the SMART data pop-up happening every few seconds.
    – mihow
    Feb 8, 2023 at 6:10
2

Issue still present in Ubuntu 20.

The JavaScript fix presented by @WiR3D does not work as is. The location of the rules.d directory has changed and can be found in /usr/share/polkit-1/rules.d/00_user_hacks.rules.

Editing the file in this new location and going to standby mode does seem to fix the issue, but after some time, the password is required again when going again in standby mode.

I will try to investigate more deeply this issue and update this discussion once an appropriate fix is found.

2

Original here: https://ubuntuforums.org/showthread.php?t=2274234&page=2&p=13522130#post13522130

this is caused by PolKit, and if you do want the sensors, you can write a custom rule:

Depending on your distro, create a custom polkit rule. Ubuntu 20.04 and up

sudo mkdir -p /usr/share/polkit-1/rules.d/
sudo touch /usr/share/polkit-1/rules.d/00_user_hacks.rules

Ubuntu 18.04 and lower

sudo mkdir -p /etc/polkit-1/rules.d
sudo touch /etc/polkit-1/rules.d/00_user_hacks.rules

The file is actually JavaScript, which makes it pretty easy to modify if you have that experience.

const CUSTOM_PERMISSIONS = {
    // fixes udisk2 issue with lm-sensor where it prompts for root password after suspend -> resume
    "org.freedesktop.udisks2.ata-smart-update": polkit.Result.YES
};

polkit.addRule(function (action, subject) {
    if (subject.user == "YOUR_USERNAME_HERE" && action.id in CUSTOM_PERMISSIONS) {
        return CUSTOM_PERMISSIONS[action.id];
    }

    return polkit.Result.NOT_HANDLED;
});

You can just add other custom rules into the CUSTOM_PERMISSIONS object and it will be handled.

2
  • Do I need to restart a service for this new rule to be taken into account ?
    – SebMa
    Oct 19, 2020 at 10:15
  • @SebMa you would likely have to restart since other systems interact with polkit, but i'm not sure.
    – WiR3D
    Feb 15, 2021 at 9:05
1

In my case psensor caused the problem. Just kill psensor.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .