System cannot set to shutdown when battery in critical level

Hi guys,

I faced a problem which is set the critical action as shutdown and it did not work when battery is in critical level.
I tested in SLED 11 SP2 with below configuration.

gconf-editor

Set the setting under gnome-power-manager as below,

apps/gnome-power-manager/actions:
    -critical_battery = shutdown
  apps/gnome-power-manager/general:
    -use_time_for_policy = false    
  apps/gnome-power-manager/thresholds:
    -percentage_action = 0
    -percentage_critical = 10
    -percentage_low = 30    

I have checked that it is working when -percentage_action set as 10. But it is
not working when set as 0.
I will like to set the critical action as shutdown when battery reach 0% .
The percentage_action is not working when set as 0?
What is the minimum value it can be set ?

Please kindly help .

I haven’t been able to find any info on this. I couldn’t find it in the Gnome Power Manager documentation and I can’t find any mention of a minimum value for percentage_action mentioned in the source code.

I would not expect setting percentage_action to 0 to produce desirable results. That the percentage has reached 0 means it is believed that there is no power left and if there’s no power left then it’s too late to do anything. Also the reported values may not exactly match the actual power left in the battery either, there can be a margin of error on such things, so it’s conceivable the battery may actually run out of power before the reported value hits 0. The default setting for percentage_action is 2 so presumably that’s considered a value which is usually safe. So the logical thing to do would be to just use that default. If you feel lucky, try 1.