PDA

View Full Version : Worse brightness setttings than OS2007


arman68
11-19-2007, 11:19 AM
In OS2007, brightness settings were mostly ok, although it could have been improved with more granularity, and one more step down for a darker screen.

An now, in OS2008, instead of improving on it, we get an even more cut down version, with even less brightness step, and, if I am correct, the darkest setting is not available anymore (I now find it too bright to read books in the dark). to make it worse, there is now a fade effect when changing settings, whcih makes it difficult and slow to adjust the brightness and judge which setting is right.

Grrrrr...

fanoush
11-19-2007, 11:53 AM
Yes, this was reported for 770 http://bugs.maemo.org/show_bug.cgi?id=375 and it is constantly getting worse. Let's wait for real N800 image maybe n810 has different screen so this in not final.

But anyway I really don't know what's wrong with normal slider allowing full range. This is so microsoftish (i.e. they know better what you want). And the new OS even nicely fades into one of the five (!!) predefined levels showing you it is possible but you are simply not worthy to have your own level. Luckily the solution is (relatively) easy with custom kernel http://fanoush.wz.cz/maemo/#backlight but one simply wonders how this is possible and who does such decisions and why.

RipTorn
11-19-2007, 01:03 PM
I would suggest waiting for the official N800 image before judging the settings, don't forget the N810 has a different screen that is brighter and daylight friendly, so I would imagine they arn't tweaked for the N800's screem which isn't as bright and not daylight friendly.

markku
11-19-2007, 04:17 PM
N810 has this ambient light sensor to adjust the light which N800 don't have and since this OS2008 is N810 version it could be that N800 version has more range to adjust manually light.

Saturn
11-19-2007, 06:03 PM
My laptop has a light sensor. When you manually decrease or increase the light the automatic control is disabled. I would expect that the N810 does the same and then you are left with a 5 step setting only. Plus, I don't think they will have different GUIs for the two devices.

It looks quite bad but it seems that it's easy for them to make it better. The question is why they haven't done it already..

technut
11-19-2007, 06:28 PM
Maybe they are afraid some user will turn their screen too dark and not be able to find the control to turn it back up again?

But it could still safely go quite a bit dimmer than what they allow now.

arman68
11-30-2007, 05:57 AM
Yes, this was reported for 770 http://bugs.maemo.org/show_bug.cgi?id=375 and it is constantly getting worse. Let's wait for real N800 image maybe n810 has different screen so this in not final.

But anyway I really don't know what's wrong with normal slider allowing full range. This is so microsoftish (i.e. they know better what you want). And the new OS even nicely fades into one of the five (!!) predefined levels showing you it is possible but you are simply not worthy to have your own level. Luckily the solution is (relatively) easy with custom kernel http://fanoush.wz.cz/maemo/#backlight but one simply wonders how this is possible and who does such decisions and why.

Still the same with 1.2007.44-4, the excessive brightness really hurt my eyes in the dark.

Fanoush, I have tried your solution, but I cannot get it to work on OS2008. Any advice?

fanoush
11-30-2007, 06:13 AM
Fanoush, I have tried your solution, but I cannot get it to work on OS2008. Any advice?

You need to flash different kernel for this.

Try the one inside this
http://fanoush.wz.cz/maemo/kernel-rx-34-2.6.21.0.tar.gz
It has USB OTG whitelist disabled (more usb devices may work), SD/MMC high speed mode (=48MHz) enabled, extended brightness cotrol and crypto api (for PPTP) enabled.

With this kernel the blset script should work. Just run it like
./blset 1 and it should change current brightness setting to minimum possible by hardware. I think you can also change the dim level by
./blset 1 1

GeneralAntilles
11-30-2007, 06:13 AM
Yes, I would be happy if the lowest setting were really the lowest setting. As it is right now, it's stupidly bright.

arman68
11-30-2007, 07:22 AM
Try the one inside this
http://fanoush.wz.cz/maemo/kernel-rx-34-2.6.21.0.tar.gz
It has USB OTG whitelist disabled (more usb devices may work), SD/MMC high speed mode (=48MHz) enabled, extended brightness cotrol and crypto api (for PPTP) enabled.

With this kernel the blset script should work.

Tested and confirmed working. Thanks!

