maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [Announce - #MCCXII] Timenow: Proximity enabled lock screen (https://talk.maemo.org/showthread.php?t=83682)

qwazix 2012-04-16 15:11

[Announce - #MCCXII] Timenow: Proximity enabled lock screen
 
2 Attachment(s)
Remember the N95? It also had a transflective lcd screen just like the N900, but the N95 screen always showed the time. It was really dim but it was cool for most of the situations.

I also saw the 701, which also has an LCD screen and has an Idle screen with the time and notifications just like the N9, with the backlight turned down to the lowest level.

So I think maybe there is not too much impact on battery life if the N900 showed the lock screen always, (with a white background and black text)

I managed to turn the lock screen on when the device is locked with a script that simulates a power button press, and then dim the screen to 2 or even 0, but the screen turns off again 3 seconds later. I made a loop that triggers the power button again, and I managed to make it last for about 15 seconds, but then the screen turns forcibly off, and back on the next time the loop kicks in. The downside is that the backlight is dimmed 0.7 seconds after "power button pressed" so the light flashes once each 15 seconds which is unacceptable. You can try it by physically tapping the power button continuously. The lock screen eventually turns off.

So I am in search of a dbus command or other script that just forces the screen to turn on, and stay that way.

EDIT: various solutions are in development, check the thread. Most stable seems to be woodys' QBW in page 2. (Link)

EDIT: I am happy to announce timenow, a utility that shows the time on the locked screen when the proximity sensor is uncovered. This should be power friendly enough, but please test and report.

EDIT: fixed some bugs and imported to extras-devel

nicolai 2012-04-16 15:55

Re: [q] turn the screen on programmatically
 
There are some undocumented "screensaver" settings:
http://talk.maemo.org/showpost.php?p...07&postcount=5

qwazix 2012-04-16 19:42

Re: [q] turn the screen on programmatically
 
oh thanks! I had seen that thread but missed these options.I will try and report back.

qwazix 2012-04-17 17:53

Re: [q] turn the screen on programmatically
 
Unfortunately they don't seem to affect lockscreen behavior... It still turns off 3s later

nicolai 2012-04-17 19:05

Re: [q] turn the screen on programmatically
 
inhibit_blank_mode 4 disables screen blank
this works for me.
gconftool -s /system/osso/dsm/display/inhibit_blank_mode 4 -t int

qwazix 2012-04-17 23:13

Re: [q] turn the screen on programmatically
 
does it need a reboot? I run this command as user and then lock the device. Screen turns off. If I press the power button screen turns on and off again after 3 seconds. I am using CSSU testing (latest). Thanks.

MohammadAG 2012-04-18 13:08

Re: [q] turn the screen on programmatically
 
Code:

echo 0 > /sys/class/graphics/fb0/blank
echo 20 > /sys/class/backlight/acx565akm/brightness

You can then write to the framebuffer manually to have it display stuff.
I'm not sure what disables rendering UI elements such as the desktop, probably some code in hildon-desktop

As an example:
Code:

# With the screen on
cat /dev/fb0 > rawscreenshot
# Lock screen with side button
echo 0 > /sys/class/graphics/fb0/blank
echo 20 > /sys/class/backlight/acx565akm/brightness
cat rawscreenshot > /dev/fb0
# You should see your screenshot on the framebuffer

Optionally, this enables the touchscreen.
Code:

echo 0 > /sys/devices/platform/omap2_mcspi.1/spi1.0/disable_ts

MohammadAG 2012-04-18 13:29

Re: [q] turn the screen on programmatically
 
And yep, it's in hildon-desktop:
http://gitorious.org/community-ssu/h...dbus.c#line226
Lines 256-272 stop any redraws from occurring.

qwazix 2012-04-18 13:39

Re: [q] turn the screen on programmatically
 
Excellent! Thanks a lot, it is even better than I expected as I can write whatever I want on the screen.

MohammadAG 2012-04-18 14:26

Re: [q] turn the screen on programmatically
 
If you're not interested in the UI you can play a video in mplayer as well.
Code:

mplayer -vo fbdev videofile


All times are GMT. The time now is 15:16.

vBulletin® Version 3.8.8