maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Worse brightness setttings than OS2007 (https://talk.maemo.org/showthread.php?t=11958)

flamenmars 2008-01-07 01:53

Re: Worse brightness setttings than OS2007
 
Ok, I managed to flash the new kernel with the Kernel Flasher but I am not sure what to do with the "blset" file.

I do not understand how to execute "chmod" command. I am new to running terminal commands and run a windows machine.

fanoush 2008-01-07 08:42

Re: Worse brightness setttings than OS2007
 
Quote:

Originally Posted by flamenmars (Post 122215)
Ok, I managed to flash the new kernel with the Kernel Flasher but I am not sure what to do with the "blset" file.

Code:

chmod +x blset
./blset 1

You need becomeroot or R&D mode enabled or run it as root.

Also to preset different levels one can use something like
Code:

./blset 1 1
./blset 2 1
./blset 3 8
..

This can be even added to some boot script.

am_z 2008-01-07 13:31

Re: Worse brightness setttings than OS2007
 
Thanks, guys, I'll try the latest kernel version...

bousch 2008-01-08 21:31

Re: Worse brightness setttings than OS2007
 
I haven't flashed this kernel. I just use this script when reading in the dark and it works fine.

Code:

#!/bin/sh
# use gainroot to become root and relaunch itself
if [ `id -u` != 0 ] ; then
#if not already root, call itself as root
TTY=`tty`
[ "$TTY" = "not a tty" ] && unset TTY
exec sudo gainroot <<EOF
if [ -z "$TTY" ] ; then exec $0 $* ; else exec <$TTY $0 $* ; fi
EOF
exit $?
fi
chroot /mnt/initfs dsmetest -l 3
exit


fanoush 2008-01-08 22:01

Re: Worse brightness setttings than OS2007
 
Quote:

Originally Posted by bousch (Post 123563)
I haven't flashed this kernel. I just use this script when reading in the dark and it works fine.

Wow. It was also mentioned by Larry before
http://www.internettablettalk.com/fo...600#post102600
This definitely did set just one of steps already present in brightness applet in OS2006 and 7. I have finally tried it now with OS2008 initfs and this really changes the real value so you can go to the minimum!!

The only problem is that the value does not stick and once you change it in the applet you need to run dsmetest again. But still quite usable.

So now someone could really hack different brightness applet which would set any custom level via dsmetest -l and no ugly kernel hack would be needed :-)

bousch 2008-01-09 22:28

Re: Worse brightness setttings than OS2007
 
Quote:

Originally Posted by fanoush (Post 123590)
Wow. It was also mentioned by Larry before
http://www.internettablettalk.com/fo...600#post102600

Actually the first part of the script came from a post by you I believe and the dsmetest command came from Larry's post. I'm happy I can read in the dark again. Thanks to you two!

I did not want to flash the kernel because I boot from SD. Or isn't that a problem?

dubwise 2008-01-10 01:33

Re: Worse brightness setttings than OS2007
 
(noob interrupting)
OK, so where's the gentlest place for a new N810 owner
to learn what scripts are and how to use them, and,
ideally, how to turn them into something I can click on?
(/interrupting)

fanoush 2008-01-10 20:41

Re: Worse brightness setttings than OS2007
 
Quote:

Originally Posted by bousch (Post 124338)
I did not want to flash the kernel because I boot from SD. Or isn't that a problem?

No it is not related and is no problem. But if you are happy with running dsmetest you don't need it. BTW, I am lazy to reflash original kernel, how does it work when display goes off or you have screen dimming enabled? Does it restore your changed level or you need to run dsmetest again?

rm_you 2008-01-10 22:03

Re: Worse brightness setttings than OS2007
 
I made a fairly simple statusbar applet for doing the brightness changes on the modified kernel... You can try it out here:
http://cs.trinity.edu/~acm/debs/adva...klight-0.2.tar
Remember: ONLY USE THIS WITH THE MODIFIED KERNEL! I have heard of it blanking screens on the normal kernel.
To use it, you will need to untar it and then login as root and run the install script. It puts the files in the right places and changes a few permissions that are necessary. You *may* need to open the control panel -> Panels configuration and enable it, or it may just open itself automatically... YMMV.

I'd love to hear some feedback on this... There are a few known issues, however:
Until you first set the brightness with the applet, it does not know the correct current brightness for display purposes (not a big deal, really... just annoying for me). Also, it is not a nice little popdown box like the real brightness applet, it opens a whole new window. If someone knows how to get a HildonControlbar to work inside a GtkMenu, PLEASE tell me. Also, it *will* allow n800 users to set 0 brightness, which will blank the screen, so if you don't know what you are doing, be careful. I will probably be fixing that soon, however.

I'm very fuzzy on exactly what this is even doing, as I just copied the math operations from the blset script, but if someone feels like explaining how I could set the brightness with the dsmetest thing, then I could try to impliment that. I should have the source up in a bit, I'm just going to clean it up first (it's my first GTK app, and it's kind of embarassing at the moment >_>).

fanoush 2008-01-10 22:38

Re: Worse brightness setttings than OS2007
 
Quote:

Originally Posted by rm_you (Post 125055)
I'm very fuzzy on exactly what this is even doing, as I just copied the math operations from the blset script, but if someone feels like explaining how I could set the brightness with the dsmetest thing, then I could try to impliment that.

Well, you could strace dsmetest and see what it writes to /tmp/dsmesock. See similar reverse-engineered dsme code here
https://garage.maemo.org/plugins/scm...ot=powerlaunch
or otherwise you need to run 'chroot /mnt/initfs dsmetest -l <level>' as root.

As for my kernel patch - it implements translation table for values known to be written to /sys/devices/platform/omapfb/panel/backlight_level by original Nokia applet (or more correctly said - by dsme daemon). Then the kernel fakes that such value is written (and returns it on read so it looks genuine) but it writes custom value to hardware instead. Also the fade effect killing simply ignores other values than those known to be written by the applet so the intermediate states do nothing.

Since values 0-127 are valid for the sys file, manipulation of translation table is done by writing values 128 and up. That's why the formula adds 128.

In your applet you can perhaps change just current level i.e. use 0 as sw level in the formula (and maybe preset dim level too).


All times are GMT. The time now is 19:22.

vBulletin® Version 3.8.8