[SOLVED] Display sleep timeout is limited to 30 seconds

I’m on FP Open OS since the beginning, and I have -1 in sleep_timeout…

1 Like

Interessant. I came from the original Fairphone OS Version 1.5.1. Via the fastboot-way I installed Fairphone Open OS 16.07.1 (by wiping all data etc.). After that I reinstalled a backup of all apps (not system!) I made with adb. The system itself was completely factory reset.

Maybe Fairphone Open OS 16.07.1 sets sleep_timeout to 30000 if there was no value set before (means: installing that version from scratch instead of upgrading from a previous one)? But thats true speculation. For sure I can say: With Fairphone OS 1.5.1 there was NO problem with any timeout.

Update: I just greped all the firmware-img’s for a string like “sleep_timeout” in combination with “30000” but can’t find anything. I know, it’s a poor-mans approch of finding information. :wink:

Regarding the naming: I thing people say “Fairphone OpenSource OS” because at http://code.fairphone.com/ the terminus “Open Source” is part of every second line. :wink:

It was called FP Open Source OS earlier and many people referred to it as FPOSOS, until someone got the idea, it would be important to rename name it. Now officially it is called FP Open OS.


I did it with your given shell and root command line. Crossing fingers without thinking about risks that you decently mentioned. Your wonderful explaination made me try it and I was rewarded with functional display sleep time. First I thought this bug should be better corrected by another FP release. But after reading this topic to the end my hope vanished and got afraid I could wait for ever.

thanks, @Wico

Cannot confirm this behaviour. I’m on Open OS 16.07 (updated from clean installed 16.06) and rooted of course.

I confirm the bug.
I installed the 16.07 update with fastboot and -w option (to erase userdata and cache) as explained here (method 2) and the sleep_timeout property had a value of 30000.

I upgraded to 16.07 from a Fairphone OS release compiled from source in February 2016 using this docker environment : https://github.com/justfortherec/fairphone2-build-env

The command proposed by @Wico fixes the bug.

Thanks, @Wico

The code suggested in post 11 by Wico worked for me as well. Thank you @Wico !

I’m rather late on this one (due to other problems with my phone, see first post), but this was fixed with update 1.6.2, right?

I just installed the update and when I change the respective setting, the screen now stays on for as long as I set it.

I don’t think this was the same issue. I used FP OS more than half a year without this problem described here. In my case it was subsequently an issue only by switching to FP Open OS.

A factory reset fixed this for me. (Settings -> Backup & Reset -> Factory data reset) - though obviously this deletes all your apps / data.

Now back on Fairphone OS 1.6.2 with the screen staying on for however long I choose.

A factory reset (on FPOS 1.5.1) was actually the point where this started for me. :sweat_smile:

1 Like

I think it is rather a bug with the update procedure itself than with single FPOS or FPoOS releases. However I cannot realize whether this issue has been checked by FP support e.g. as part of Bug Report. If the simple and nice root-line from @Wico could be offered as a secure procedure also without root and distributed as an official fixing tool this would be a fast and simple fix for it.

Sounds good. May I ask a couple of stupid questions?
Where do I find config-db? By shell do you mean ADB? Can I use Terminal Emulator instead?
(I didn’t know you have to be a computer scientist to use a fairphone … :wink:)


to answer your questions:

  1. The config-db itself is a sqlite-file located under /data/data/com.android.providers.settings/databases/setting‌​s.db (if I’m right). If you manually modify it / delete it, your phone will most likely be broken afterwards. To manually modify a sqlite-file you need some sqlite tools, see: https://en.wikipedia.org/wiki/SQLite, https://www.sqlite.org/cli.html
    But as I said, that gives you the power to do great stuff - or to break stuff.

  2. By shell I mean a real shell, e.g. by using sshdroid to open access via SSH -> loggin in -> gain root -> enter the command mentioned. Or by installing one of the terminal-emulators (there are plenty) -> gain root -> enter the command mentioned. I have not tried the adb-shell method. Might work too.

Important: Using the “settings” tool is way more safe (still dangerous) than modifying the sqlite-db directly.

And yes, that stuff can be complicated - but see it as an opportunity: If one is willing to invest the time to understand how things are working, then the possibilities are unlimited. And fairphone does a very great job by not placing any obstacles in the way. Imho.

But: Before you do anything, read up the docs, understand what you do, create backups, thing twice and have a plan B in case you break something!


1 Like

Yes, you can use the app Terminal Emulator:

  1. After installing and starting the app you have to type su. After pressing Enter you will be asked if you want to give root access to the app. You have accept this.
  2. Now you see the $ changing into # in a new line. Here you can type Wicos command above: settings... Notice, that there is a Space before -1.

So I just type settings put secure sleep_timeout -1 after su?
Anywhere? Don’t I have to be within that config-db?

And, yes, it’ great to have highly customizable phone, I have been using Cyanogenmod for a long time.

In the first line after the $ I wrote su. In the second line after the #, that appeared after I pressed Enter, I wrote settings put secure sleep_timeout -1.
On my phone it worked without anything else.


ADB daemon is a privileged Android application (= privileged Unix user, but still lower than root). It can modify system settings without root access, but I don’t know if it can also edit secure settings. It may work too.

Also, just like @lklaus, I have -1 by default, and I used FPoOS since the first version (well, I used to compile it before the first official release)

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.