Comment 24 for bug 1768038

Revision history for this message
Tom Hutchison (hutchy68) wrote :

Try running this command>>>

$ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-sleep-mode-on-battery -n -t int -s 1

Then run>>>

$ xfconf-query -c xfce4-power-manager -lv

Make sure you see>>>

... /xfce4-power-manager/inactivity-sleep-mode-on-battery 1

Listed in the output

Worked for me on a fresh install of Xubuntu 18.04 and it has been tested on other laptops. Also solved 16.04 issue too.

It seems as if this statement above in one of the replies... "In xfce4-power-manager-settings, there is a GComboBox to select the sleep mode on battery. This combo box displays only one item, suspend, because hibernate is disabled. The "inactivity-sleep-mode-on-battery" setting is only updated after the GComboBox changed signal fires. The changed signal never fires if there is only one item in the combo box, so selecting suspend does not change the sleep mode from hibernate." ...is a good explanation. I tried changing the xml file in config, but that failed. Reverted back, executed the command line commands and xml file showed the proper config, magically it started working after a reboot.

I also ended up having to run>>>

$ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-sleep-mode-on-ac -n -t int -s 1

Which solved the issue of suspend on ac too.