FYI, the software levels on N800 OS2008 are 2,3,4,5. There is one additional one, maximum brightness, which cannot be changed. Assigning a custom hardware level to one of those 4 software levels survives a reboot :-)

Now I have got my n800 (almost) working as it should, no thanks to nokia.

fanoush
11-30-2007, 07:43 AM
FYI, the software levels on N800 OS2008 are 2,3,4,5.
Yes, level 1 is for changing the dim level, it is 3 by default so if you set lowest one to 1 display becomes brighter when it is dimmed without changing dim level too.

There is one additional one, maximum brightness, which cannot be changed.

Strange, level 6 doesn't work? Also when you first select it in UI and then use blset without second parameter it doesn't change too? Then it is a bug on my part.


Assigning a custom hardware level to one of those 4 software levels survives a reboot :-)

Sounds strange too, did you have charger connected? With charger there is no real shutdown and boot.

Also that fancy fade effect still works with their original levels so it is slightly annoying when you change the level in UI. It would need additional non-trivial code to disable this. So far I was lazy to do it.

arman68
11-30-2007, 07:59 AM
Strange, level 6 doesn't work? Also when you first select it in UI and then use blset without second parameter it doesn't change too? Then it is a bug on my part.

Just tested again, and confirm that level 6 does not work, both with and without swlevel. Not a major bug though, since I would probably leave level6 unchanged, to max brightness.

[about reboot] Sounds strange too, did you have charger connected? With charger there is no real shutdown and boot.

Sorry, my mistake. I repeated the test, but this time did a poweroff. Settings were gone after that.

Also that fancy fade effect still works with their original levels so it is slightly annoying when you change the level in UI. It would need additional non-trivial code to disable this. So far I was lazy to do it.

It's only cosmetic ;-)

How can I add a small script that runs at startup, to define custom swlevel?

fanoush
11-30-2007, 08:14 AM
Just tested again, and confirm that level 6 does not work, both with and without swlevel. Not a major bug though, since I would probably leave level6 unchanged, to max brightness.

Yes, confirming, bug fixed and re-uploaded, I had maximum index set to 5 in translation table. I have added dim level to beginning later and forgot to increase maximum index to 6 so the last one was cut off.



It's only cosmetic ;-)

Yes but annoying. Sadly the amount of extra work to fix it is quite high.

How can I add a small script that runs at startup, to define custom swlevel?
easiest is to edit /etc/init.d/rcS and add it somehere to end. Or more correctly you can add new one to /etc/init.d/ and make a soft link to /etc/rc2.d/ beginning with SXX, see how others are done there.

lbattraw
11-30-2007, 10:51 AM
Tested and confirmed working. Thanks!

FYI, the software levels on N800 OS2008 are 2,3,4,5. There is one additional one, maximum brightness, which cannot be changed. Assigning a custom hardware level to one of those 4 software levels survives a reboot :-)

Now I have got my n800 (almost) working as it should, no thanks to nokia.
I messed around with the gconf settings and it's straightforward enough to change the number of steps the applet uses to any value like so:

gconftool-2 -s /system/osso/dsm/display/max_display_brightness_levels 32 -t int

This will (of course) change the number of steps displayed to 32. Unfortunately there is some magic happening somewhere in the OS because regardless of the max brightness setting or even the other key "display_brightness_level_step" (I set it to 1) the levels are only significant from 0-5. Reading /sys/devices/platform/omapfb/panel/backlight_level shows that it automatically scales the value from the applet to 0-127, but only when the value is 0-4 (greater than that and it is always 127). FYI here's the tiny script I put together to show the values in real time:

while sleep 1
do
gconftool-2 -g /system/osso/dsm/display/display_brightness
cat /sys/devices/platform/omapfb/panel/backlight_level
echo "***"
done

"display_brightness" will show the exact value the applet is set to and "backlight_level" the actual value being used. I have a feeling that the applet doesn't directly set the brightness and the hardware management daemon (hald or dsme?) reads the value and does the scaling itself. Incidentally, there's yet another way to set the brightness:

chroot /mnt/initfs
/usr/sbin/dsmetest -l (0-255 for brightness level)
exit

Larry

fanoush
11-30-2007, 10:55 AM
Yes, thi is mentioned here https://bugs.maemo.org/show_bug.cgi?id=375#c3
Sadly it doesn't change the actual values which are set. Or at least this was the case for OS2006 and 7.

