Open cyrofilho opened 10 years ago
That actually tells me that setting the backlight succeeded but after 3 retries. I've pushed a debug branch. Can you test that branch and give me the "dmesg | grep mba6x" ?
I had a similar issue to @cyrofilho one, when I start my system (ArchLinux, Linux 3.15.7, GNOME) the screen is not visible at all but it becomes visible if I press the brightness buttons.
Also, when I switch to a VT, login in the VT, switch back to X and switch again to VT I see this output in the VT (not necessary the same timestamps):
[ 34.195104] mba6x_bl: Invalid response at reg: 0x1 (len: 24)
[ 34.529899] mba6x_bl: Invalid response at reg: 0x1 (len: 24)
[ 34.867193] mba6x_bl: Invalid response at reg: 0x1 (len: 24)
I installed the debug
branch, rebooted, pressed brightness buttons to make screen visible and I got this output for dmesg | grep mba6x
:
[ 3.579532] mba6x_bl: Found LP8550 backlight driver
[ 3.579535] mba6x_bl: Saving registers
[ 3.580862] mba6x_bl: Trying to set brightness to 150
[ 3.580864] mba6x_bl: Configuring dev ctl
[ 3.581276] mba6x_bl: Actually setting brightness to 150
[ 10.193286] mba6x_bl: Trying to set brightness to 163
[ 10.193289] mba6x_bl: Configuring dev ctl
[ 10.193722] mba6x_bl: Actually setting brightness to 163
[ 10.774659] mba6x_bl: Trying to set brightness to 150
[ 10.774662] mba6x_bl: Configuring dev ctl
[ 10.775095] mba6x_bl: Actually setting brightness to 150
I hope this helps. Thanks, my laptop would be unusable without this driver :) !
@eagleoneraptor thanks for the report
This is very confusing. We're setting the backlight brightness to 150 when the module loads so the backlight should be on. Perhaps the chip needs some time to switch from PWM mode to register mode. I've pushed a patch to the debug branch that sleeps for 50ms after the mode switch. Could you try it and tell me if it helps or not.
@patjak well... this is weird, reproduced steps:
msleep(50);
, worked, it shows me the DE without pressing any brightness button, forgot to copy the dmesg | mba6x_bl
output.Then I modified the module so the msleep
lines now looks like.
pr_info("mba6x_bl: Before msleep\n"); msleep(200); pr_info("mba6x_bl: After msleep\n");
Compiled, installed, rebooted and worked! an interesting output, but I reboot to test it again without copying the module output (sorry again).
[ 3.547980] mba6x_bl: Found LP8550 backlight driver
[ 3.547981] mba6x_bl: Saving registers
[ 3.549570] mba6x_bl: Trying to set brightness to 150
[ 3.549573] mba6x_bl: Configuring dev ctl
[ 3.550011] mba6x_bl: Actually setting brightness to 150
[ 3.550011] mba6x_bl: Before msleep
[ 3.751379] mba6x_bl: After msleep
[ 24.302211] mba6x_bl: Trying to set brightness to 163
[ 24.302213] mba6x_bl: Configuring dev ctl
[ 24.302617] mba6x_bl: Actually setting brightness to 163
[ 24.302618] mba6x_bl: Before msleep
[ 24.504559] mba6x_bl: After msleep
Note that the output lines timestamped > 24 is when I pressed the brightness button to fix the backlight.
The line:
[<time>] mba6x_bl: Invalid response at reg: 0x1 (len: 24)
is always appearing as explained before (in VT output), also, I remember that it appeared in step 3 but in the dmesg
output that I forgot to copy (tried to find the output using journalctl -k
but it only shows me the output for the current boot)
Ok... today a turned on the laptop and I didn't need it to press the brightness buttons to see the screen, the start up was just fine, the log is slightly different:
[ 3.891662] mba6x_bl: Found LP8550 backlight driver
[ 3.891664] mba6x_bl: Saving registers
[ 3.893187] mba6x_bl: Trying to set brightness to 150
[ 3.893189] mba6x_bl: Configuring dev ctl
[ 3.894396] mba6x_bl: Actually setting brightness to 150
[ 3.894398] mba6x_bl: Before msleep
[ 4.094807] mba6x_bl: After msleep
[ 4.330650] mba6x_bl: Invalid response at reg: 0x0 (len: 24)
[ 4.431307] mba6x_bl: Trying to set brightness to 150
[ 4.431307] mba6x_bl: Configuring dev ctl
[ 4.679793] mba6x_bl: Invalid response at reg: 0x1 (len: 24)
[ 4.781168] mba6x_bl: Trying to set brightness to 150
[ 4.781169] mba6x_bl: Configuring dev ctl
[ 5.017381] mba6x_bl: Invalid response at reg: 0x1 (len: 24)
[ 5.117644] mba6x_bl: Trying to set brightness to 150
[ 5.117645] mba6x_bl: Configuring dev ctl
[ 5.350934] mba6x_bl: Invalid response at reg: 0x1 (len: 24)
[ 5.454149] mba6x_bl: Trying to set brightness to 150
[ 5.454151] mba6x_bl: Configuring dev ctl
[ 5.454588] mba6x_bl: Actually setting brightness to 150
[ 5.454589] mba6x_bl: Before msleep
[ 5.657376] mba6x_bl: After msleep
[ 5.657786] mba6x_bl: set brightness retries = 4
I've push a patch to the master branch that might make a difference. Please try and report back.
Hello, it seems like I have the same problem as the creator of the issue. Removing mba6x_bl fixed it, and I am very certain it has caused the issue.
After turning on my Macbook Air (2014, Arch Linux), the screen goes completely dark. Pressing the brightness keys does not change anything, but after waiting some time (minutes, probably 5+) and then pressing any key, the console text becomes visible.
After that, the module printed this into the console:
bma6x_bl: Invalid response at reg: 0x1 (len: 24)
about 20 times, then said
failed to set brightness
dmesg shows that the module also said Found LP8550 backlight driver
at boot.
@AlexanderSelzer I had this same behaviour, but please check Issue #19. @patjak created a "notify" branch that works for me except for that the brightness is very low at boot time or after I restart the X server (or just log out the X session to the DM greeter).
Please check if that branch works for you and we might get our efforts in the other issue :)
Regards, L. Alberto
@agimenez thanks, but the notify
branch is broken for me and I now have another problem.
Closing the laptop does not suspend it anymore. Backlight is still on.
To explain what happened after I loaded it: First, the brightness was half on, and could not be changed, but after rebooting the keys worked.
Everything seems to work as before, only the computer does not shut off the backlight when closed. The Apple is still illuminated.
Deleting the module from /lib/modules/3.17.6-1-ARCH/extra/ did not stop this.
I now have a pretty big problem. How can I remove the effects of the module? The battery will surely drain pretty quickly now.
Thank you for the information, and thanks to the author of the module for trying to fix this problem.
Okay, I have verified that the module is not loaded. The effects appear very randomly and inconsistently. Sometimes the Apple (and backlight) flicker on and then off again.
It looks like 4% battery were drained in one hour of closing the laptop, but that might not be accurate. I assume those effects are not related to the module, but are a part of the bug it is trying to fix. Maybe some other process caused the laptop to wake up or so?
If there is another version to test, I would be happy to help. Thanks again.
i have the same problem,
if the macbookair goes to sleep because of inactivity, there's no way to power the screen back on. i can see in the logs zagnut kernel: mba6x_bl: Invalid response at reg: 0x1 (len: 24)
when i put myself the macbookair to sleep with systemctl suspend
it works and the screen gets powered back on when i'm waking up the computer though.
how come it works with suspend and not when going to sleep on its own ?
i forgot to say i'm using arch:
Linux zagnut 3.18.6-1-ARCH #1 SMP PREEMPT Sat Feb 7 08:44:05 CET 2015 x86_64 GNU/Linux
I've started a Wiki to gather known issues. Could you please add this issue (or issues) to the list? Thanks
I have the same problem, ttys goes completely dark at boot (macbook air 6.2). When I log in and start X11 the brightness comes back. I fixed it by changing the INIT_BRIGHTNESS from 150 to 500 and recompiling the module.
@alvarezgregory 500 is not a valid value since the register we write is only 8 bit. You're probably getting 244 since the most significant bit gets discarded. 255 would be the maximum. But I don't think this is related to the problem you're seeing.
The latest code solved the tty dark problem. But i still have a problem when i turn the computer on. The lightdm screen is black, then i have to press control+alt+f2 and can see the tty screen without problem, after that i press control+alt+f1 to return to lightdm and now the screen is visible. On dmesg i have:
dmesg | grep mba [ 4.335055] mba6x_bl: Found LP8550 backlight driver [ 34.195104] mba6x_bl: Invalid response at reg: 0x1 (len: 24) [ 34.529899] mba6x_bl: Invalid response at reg: 0x1 (len: 24) [ 34.867193] mba6x_bl: Invalid response at reg: 0x1 (len: 24) [ 34.970335] mba6x_bl: set brightness retries = 3
I am using antergos (arch) with gnome3 and lightdm
Thanks for the help.