← Back to team overview

ubuntu-phone team mailing list archive

powerd - keep from suspending or keep screen on

 

We implemented some changes to powerd last week that let you have more control over when the screen turns off or the device suspends. A few people have been asking me about this because when you're developing on the phone, it can be annoying when it suspends all the time. Here's how to modify it:

1) To keep the device from suspending only, just grab an active request:

powerd-cli active

You can later clear the request with powerd-cli clear <cookie>, which active will return to you. FYI - We are changing the cookie format in an upcoming release. This active state request will not affect the screen timeout, it will only prevent suspending.

2) If you want to change the activity timeout, which will also keep the screen on, you can set the value to between 5 and 3600 seconds.

sudo apt-get install libglib2.0-bin
sudo dbus-launch gsettings set com.canonical.powerd activity-timeout <time in seconds>

After doing that you need to reboot the phone or simply restart powerd:
sudo initctl restart powerd



Also a note on bugs, if you have problems, please file bugs, but we will need clear repro steps and most importantly, the contents of /var/log/upstart/powerd.log. If possible, clear that log file (just remove it), reboot the device and repro the bug with a clean log.

--

Matthew (Matt) Fischer
LP: http://launchpad.net/~mfisch
IRC: mfisch