mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-12-25 06:41:08 +02:00
Fixed blanking state set by PowerSaver
Previously 1 was written to the sysfs "blank" pseudo-file, but that selects blanking state FB_BLANK_NORMAL, which does not power down the display. Instead, we should write 4 for FB_BLANK_POWERDOWN. Note that in the OpenDingux kernel, any non-zero blanking state would power down the display, so we got the desired behavior in practice, but this is not according to spec.
This commit is contained in:
parent
7e2bdcc922
commit
51685e4758
@ -74,7 +74,9 @@ void PowerSaver::removeScreenTimer() {
|
||||
#define SCREEN_BLANK_PATH "/sys/class/graphics/fb0/blank"
|
||||
void PowerSaver::setScreenBlanking(bool state) {
|
||||
const char *path = SCREEN_BLANK_PATH;
|
||||
const char *blank = state ? "0" : "1";
|
||||
const char *blank = state
|
||||
? "0" /* FB_BLANK_UNBLANK */
|
||||
: "4" /* FB_BLANK_POWERDOWN */;
|
||||
|
||||
int fd = open(path, O_RDWR);
|
||||
if (fd == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user