fanoush
11-30-2007, 11:44 AM
I have a feeling that the applet doesn't directly set the brightness and the hardware management daemon (hald or dsme?) reads the value and does the scaling itself.

Yes it is one of modules inside dsme.



Incidentally, there's yet another way to set the brightness:
chroot /mnt/initfs
/usr/sbin/dsmetest -l (0-255 for brightness level)
exit
Larry
Yes but also there you can use level number but not the actual values which are written to sys/devices/platform/omapfb/panel/backlight_level
I suppose these values are hardcoded inside dsme.

UPDATE: Looks like I was wrong with this one at least for dsmetest used in OS2008, this really changes /sys/devices/platform/omapfb/panel/backlight_level and values 3-255 map to real value of 1-127. See post #34 below.

fanoush
12-06-2007, 04:22 AM
Also that fancy fade effect still works with their original levels so it is slightly annoying when you change the level in UI. It would need additional non-trivial code to disable this. So far I was lazy to do it.
I have fixed it. It wasn't that hard aftter all. I was thinking before about changing that fade effect with original levels to new fade effect with translated levels which is indeed a bit complex but there is easier solution - ignore all intermediate levels in fading and replace it by final one immediately. Result is same as in some early OS2006 version on 770 - there is no fade effect.

If you don't like those bright flashes when changing brightness with my previous kernel, redownload and reflash kernel and modify blset script to write value + 32768 so it becomes
value=$((hwlevel*256+swlevel+128+32768))

fanoush
01-03-2008, 04:40 AM
Hi, just a warning. I noticed that N800's external SD/MMC slot doesn't work with my custom kernel. See details here http://lists.maemo.org/pipermail/maemo-developers/2008-January/thread.html#13576

Bug is not in my code. Looks like Nokia released only buggy an outdated kernel source so far and we are still waiting for the real thing.

For now you can chose either working external SD slot or using your tablet in the night.

