maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [fixed] notification LED going dim when bright ambient light (https://talk.maemo.org/showthread.php?t=91849)

joerg_rw 2013-11-23 06:26

[fixed] notification LED going dim when bright ambient light
 
the bug with indicator LED not shining anymore when device gets locked in bright daylight (>1000LUX) got identified and fixed:

Create a backup of /usr/lib/mce/modules/libfilter-brightness-als.so, just in case
Code:

IroN900:~# ll /usr/lib/mce/modules/libfilter-brightness-als.so
-rw-r--r-- 1 root root 36952 2013-11-23 07:45 /usr/lib/mce/modules/libfilter-brightness-als.so
IroN900:~# md5sum /usr/lib/mce/modules/libfilter-brightness-als.so
b061876d6fe017bd3baeff2600c800e9  /usr/lib/mce/modules 1/libfilter-brightness-als.so

cp /usr/lib/mce/modules/libfilter-brightness-als.so \
/usr/lib/mce/modules/libfilter-brightness-als.so_backup

in any hex editor of your choice (e.g. mc) open the file /usr/lib/mce/modules/libfilter-brightness-als.so for edit, and change byte at address 0x86a8 from 0x00 to 0x05
save the file with byte changed

[edit] (probably needs sed-gnu! busybox sed seems to fail)
Code:

IroN900:~# od -A x -tx1 /usr/lib/mce/modules/libfilter-brightness-als.so \
|grep '05 00 00 00 05 00 00 00 00 00 00 00' \
&& sed -i -E 's/\x05\x00\x00\x00\x05\x00\x00\x00\x00\x00\x00\x00/\x05\x00\x00\x00\x05\x00\x00\x00\x05\x00\x00\x00/' \
    /usr/lib/mce/modules/libfilter-brightness-als.so \
&&od -A x -tx1 /usr/lib/mce/modules/libfilter-brightness-als.so|grep '0086a0'

0086a0 05 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00
0086a0 05 00 00 00 05 00 00 00 05 00 00 00 00 00 00 00

ATTENTION! This command sequence is a really nasty hack that doesn't check for byte position at all and simply replaces ALL occurences of the pattern. In this specific case the pattern _seems_ to be unique, so it works. No warranty though! if with the above code another than the 0086a0 line is printed, something went terribly wrong and you should restore your backup you made (mv /usr/lib/mce/modules/libfilter-brightness-als.so_backup /usr/lib/mce/modules/libfilter-brightness-als.so)

cheers
jOERG

http://mg.pov.lt/maemo-ssu-irclog/%2...11-23T06:20:48
Code:

als_profile_struct led_als_profiles_rx51[] = {
        {
                { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } },
                { 0, 0, 0, 0, 0, 0 }
        }, {
                { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } },
                { 0, 0, 0, 0, 0, 0 }
        }, {
                {
                        { 32, 64 },
                        { 100, 1000 },
                        { -1, -1 },
                        { -1, -1 },
                        { -1, -1 },
                }, { 5, 5, 0, 0, 0, 0 }
        }, {
                { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } },
                { 0, 0, 0, 0, 0, 0 }
        }, {
                { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } },
                { 0, 0, 0, 0, 0, 0 }
        }
};


freemangordon 2013-11-23 12:17

Re: [fixed] notification LED going dim when bright ambient light
 
care to elaborate how to fix that on the source code level? I will put some time on mce these days and will include that fix.


All times are GMT. The time now is 21:43.

vBulletin® Version 3.8.8