![]() |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
well if you now have the brightness "simple" in mce and you have run the uninstall script then it should be normal, else go and manual delete the custom_brightness in init.d and event.d then it is out, if that does not help something else is causing you screen problem, the 2x custom_brightness scripts are all that is controlling this.
But even if they are not deleted your N900 will normally still blank screen as normal Did you run the uninstall? |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Does mod1 also have that "fading" issue?
It really takes too long in my opinion with that second method, but I don't like the light sensor either =/ Problem :D |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
the simple brightness (mod 1), is a built in function that nokia left in (but never made a option in settings), this works just as normal, you have the 5 settings, but now they are more balanced and no more light sensor that makes the screen increase/decrease brightness (on random if you ask me)
|
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
From where does that fade delay from your custom_brightness than come from? Possible to eliminate that as I like the way it gives me full control and has a nice widget too :)
|
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Quote:
i'm not installing your custom_brightness yet. i only follow your opening post |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
i chamged the brightness mode as you said and everything is ok..i adjust the brightness with the brightness applet in the status menu..no more weird fadings in the sunlight and more bright steps so the visibility increases..thanks for all the effort and information you made available for noobs like me..just one question..so many threads and posts saying that the screen light is responsable for great amount of battery consumption and recomendations in keeping low light to prevent battery drain..even so you ssy that with this new mode even in the brightest level battery drain only increases 1%as i understood..is that a fact?
|
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Quote:
sLumPia Now im lost to what you are trying to say.... ed_boner Thanks, and it is abit more then 1%, can't remember where i wrote that, but long ago i measured my N900 (Battery - meter - N900) and it was a VERY low increase in power consumption from "near no light" to "max brightness", but of course it still counts if you want to squeeze every last drop of battery life out of you N900. |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
@dr_frost_dk,
I mean I follow your 1st post, editing mce.ini I am not following your 2nd post, installing the customer_brightness if your previous post (yesterday at 15:25) was a reply to my post, than it mean that i haven't install cutom_brightness so i think my problem occur not because custom_brightness. so let me explain my problem again: I have edit mce.ini and replace filter_brightness_als with filter_brightness_simple. I reboot my phone and set the brightness the 1 bar (lowest), but the screen bright is not what I expected, it still to bright. When I run "killall mce" command, then the screen bright become very low, just like what you expect from brightness level 1. why is this? is there any other file to edit? |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
brightness simple uses the 5 normal steps and have the values 51,102,153,204,255 which is nicely spaced, and yes 51 (value 1) can be a bit bright for some, my custom brightness (post #2) allows you to use any value from 2-255, 2 being backlight just on.
Also not that i cap it at minimum 2, before PR1.3 i capped it at 1, nokia made some wired edit where after PR1.3 0 & 1 are no backlight where before it was only 0 So if you want more control you have to use custom brightness, im still using it since i like the times where you have to "go dark" and set the brightness to 2, this in very low light conditions just barely light's up the screen, useful in many areas, also im using the widget designed by NightShift79 and it has 4 presets (that you can edit your self), mine are 2,50,160,255 since they fit different occasions. |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Do I have to install queen beecon widget? I don't really want widget
Can I just run your custom_brightness app from command lain? Another question, why did the screen brightness always become very low when I run "killall mce" command without me changing screen brightness level from the settings? But the screen brightness will going up again if I run "killall mce" again or if I open the brightness setting from system settings? |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
i never would have guessed..just tested in sunlight..this mod is awsome!!..really..cssu stuff..thks a lot doc!
|
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
hi dr_frost_dk,
I try to run your custom_brightness_init script as a background process. it work most of the times, but the screen brightness will randomly set back to nokia's default value (in my case 51). why is that? the script itself still running. how you ever encounter this when you use the qbw? |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
hi dr_frost_dk,
I try to run your custom_brightness_init script as a background process. it work most of the times, but the screen brightness will randomly set back to nokia's default value (in my case 51). why is that? the script itself still running. have you ever encounter this when you use the qbw? |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
well there are 2 scripts, 1 script and 1 to start the other...., and no my brightness never goes to "stock" settings.
|
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
ok, I put "sh your_custom_script" to another file and running it as background program, and it's works like a charm.
thanks. |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Hi all,
dr_frost_dk, I'm currently using your custom brightness script with QBW. However I think it's better to strike at the source of the problem. I am a software developer specializing in C/C++ so it was pretty easy to find what's bothering us in filter-brightness-als (from the MCE source code, link has been posted before http://meego.gitorious.org/meego-mid...master/modules). I believe it would be better to have ALS enabled (at least for the sake of the keyboard backlight control). Firstly, here's how filter-brightness-simple works and why: filter-brightness-simple.c, line 91: Code:
/* Convert to percentage */ Then this will be converted (by another function) to the 0-255 value by simply multiplying by 255, that's how the 5 equal steps are obtained. However the filter-brightness-als works differently and has the so-called "profiles" that decide what % of brightness the screen should be at from ambient light AND brightness setting. There are a bunch of different profiles for different hardware (i think that's in order to be combatible with all NXXX models), but for Nokia n900, which uses the TSL2563 ambient light sensor, it is easily fount that the following profile is used: filter-brightness-als.h, line 402: Code:
static als_profile_struct display_als_profiles_rx51[] = { 1. The brightness setting (Minimum = 1, Maximum = 5) 2. In each setting we have intervals that indicate the ambient light domain (probably in lux), example: { 160, 320 } means from 160 to 320 ambient light value. I guess here -1 means infinite ambient brightness (or in any case very bright ambient, like in direct sunlight) 3. For each domain there is a setting for the actual screen brightness in % of maximum. For example, the profile for Normal (brightness setting 3) states: Code:
{ /* Normal */ I guess the gaps between neghboring brightness domains are for hysteresis - maintaining the same screen brightness stably not only based on current ambience but also on previous level. In practice this means that to switch to a different brightness the phone needs to be exposed to a substantially different ambience lighting (you've certainly all experienced that. annoying, innit?) I find that in a bright office the ALS usually reports between 200 and 300 lux, which would put us in the { 160, 320 } range, which would give us the following percentages depending on brightness setting: 10%, 20%-40%, 30-60%, 90%, 100% So here it is, the 30%-90% between setting 3 and 4 - that's your huge brightness gap and this is what should be solved as a general solution. Furthermore, I believe this can be extracted into some external config file and loaded on boot (or MCE restart) so that to give almost limitless flexibility to the user (not that hard to do either). Also another solution would be to put fixed steps for screen brightness but still use ALS methods for keyboard backlight. Once the desired solution is implemented, compilation shouldn't be an issue as MCE ahs it's own properly written makefile. I will keep you updated with my progress, but there are a couple of things that set me back: 1. I have no experience with creating .deb packages and submitting them to the repository (that's where such a patch belongs); 2. my usb broke off and I haven't been able to re-attach it yet (still waiting for some replacement parts and tools). This means I can't use the device in R&D mode properly. 3. I would choose to compile the modules on the device itself but can't install the package build-essential for some reason (will look into that more thoroughly once I get started). P.S.: this is my first post (yes, I finally got around to register) and would like to take this oportunity to acknowledge the huge contribution of dr_frost_dk to the n900 community and to my personal user experience. Lately, whatever problem I have with my n900 google seems to invariably point to one of his posts. Thank you. |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Thanks for the kind words :), and da*m you know alot more then me on the programming front :), i still basically use scripts, other then that i used to use QBasic (yes that thing from far far away)
But yes please keep me/us updated on this, i would be nice to have a real solution instead of this "patch" i made, it works but can still be improved (referring to my own custombrightness witch is the one im still using). |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Yeah, it would be great to switch off or do something about display brightness regulation but leave everything else (LED pattern brightness) intact!
I know I am being overly sensitive here but isn't that what the N900 is all about, pleasing even the weirdest geek? :D |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Quote:
First some bad news: I still haven't repaired my usb port, and although installed the build-essential package, still can't compile the MCE modules because of required environment flags and some missing headers (I guess). Good news is I will try setting up the dev environment on a PC this weekend. It was a pain in the ***** as I remember it but will try nevertheless. Now I want some opinions. Dr_frost_dk didn't like the original filter-brightness-als in part due to it switching display brightness in an annoying way (when you actually wouldn't want it to change). First question is to those that are annoyed by this (as Dr_frost_dk): will less switching steps (ambient-related, and set further apart, more stable in theory) be ok or just do away with ambience-varied brightness altogether? Secondly, would we be able to agree upon the 5 brightness settings and hardcode them, or go all the way and make them configurable from some .ini file somewhere? |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Well, I wouldn't mind if automatic brightness would be disabled completely. But ini-customizable brightness levels and thresholds sound good too. It makes sense to dim the display in low light situations, but I'd like to determine "low light" myself and not let my phone do it (wrongly) for me. :)
|
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Well for me disabling the light sensors role on display light is a very good start, and if an .ini file can be made witch can control the 5 normal steps then go for it, my 4 steps right now are 2, 50, 160, 255 (custom brightness)
2 - for night time reading and not disturbing anybody, like wife sleeping :) 50 - still for low light settings but easier on the eyes 160 - Normal usage (set 99% of the time) 255 - Very bright sunlight that needs to be drowned out. |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Hi all!
I'm afraid I won't be modding the mce module filter-brightness-als. I've just now noticed that the source code that was advised here (twice, if you consider my reposting) is for MEEGO mce. Although related, it's NOT the module that is used in Maemo. From an article on a blog (http://cool900.blogspot.co.uk/2009/1...n-maemo-5.html) I gathered that Nokia moved parts of other proprietary software into MCE (I hope that was done in order to open the sources for that other stuff), but as a result MCE was open-source in Diablo but is a proprietary bit in Fremantle. Pity. This wiki page contains details: http://wiki.maemo.org/N900_Resources Quote:
Quote:
Quote:
It should still possible to do what I have in mind by at least 2 ways - adapt the MeeGo mce to fremantle. Hard to do since the maemo mce is a black box and it would be really hard to properly test that the replacement is doing everything the original did. - patch the Maemo MCE binary - basically edit it in hex replacing the bytes that are responsible for brightess thresholds and levels. Considering the circumstances, this should be much easier to do and less risky. However, I won't be able to do that until I repair my usb port because MCE es an essential part of the phone OS and breaking it would most probably require a reflash, which I can't do at the moment. For now I'm limited to exploring the binary. Sorry. Edit: found it! In filter-brightness.als.so, at offset 0x8378, in small endianness, there it is: the struct containing the ambience levels and their corresponding brightness. Will keep you posted. |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
1 Attachment(s)
Victory is ours, lads!
Attached is the patched libfilter-brightness-als.so Mode of installation (manual): 0. Make sure you've uninstalled dr_dk_frost's the custom brightness. If you don't - nothing terrible will happen, you just won't see any change. Also be mindful as this has not been thoroughly tested yet. YOU COULD BRICK YOUR DEVICE! 1. BACKUP YOUR ORIGINAL FILE!! Code:
$ sudo cp /usr/lib/mce/modules/libfilter-brightness-als.so /usr/lib/mce/modules/libfilter-brightness-als.so.backup Code:
$ unzip libfilter-brightness-als.so.zip 3. If you're sure you've backed up the original module, go ahead and overwrite it with the modified one. First go to the folder containing the downloaded .so file. Assuming it was to your home folder: Code:
$ cd Code:
$ sudo killall mce 5. To check that it is working, do the following: - set display brightess to bright (level 4) (through system settings, of course) - on the n900 open a console and type Code:
$ cat /sys/class/backlight/acx565akm/brightness 6. For your convenience install the Simple Brightness Applet. Code:
$ sudo apt-get install simple-brightness-applet Level 1 (Minimum): should be at brightness 2, 12, 25 in ambiences lower than 17600 lux (use the Luxus widget and the above command to check). At ambiences brighter then that - screen should go to 0 brightness. I believe the transflexiveness of the screen should render it readable anyway. Level 2 (Economy): A stable 20% brightess for all ambient levels. This translates to 51 on the 0-255 scale. Level 3 (Normal): stable 30% or 76 on the 0-255 scale. Level 4 (Bright): stable 62% or 158 on the 0-255 scale. Level 5 (Maximum): no change from original version. Stable 100% or 255 on the 0-255 scale. Unfortunately, there's no automatic install, .deb package or repository entry yet. Maybe some day. Unfortunately, there's no user configurable levels (and not likely to be), but the hardcoded levels should satisfy most. On the bright side, keyboard backlight is unaffected and should turn off when there's enough ambient light. Dr_dk_frost, I believe your brightness levels requirements are met. For those that don't like running binaries downloaded from the internet, here's the patch method: 1. The usual uninstall custom_brightness and backup the original libfilter-brightness-als.so 2. In a hex editor open the original module. 3. Go to byte 0x8378. This should be something like Quote:
4. If you've gotten this far - you should know how to change the rest. (if someone knows how to paste a binary patch on the forum then please let me know :D ) 5. Restart MCE and enjoy. I'll update later with an automatic patch method and other good stuff. If someone needs other brightess levels, I can generate a personalized patch (or do it yourself using method 2). |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Sounds Awesome, will test when i get the time :)
Now what about the -simple, can that be made to fit 5 other levels then stock? |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
That would be harder to do as in -als I just edited the levels & values (data) but in -simple, as you can remember, there's the algorithm that's different.
Why do you want -simple to have other 5 levels, if you don't mind me asking? I thought the edited -als already has the levels you need. I think the only difference between these two is that -simple has fixed levels (at 20% intervals) whereas -als flexes according to ambience. Now the edited -als has fixed brightness for levels 2 to 5. THe only one that's still flexible is level 1, and that's because I use my phone a lot as bicycle mounted GPS and find it useless to be backlit in daylight. Anyway, let me know what you think. It's not hard to make another, personalized -als - a 5 minute job, actually ;) |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
gebeleysis,
could change the brightness level for me? for level 1, i find 2 is too low. could you replace 2 with 6? for level 2, i find 51 is too bright. coulde you change it to 23? for level 3, i want 51 for level 4, i want 178 for level 5, 255 i don't know how to edit hex. thank you |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
1 Attachment(s)
Here you go, sLumPia.
Mind you that since the values I can edit there are in percent (not in 0-255), there are slight differencies between what you requested and what I did: Level 1: 3% = 7 Level 2: 9% = 22 Level 3: 20% = 51 Level 4: 70% = 178 Level 5: 100% = 255 Enjoy! :) P.S.: As usual, backup your original .so file, be mindful that it's untested and be prepared to reflash. |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
thank you gebeleysis :)
one question, level 1 have fix brightness right? not flexible like your first configuration/patch? i dont really need flexible brightness thanks again |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Yes. Fixed brightness ;)
|
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Some funny side effects I noticed with the patch:
If screen is left on more than the backlight time out (mine set to 2 min) it might "fade out" to being actually brighter than the set brightness. I guess the values the screen fades out to are hardcoded somewhere to. Also, this patch will never set the brightness to lower then 2 (1% of max). It has a stupid check which sets it to 1 if it goes any lower. |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
well since PR 1.3 brightness 2 is lowest, brightness 1 turns backlight off..
don't know why, before it was 0 for backlight off, and 1 was the lowest setting. |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Well... that's that then :)
Frost, Did you have the chance to test the patched module? Are the levels to your liking? I know I have tested. No ill effects for now. Do you think it's worth writing a script that would automatically edit the binary with some desired values? Does anyone know how to make a temporary filesystem redirect (mount or symbolic link) so that it gets reset after a reboot? What I have in mind is something like: - script get desired values from user - script makes a copy of the current .so file and edits with given values - script mounts new .so module under old name (effectively temporarily overwriting the old module) - script kills mce in order for it to grab new values - in case a crash occurs and phone reboots - it should pick up old, stable, module. - if everything worked fine, user should re-run script with some option to make changes permanent (during which the script should still make a backup copy of the module, rename the new one and kill mce again). I hope I'm not stealing the thread :) |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
No i haven't had the time yet...., and you are not stealing the thread, also im going to make links to your findings in post #1 when i get the time, and can you edit one of your post's to include everything so i can link to just that?
|
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Finally found the time to update some threads, gebeleysis please PM/post for more changes to post #1
|
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
is this the same in nokia N9..can you give me steps on how can i make the brightness fixed..and how can i disable the light sensor so that the brightness is not changing..
|
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
gebeleysis, I managed to use your instructions and customize my backlight and triggering levels to my liking. Muchos thanks for your work.
After almost 3 years, my n900 still keeps getting better :) |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
thanks
after i uninstalled it (from post #2) i rebooted and then the screen light is lower than before even after choosing the highest level in sittings ! please how can i fix this :o EDITE!!: [SOLVED] the mce.ini was not loading the filter-brightness-als module thanks to gebeleysis and dr_frost_dk :) |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
Finally got around to install the other N900 with thumb14 and OC and such and now im using gebeleysis brightness fix and it works really really well, so i can really recommend it to other users, the levels are very good and you really wont see screen light change anymore so it is not ignoring at all :)
|
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
nman, sifo, dr_frost_dk: You're all welcome! I am glad to have done something useful. I still didn't create any automatic way to customize brightness. Shame on me for that!
Still, since a hex-change in built-in binaries should be a conscious one, maybe it's better this way. |
Re: Custom Brightness & No Light Sensor (POST #1 & #2)
well you decipher the code so it should be possible to make some sort of bash script where you input you values and it does the HEX, but for me the levels you made are very good and have a wide application for various situations so it should not be needed.
|
All times are GMT. The time now is 08:10. |
vBulletin® Version 3.8.8