poliva / lightum

MacBook automatic light sensor daemon
GNU General Public License v2.0
96 stars 29 forks source link

Default value for minbacklight #14

Closed luchano closed 12 years ago

luchano commented 12 years ago

Hi, First of all thanks for this, i'm very happy that this daemon exists, it is so cool to run Linux in my Macbook Air and have all the hardware properly functioning

I'm packaging lightum for ARCH AUR repo[1]

Last package i've submited was lightum-1.5.

Now I'm in the process to build & submit 2.3, but when i made the upgrade on my own laptop, the first thing I've noticed is that my backlight turns to much dim.

If i run lightum in debug mode, I can see that light_sensor reports a 0 value (which is correct because is a cloudy day and late afternoon), but still, the backlight value is to much dim, it is anoying to me to read the screen. My first instinct was to raise backlight brightness with function keys, but that's do not work.

I know what was causing such changes, and which options set to fix it, because I've manually compiled and installed lightum, but any of the users that will upgrade their ARCH systems with "yaourt -Syua" will not notice the change untill reboot or logout ther session, and that in a laptop can happen weeks later (most peopple just use suspend). And when they notice the changes, it will take them a lot of pain to find out that they must change values in .config/lightum/lightum.conf, maybe a file which they never touch.

So, my point is, users will upgrade their distro, and then they will find that the screen backlight is so dark, and they will think that this is a bug, because the function keys... and they even will not know that it is not a bug, and that can be easly fixed in lightum.conf.

I suggest to set a bigger minbacklight as default, I've set minbacklight =6 and things get better, but even with this value, i would prefer a higher value when light_sensor reports 0, especially when laptop is pluged-in. To not block function keys by default can be another good choice i guess.

All this in my very modest opinion, what do you think?

Regards [1] https://aur.archlinux.org/packages.php?ID=58323

poliva commented 12 years ago

Hi luchano,

Thank you for taking the time to package lightum for Arch, and also for writing this report.

I fully understand your concerns here, regarding the problem where users do not reboot their laptop, I can think of two possible solutions:

1) you can add a patch to set workmode=1 by default in the config file, so lightum will only manage keyboard brightness, and leave screen backlight alone... advanced users will edit the config file anyways, and is a more conservative setting. The default values are set here: https://github.com/poliva/lightum/blob/master/configfile.c#L32

2) if arch package management allows you to do this (I have no idea), you can add a pre-installation prompt to the user, asking him if he wants lightum to manage keyboard brightness, screen backlight or both, then patch the default value of workmode with the desired choice.

Also, I'll try to come over with a solution to make the Fn keys work (maybe defaulting to manual mode when the function keys are touched), will post an update here when it is available for you to test.

poliva commented 12 years ago

commit 748ce4515c should fix the issue with function keys, it will default to manual mode when the Fn keys are touched, instead of changing maxbacklight.

luchano commented 12 years ago

Thank you very much, i will also put a confirmation message in a post_install trigger, so the user have to read some instructions before install. I prefer that to a patch.

And thanks again for writing lightum :)