Cinnamon only displays power is critically low when the power level is 0%. This only gives me a few seconds to responds. It then shuts down the laptop. This is insane. Like MATE, it should have an option to let user choose when to notify the user/at what power level. Cinnamon should notify the user of the low power level at 15% of power.
You could use gsettings to change it if you have old upower < 0.99
$ gsettings list-recursively org.cinnamon.settings-daemon.plugins.power |grep critical
org.cinnamon.settings-daemon.plugins.power critical-battery-action 'hibernate'
org.cinnamon.settings-daemon.plugins.power percentage-critical 3
org.cinnamon.settings-daemon.plugins.power time-critical 300
you can raise time-critical warning level to 15 minutes
gsettings set org.cinnamon.settings-daemon.plugins.power time-critical 900
to set a higher percentage (machine will go into hibernate or suspend mode)
gsettings set org.cinnamon.settings-daemon.plugins.power percentage-critical 9
if you have new upower >= 0.99 you will need to manually edit /etc/UPower/UPower.conf
@dalcde I see little point in adding this feature as it will be obsolete when mint updates to the newer ubuntu base with newer upower.
@leigh123linux I used this one:
gsettings set org.cinnamon.settings-daemon.plugins.power percentage-critical 15
It notifies me when the power level is 15%. That's great. But when I make it 25% or 40%, it doesn't notify me. Why is that?
I have suffered several times from the laptop being shutdown as the latest versions of Cinnamon seem to have lost the setting to specify the action when the battery is critical and I have not found an easy way to set the 'critically low' level in Mint 18 Sarah/Cinnamon 3.0 which seems to be far too low to avoid deep cycling.
I therefore wrote a simple applet which allows one to set a level at which the machine starts to shutdown (Suspend to Memory as currently set up) with plenty of warning - the shutdown level is 2/3 of the initial alert level.
The applet normally shows the percentage charge on a colored background which is:
When the Alert level is reached a modal alert is put up which can not be missed as no input can be made until it is cleared.
When the shutdown level is reached a normal alert box is put up with options of an immediate suspend or cancel - if nothing is done it suspends 30 seconds latter.
The alert level can be set to between 10% and 40% of full by a slider on the left click menu or in the configuration screen. The refresh rate can also be set in the configuration screen.
The intention is to allow the possibility of leaving suspend with enough battery to close programs and shut down after powering up from suspend without a charger after an accidental unattended suspend.
The Battery Applet with Monitoring and Shutdown (BAMS) can be found at https://cinnamon-spices.linuxmint.com/applets/view/255. In the longer term this feature could be satisfied by modifications to the existing battery applet.
Completely agree with the @tranjeeshan : warning the user that they have about 10 seconds to plug in the charger or save their work is insane.
@leigh123linux it is 2017 now, how much longer are you planning to wait?
@pdcurtis Thanks for your applet, it is great, if a bit too flashy (got used to B&W applets) :smile:
@DavidNemeskey There is nothing to fix unless you include removing critical action (upower controls it not cinnamon).
@leigh123linux Care to elaborate? Can I set up a warning when the battery is at, say, 10%? Is there an applet / UI for upower? Will the whole applet be removed? If not, then what better place to set up such a warning?
@DavidNemeskey
Pre upower 0.99 you can use the old method (gsetting), no point in adding gui support for a dead upower version.
With upower 0.99+ you have to edit /etc/UPower/UPower.conf , currently no distro or DE has a gui to edit the file unless you include gedit/xed editor :-)
@DavidNemeskey Sorry it is too flashy but it needs to attract attention, shades of grey could be missed and sound can be turned down. You can always edit the .css file.
@leigh123linux At least the /etc/UPower/UPower.conf has very clear comments so one could edit it in xed - are there any downsides to making changes there?
@pdcurtis Upower package update could overwrite the edit.
@leigh123linux I had a look at the settings in UPower.conf. The settings, which I assume to be the defaults, are:
PercentageLow=10
PercentageCritical=3
PercentageAction=2
As I see, these are not honored on the GUI, because the only warning I get is at 0%. Is there an issue already for this problem, or should I open one?
@DavidNemeskey post the output for the whole file
Without the comments:
[UPower]
EnableWattsUpPro=false
NoPollBatteries=false
IgnoreLid=false
UsePercentageForPolicy=true
PercentageLow=10
PercentageCritical=3
PercentageAction=2
TimeLow=1200
TimeCritical=300
TimeAction=120
CriticalPowerAction=HybridSleep
I also see nothing until the 2% level is reached and that is so low I am not sure if anything happens other than an attempt to suspend.
I assume that Upower fires some event at those the earlier levels rather than generating an action itself such as a notification which would be desktop dependent - how does/should Cinnamon respond to those events?
Is it just Cinnamon that has these problems or do they occur in Ubuntu and other desktops using Upower? I had to buy a new battery probably because of flattening it completely a few times as even suspend uses some power hence my applet.
@tranjeeshan @DavidNemeskey @pdcurtis
I can confirm the no notification for critical power action on fedora, this used to be handled by cinnamon-settings-daemon.
@clefebvre Could the power applet in cinnamon be altered to handle notification?, adding it to c-s-d would be a lot harder and require many ifdefs to support old and new upower.
@leigh123linux
Just to clarify, c-s-d still has the code and gsettings-schema and c-s-d did not remove the code to adapt to new upower api like gnome did.
So what happens when battery gets below critical level (and c-s-d is set to suspend) ? Who takes action? c-s-d or upower? Can c-s-d still ignore upower.conf and still suspend ?
@leigh123linux ?
Most helpful comment
I have suffered several times from the laptop being shutdown as the latest versions of Cinnamon seem to have lost the setting to specify the action when the battery is critical and I have not found an easy way to set the 'critically low' level in Mint 18 Sarah/Cinnamon 3.0 which seems to be far too low to avoid deep cycling.
I therefore wrote a simple applet which allows one to set a level at which the machine starts to shutdown (Suspend to Memory as currently set up) with plenty of warning - the shutdown level is 2/3 of the initial alert level.
The applet normally shows the percentage charge on a colored background which is:
When the Alert level is reached a modal alert is put up which can not be missed as no input can be made until it is cleared.
When the shutdown level is reached a normal alert box is put up with options of an immediate suspend or cancel - if nothing is done it suspends 30 seconds latter.
The alert level can be set to between 10% and 40% of full by a slider on the left click menu or in the configuration screen. The refresh rate can also be set in the configuration screen.
The intention is to allow the possibility of leaving suspend with enough battery to close programs and shut down after powering up from suspend without a charger after an accidental unattended suspend.
The Battery Applet with Monitoring and Shutdown (BAMS) can be found at https://cinnamon-spices.linuxmint.com/applets/view/255. In the longer term this feature could be satisfied by modifications to the existing battery applet.