When I try to suspend/reboot my Ubuntu 18.04, I get a dialog asking for a password:
"Authentication is required for suspending [respectively: rebooting] the system
while an application asked to inhibit it"
How do I avoid this?
This answer actually works for me. But that question involved shutdown-inhibition due to multiple users. In my case, the cause is an interrupted, then successfully completed, Ubuntu upgrade from 17.10. So there is probably some lock file, and ignoring lock files is dangerous, so I would like to understand what is happening first.
Data
(Here is one minute from my syslog. As seen there, I started the suspend process at 18:19:00, was asked and then gave the password. The laptop was suspended, and then I resumed it.)
lslocks
shows dozens of ordinary application locks from Eclipse, Slack, Chrome, Firefox, Atom, and KeePassX. Other than that, there are these lines. Maybe thedpkg
lock means something?
COMMAND PID TYPE SIZE MODE M START END PATH
lvmetad 322 POSIX WRITE 0 0 0 /run...
thermald 817 POSIX WRITE 0 0 0 /run...
cron 863 FLOCK WRITE 0 0 0 /run...
dpkg 24505 POSIX WRITE 0 0 0 /...
whoopsie 1651 FLOCK WRITE 0 0 0 /run/lock...
- The command
sudo lsof |grep dpkg
shows this.
lslocks
– cmak.fr Jun 26 '18 at 08:17sudo lsof | grep dpkg
– cmak.fr Jun 26 '18 at 13:32sudo killall dpkg; sudo rm /var/lib/dpkg/lock; sudo sudo dpkg --configure -a
-- If it doesnt work, try hardersudo killall dpkg; sudo rm /var/lib/dpkg/lock; sudo rm /var/lib/apt/lists/lock; sudo rm /var/cache/apt/archives/lock; sudo sudo dpkg --configure -a
– cmak.fr Jun 26 '18 at 15:42