fanoush
01-04-2008, 06:23 PM
OK, today Nokia released kernel source for latest (2.2007.50-2) OS2008 firmware. Here is updated kernel with extended brightness control. It also has high speed (48MHz) SD and MMC modes enabled, full description is here
http://fanoush.wz.cz/maemo/#backlight (see IT2008 on N800/810 part)
Direct download links
kernel (http://fanoush.wz.cz/maemo/kernel-2.2007.50-2-custom.tar.gz) and optional extra modules (http://fanoush.wz.cz/maemo/modules-2.2007.50-2-custom.tar.gz)

fanoush
01-05-2008, 08:20 AM
I have also updated the blset (http://fanoush.wz.cz/maemo/blset) script so it works with kernels with both older and newer version of the patch.

Newer version kills the fading effect but the value sent to kernel is different and incompatible with older kernels on my site. So the script now tries both values.

arman68
01-05-2008, 08:15 PM
Thank you for your great work. You make the IT behave as they should.

flamenmars
01-06-2008, 04:14 PM
Would someone provide some instruction or link me to information on how to flash a new kernel?

flamenmars
01-06-2008, 04:16 PM
also would flashing the kernel reset my current setup (programs, bookmarks, etc)?

GeneralAntilles
01-06-2008, 04:46 PM
also would flashing the kernel reset my current setup (programs, bookmarks, etc)?

No, we're only flashing the kernel here, not the rootfs.

sudo ./flasher-3.0 -k <zImage here> -f -R

-k tells flasher-3.0 where the kernel image is (this is the zImage you downloaded from fanoush's website).
-f tells flasher-3.0 to flash.
-R tells flasher-3.0 to have the device reboot after flashing.


Turn your device off, plug it in with USB.
Run the flasher-3.0 command.
Turn on your device while holding down the Home key.
Let it flash, let it reboot, then remove the USB.


Now you need to get the blset script installed so you can change the brightness levels. Grab it from fanoush's site, stick it in /usr/local/bin (vi /usr/local/bin/blset and paste from the web browser or wget -O /usr/local/bin/blset http://fanoush.wz.cz/maemo/blset), chmod it 755, and test it (not sure if /usr/local/bin is in the search path by default, so you might just copy it over to /usr/bin).

blset [0-127] will change the backlight level of the current software level (the one selected in the statusbar applet). You can change the values of all levels, but as they reset on restart, there's not much point unless you set something up to change them for you on every reboot. Since I pretty much just use it for reading at brightness level 1 at night, I just use blset 1 while on the lowest statusbar applet level.

fanoush
01-06-2008, 05:09 PM
there is also kernel flasher you can use directly on the device
http://fanoush.wz.cz/maemo/#kernelflasher

guide is here, just use different kernel
http://www.internettablettalk.com/wiki/index.php?title=How_to_flash_the_SDHC_kernel_w/out_connecting_to_a_computer

dcarter
01-06-2008, 05:32 PM
has anyone confirmed that fanoush's device-direct onboard flasher works with the latest 2008OS on N800 or N810?

Thanks,

dcarter

fanoush
01-06-2008, 05:46 PM
Works for me with N800 and 770. Since N800/OS2007 days this is no longer specific to any OS200x release. Only 770 needed kernel specific hack to unprotect kernel partition. With N800 kernel partition is writable as is, so no magic is needed and it should work on any system version. Not sure about N810 but in theory it should be same as N800.

am_z
01-06-2008, 05:47 PM
Yes, the flasher works, but the kernel itself makes more SD cards incompatible. My external SD card slot stopped recognizing SD card with his kernel. I guess it's because of the high-speed MMC patch...

GeneralAntilles
01-06-2008, 06:04 PM
Yes, the flasher works, but the kernel itself makes more SD cards incompatible. My external SD card slot stopped recognizing SD card with his kernel. I guess it's because of the high-speed MMC patch...

Have you tried the latest version?

fanoush
01-06-2008, 06:57 PM
My external SD card slot stopped recognizing SD card with his kernel. .
see post #18, previous kernel source released by Nokia was buggy

flamenmars
01-06-2008, 09:53 PM
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
01-07-2008, 04:42 AM
Ok, I managed to flash the new kernel with the Kernel Flasher but I am not sure what to do with the "blset" file.

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
./blset 1 1
./blset 2 1
./blset 3 8
..

This can be even added to some boot script.

am_z
01-07-2008, 09:31 AM
Thanks, guys, I'll try the latest kernel version...

bousch
01-08-2008, 05:31 PM
I haven't flashed this kernel. I just use this script when reading in the dark and it works fine.


#!/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
01-08-2008, 06:01 PM
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/forums/showthread.php?p=102600#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
01-09-2008, 06:28 PM
Wow. It was also mentioned by Larry before
http://www.internettablettalk.com/forums/showthread.php?p=102600#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
01-09-2008, 09:33 PM
(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
01-10-2008, 04:41 PM
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
01-10-2008, 06:03 PM
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/advanced-backlight-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
01-10-2008, 06:38 PM
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/scmsvn/viewcvs.php/trunk/powered/?root=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).

rm_you
01-11-2008, 12:09 AM
Yes, I am currently assuming 0 as sw level, just to set the current...

Thanks for explaining what the kernel is doing! The values I was seeing make a bit more sense now. I thought I was going insane, writing one value to the file and seeing another! >_>

I will look into reverse-engineering that, as it would be much better if the applet worked without the special kernel...

Oh, new version: http://cs.trinity.edu/~acm/debs/advanced-backlight-0.3.tar.gz
And source: http://cs.trinity.edu/~acm/debs/advanced-backlight-0.3-src.tar.gz

The only real changes are a bit of code cleanup (doubt it has a performance impact) and it now checks to see which device it is on, to prevent blanking the screen on an n800 (since it lacks a transflective screen) and confusing the user.

Edit: an strace is here: http://pastebin.ca/850430
I'm not sure how to interpret that... I have done some strace interpretation for an Operating Systems class once, but nothing this complex. :(

fanoush
01-11-2008, 05:02 AM
an strace is here: http://pastebin.ca/850430
I'm not sure how to interpret that... I have done some strace interpretation for an Operating Systems class once, but nothing this complex. :(
Here is my try from 770, your strace build seems to not to resolve syscalls etc which makes it a bit more hard

Nokia-770-36:/# strace /usr/sbin/dsmetest -l 1
execve("/usr/sbin/dsmetest", ["/usr/sbin/dsmetest", "-l", "1"], [/* 47 vars */]) = 0
..
..
..
brk(0) = 0x12000
brk(0x13000) = 0x13000
socket(PF_FILE, SOCK_STREAM, 0) = 3
connect(3, {sa_family=AF_FILE, path="/tmp/dsmesock"}, 112) = 0
fcntl(3, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
write(3, "\f\0\0\0\206\2\0\0\1\0\0\0", 12) = 12
write(1, "brightness reqyest sent!\n", 25brightness reqyest sent!
) = 25
close(3) = 0
_exit(0) = ?

So basically it is the
write(3, "\f\0\0\0\206\2\0\0\1\0\0\0", 12) = 12
line. When starting with -l 2 it becomes
write(3, "\f\0\0\0\206\2\0\0\2\0\0\0", 12) = 12
or when using strace -x (print in hex) it becomes
write(3, "\x0c\x00\x00\x00\x86\x02\x00\x00\x02\x00\x00\x00", 12) = 12
In your output the line is
write(3, "\f\0\0\0\211\2\0\0d\0\0\0", 12) = 12
ASCII (http://www.asciitable.com/) code for 'd' is 100 so it makes some sense. The beginning is perhaps some version handshake or structure size or something.

rm_you
01-11-2008, 06:04 AM
Ok, so all I have to do is write out to "/tmp/dsmesock" something like this? \x0c\x00\x00\x00\x86\x02\x00\x00\x[hexvalue]\x00\x00\x00 Possibly? >_> I will do some testing.

By the way, what did your strace command line look like? On my n800 it is complicated a little bit because strace doesn't exist in the chroot with dsmetest, so I had to do strace -f chroot /mnt/initfs/ dsmetest -l 100

fanoush
01-11-2008, 06:15 AM
Ok, so all I have to do is write out to "/tmp/dsmesock" something like this? \x0c\x00\x00\x00\x86\x02\x00\x00\x[hexvalue]\x00\x00\x00 Possibly?

Yes, not sure about the \x86 since you have different value there.


By the way, what did your strace command line look like?
The line is above, I have compiled static version of strace and copied it to initfs so I could run it inside chroot :-) Maybe there is easier solution but this worked too and I needed it quite a few times inside initfs (like when debugging why dropbear does not start early in usb network recovery mode :-).

rm_you
01-11-2008, 06:33 AM
Err, yes... I guess I saw that and it didn't register. I guess I will have to compile something similar to get info...

Edit: Ok, so here is the code I am trying to use...

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/un.h>

void main()
{
int mysock = socket(PF_FILE, SOCK_STREAM, 0);
struct sockaddr_un name;
size_t size;
int nbytes;

name.sun_family = AF_FILE;
strcpy (name.sun_path, "/mnt/initfs/tmp/dsmesock");
size = (offsetof (struct sockaddr_un, sun_path) + strlen (name.sun_path) + 1);

if (connect (mysock, (struct sockaddr *) &name, size) < 0) {
printf("Error opening socket.\n");
}
else {
nbytes = write (mysock, "\f\0\0\0\211\2\0\0d\0\0\0", 12);
if (nbytes < 0)
{
printf("Write error.\n");
exit(1);
}
shutdown(mysock,2);
}
}

It seems to go? but it doesn't do anything. :(

strace:

Nezumi:~# strace -f ./testdsme
execve("./testdsme", ["./testdsme"], [/* 59 vars */]) = 0
brk(0) = 0x11000
uname({sys="Linux", node="Nezumi", ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40000000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=31704, ...}) = 0
mmap2(NULL, 31704, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40004000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\324 \302"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1086428, ...}) = 0
mmap2(0x41028000, 1118708, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x41028000
mprotect(0x4112c000, 32768, PROT_NONE) = 0
mmap2(0x41134000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x104) = 0x41134000
mmap2(0x41137000, 8692, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x41137000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4000c000
syscall_983045(0x4000c4a0, 0x4000c4a0, 0x41023048, 0x4000cb78, 0x40, 0, 0x48, 0xf0005, 0, 0, 0x41023000, 0xbee853d4, 0, 0xbee85050, 0xfffffff8, 0x41000ad0, 0x20000010, 0x4000c4a0, 0xd02c, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 0
mprotect(0x41134000, 4096, PROT_READ) = 0
munmap(0x40004000, 31704) = 0
mq_notify(1, ptrace: umoven: Input/output error
{...}) = 3
SYS_283(0x3, 0xbee854d8, 0x1b, 0xbee854d8, 0x41022db8) = 0
write(3, "\f\0\0\0\211\2\0\2\0\0\0\0", 12) = 12
SYS_293(0x3, 0x2, 0xc, 0xc, 0x41022db8) = 0
io_submit(0, 0, 0 <unfinished ... exit status 0>
Process 3339 detached

fanoush
01-11-2008, 08:49 AM
Maybe using hex values could confuse you or compiler less (i.e. maybe the output on screen look same but binary data in string is in fact different)?

Also if it still doesn't work you could steal the code from https://garage.maemo.org/plugins/scmsvn/viewcvs.php/trunk/powered/?root=powerlaunch
see dsme.c and .h, void dsme_connect(Powered *server) has slightly different socket setup.

EDIT:
also you may try to drop unneeded /mnt/initfs/ from path to dsme socket but that perhaps won't fix anything

rm_you
01-11-2008, 06:30 PM
Wow, yeah... They've done ALL the work for this. They actually even have a display brightness function. >_>

I'm going to start ripping the code I need from their stuff and converting it to work correctly in my applet. I <3 GPL! :)

rm_you
01-12-2008, 09:43 AM
Ok, well... I decided to just cheat and use system() to run chroot and dsmetest. It's a little laggier than it would probably be if I implimented it myself in C, but it *works* for now.

I will continue trying to get the socket connections and stuff to work in the next day or two. Meanwhile, the newest version of the applet does *not* require a modified kernel, and can be found here: http://cs.trinity.edu/~acm/debs/advanced-backlight-0.4b.tar.gz
And source: http://cs.trinity.edu/~acm/debs/advanced-backlight-0.4b-src.tar.gz

To install, just untar, cd into the directory and run ./install.sh as root (though it should try to auto gainroot itself... thanks for the code for that, fanoush :P).

Note: I'm not sure why, but it seems that when you first add it and enable it, the UIdesktop crashes. Sometimes this happens the first two times you enable/disable it. I have not been able to determine WHY. If anyone has ideas, please share them.

GeneralAntilles
01-12-2008, 03:17 PM
Note: I'm not sure why, but it seems that when you first add it and enable it, the UI desktop crashes. Sometimes this happens the first two times you enable/disable it. I have not been able to determine WHY. If anyone has ideas, please share them.

Just for accuracy's sake.

Gurney
01-26-2008, 09:49 AM
rm_you,

Huge, huge thanks for your work!
Just checked your page and found a v0.5 deb package for your applet. I installed it using the red pill mode, enabled it in the status bar... And here I go. Works like a charm.

No I can use my N800 as a real bedside alarm clock with the dim light at its very minimum. Awesome.

Thanks a lot!

Oh, next step: if it could somehow remind the settnigs wether the unit is plugged or not, that would be, well, just perfect...

Cheers!

GeneralAntilles
01-26-2008, 12:00 PM
I installed it using the red pill mode . . .

This is not a necessary nor recommended step.

qwerty12
01-26-2008, 12:45 PM
This is not a necessary nor recommended step.

In red pill it says , "incompatible". I guess I just have to dpkg it.

@fanoush

Thanks for the link to powerlaunch, I love it :D

@rm_you

Thank you for this but could you please (if possible) add a link to display settings like the original applet.

Either way, thanks for a great program.

rm_you
01-27-2008, 04:41 AM
Yes, the link for the 0.5 deb can also be found along with a tar.gz of the source at https://garage.maemo.org/frs/?group_id=564

I've had to take a break from Maemo in general due to... personal issues recently. Hopefully I will be back at it sometime soon. Meanwhile, if anyone else wants to make improvements, I'd be happy to include patches / etc. Sorry the SVN isn't set up, but I haven't had time recently to do even *that*.

Anyway, I hope you continue to find the program useful! :)

ericbsmith
01-27-2008, 10:26 PM
Anyway, I hope you continue to find the program useful! :)Very useful, thank you.

I tried installing it from the .deb and couldn't, then went into red pill mode and it installed fine. It works great, the only problem I see is that after rebooting the icon on the "taskbar" always shows full brightness, at least until you open the applet and adjust the brightness, then it will report the current state correctly.