Disabling Power Saving features via command line

6,150

Solution 1

Many of the settings of the Gnome Desktop are configured through dconf. You can see all possible settings if you install the graphical tool dconf-editor. If you know the settings, you can control them using the gsettings command:

To disable automatic brightness:

gsettings set org.gnome.settings-daemon.plugins.power ambient-enabled false

To disable dim screen while inactive:

gsettings set org.gnome.settings-daemon.plugins.power idle-dim false

To disable automatic suspend:

gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing'
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend'

To undo, i.e., reset these settings to default, run the same commands, substituting reset instead of set, and leaving out the last argument.

Solution 2

I believe you can disable the DPMS or Display Power Management Signaling from the command line.

First to check if it is enabled:

xset -q | awk '/DPMS is/ {print $NF}'

Example:

xset -q | awk '/DPMS is/ {print $NF}'
Enabled

To disable it:

xset -dpms

To enable it:

xset dpms

Hope this helps!

Share:
6,150

Related videos on Youtube

Thomas OHern
Author by

Thomas OHern

I am Me!

Updated on September 18, 2022

Comments

  • Thomas OHern
    Thomas OHern over 1 year

    I manage a number of remote kiosk systems. After upgrading to 20.04 Desktop, I believe some issues are being caused by some of the power saving features that can be disabled via the Settings > Power control panel, but for these systems I only have command line access.

    Is there a way to disable these (in particular Automatic Brightness, Dim Screen While Inactive, and Automatic Suspend) from the command line?

  • Thomas OHern
    Thomas OHern almost 3 years
    Thank you! This was perfect!