-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyboard backlighting not changes consistently #46
Comments
I found a bug in the way the get_screensaver_active function handles the dbus messages. It works for me. Please try my repository at https://github.com/esoleyman/lightum. I've included the patches from PR #44 there as well. |
Running https://github.com/esoleyman/lightum:
It does not change the keyboard backlight at all. |
Can you run the following command and paste it here?
I get back the following on my Ubuntu 14.10 and 15.04 machines:
|
I'm not running gnome-screensaver. |
In case it matters anyway, this obviously failed:
|
Lightum uses UPower to control the brightness of the keyboard brightness. That could conceivably be the reason that the brightness does not change as needed. Do you have it installed on your Arch Linux machine? Looking through the code, we utilize the following DBUS interface:
and on line 129-133 call the following method
|
Yes, I've upower 0.99.2 installed. Keyboard backlight intensity does change, the issue is that it's always changed to 0, regardless of current ambient light level. On a highly lit room, with the brightness previously maxed out (using kbdlight), running lightum turns it off:
With the camera covered (and compelete darkness), it does the same:
upower is clearly working, the problem is that lightum sets the brighness to 0, regardless of light_sensor value. (I've no idea what the warning is related to). |
I think I've found the problem. I've made a fix to my branch. Would you mind testing once again? |
There's still a warning when running as seen above. |
I've updated my branch again to track down the "WARNING **: variant return type is unexpected". With -i 5, it will take 5 seconds before the keyboard light is turned on or off when the light_sensor detects a change in light brightness. If you remove the -i 5, then you will see a much quicker change and decreased delay in brightness adjustment. In my experience, a light_sensor reading of 1 has a brightness of 127/255 while a light_sensor reading of 2 has brightness of 63/255 and so on and so forth. There should not be an inversion of the keyboard brightness as a result. When I have my laptop in daylight the keyboard is unlit and when in a darkened room the keyboard has maximal brightness. Would you mind sending 5 seconds worth of reading when the light_sensors is 0 and > 4? |
I hadn't even seen light_sensors go beyond 2 before now, even with extremely high light. This last run I've noticed it go up to 3 (for a first time), and I'm with plenty of sunlight and the room light on. I've no idea how to make it go up to (or above) 4. I'd point a reflector at the camera, but I'm not sure if that won't damage the light sensor. I had forgotten about
It seems that starting lightum with the webcam covered turns the brightness to max, and starting it with lots of light mere dims (but does not turn off) the brightness (it seems to be a change during one of the latest commits). However, if the keyboard lighting is off and I start lightum, it'll turn it on (with 42/255 brightness), so that's what seems to be confusing me. I believe this is caused because you're expecting light_sensor to go up to >4, and mine doesn't seems to vary only between 0 < x < 3. Are we sure that all light-sensors go from 0-5? Might mine be buggy? |
My light sensor goes from 0 to at least 50-60. Do you mind printing out the value of Also, the |
Sunlight coming in through the window + room lights. I can't get much more than that without using a reflector pointed at the sensor, and I'm afraid that might damage it:
Covering the webcam with my finger:
It's a 13" MacBook Air 2013.
Why use just gnome-screensaver specific code? We have the xdg's
I've noticed this, and it seemed to make a positive change. |
This light sensor range might be an issue with the applesmc module. I found this patch included in previous Ubuntu versions where others had these problems as well. https://launchpadlibrarian.net/21101822/applesmc-dkms-light-sensor-fix.patch Unfortunately, it doesn't seem to be applied upstream in any case. I would try it and see if it makes a difference for you. Thanks for pointing out the xdg |
Never mind. I spoke too soon and it looks like it has been included already. But I think there might be a module issue though. |
Running the latest from git the keyboard backlighting behaviour is inconsistent. Either with plenty of light or in complete darkness (eg: covering the webcam with my finger) the keyboard backlight is turned off.
I noticed (before #44), that sometimes the backlight it turned back on, but have had issues reproducing it: it seemed to be rather random.
I've been running
lightum -fvd 1 -w 1 -s -i 5
.I've tried the code from #44, as suggested on #45, but this did not affect the issue at all.
Covering the webcam:
In a very well lit environment:
The text was updated successfully, but these errors were encountered: