You are not logged in.
Issue:
By default bunsenlabs requires a password to login and when the computer sits idle for a period of time the screen locks and requires login.
When left unattended, my laptop battery gets low, and the computer cannot auto shutdown because bunsenlabs prompts for a su password to shutdown while the screen is locked.
Thus the battery drains all the way to zero. I actually fried a laptop battery due to this issue and had to order a new battery. (evidently laptop batteries can only drain to zero so many times) This happened several times to me before I realized what was going on, I figured out what was happening because the last time I caught it right at 1%, and saw that a messagebox was prompting for a su password to perform the shutdown.
Does anyone know how to fix this issue? I did some googling but could not find anything.
Thanks in advance!
Offline
I think bunsenlabs uses xfce4-power-manager
So what do your setting look like when you invoke the below command?
xfce4-power-manager-settings
It is up to you to take control of how your computer is powered not bunsenlabs.
Offline
Hi Steve,
I don't think you understand what I was saying.
The settings in "xfce4-power-manager-settings" are set correctly to shutdown my computer at 10% battery life. Problem is when the screen is locked and the battery drains below 10% the automatic shutdown does not work, because a SUDO prompt pops up (Behind the lock screen, you can't see it) and the computer does not shutdown.
Offline
my bad sorry.
sounds like an authorisation problem with xfce4 power settings.
in a terminal what does
xfce4-power-manager --dump
output ?
Last edited by Steve (2017-11-10 23:01:20)
Offline
Does anyone know how to fix this issue?
Try https://forums.bunsenlabs.org/viewtopic … 171#p62171 but add a second stanza that allows any user to shutdown (ie, replace suspend with shutdown).
Or disable the screen locker by following this guide:
Offline
I am not allowed to disable screen lock (company policy) I use this computer at work and do coding on it. I will take a look at the link you posted as well...
Also here is my output from the dump requested, thank you both...
---------------------------------------------------
Xfce power manager version 1.4.4
With policykit support
With network manager support
---------------------------------------------------
Can suspend: True
Can hibernate: True
Authorized to suspend: True
Authorized to hibernate: True
Authorized to shutdown: True
Has battery: True
Has brightness panel: True
Has power button: True
Has hibernate button: True
Has sleep button: True
Has LID: True
Offline
I created file "inactive-suspend.pkla" in "/etc/polkit-1/localauthority/10-vendor.d/"
But I am not sure what the file permissions should be? is "-rw-r--r--" ok?
I don't see any info on that in the post...
I created the file as super user (had to, did not have permission as a regular user)
I pasted the below info into the file...
If you can let me know what you think is the correct permissions for the file, I will test this and report back if it solves the issue, thank you again!
[Allow inactive users to suspend]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend
ResultInactive=yes
ResultActive=yes
Offline
You don't have to worry about permissions, just use this command to create the file and save it when you're finished:
sudoedit /etc/polkit-1/localauthority/10-vendor.d/inactive-suspend.pkla
Offline
I pasted the below info into the file...
...
[Allow inactive users to suspend]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend
ResultInactive=yes
ResultActive=yes
Don't forget shutdown!
add a second stanza that allows any user to shutdown (ie, replace suspend with shutdown).
EDIT: In fact the Action you want is not shutdown but power-off. IE the Action line should be
Action=org.freedesktop.login1.power-off
This is still untested though.
Last edited by johnraff (2017-11-12 03:02:01)
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
thanks, I have added the "power-off" action as well.
I will see how it goes this week, I always end up leaving the laptop unattended, we will find out if it shuts down properly ;-) Thanks for you help everyone, I will report back with results.
Offline
@12oclocker did that power-off setting fix your issue?
If so, we might consider adding it to the default BunsenLabs configs.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Hi John,
I tested it today and it works.
Please go ahead and add it to the default BunsenLabs configs.
Thanks!
Offline
^Thanks for the feedback.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Your welcome, thanks for the help everyone ;-)
Offline