Okay, I made a thread for this for visibility purposes, though it's not much. A known issue with some PowerBooks, specifically G4s with the ambient light sensor, is that there's a chance that on startup it'll kill the brightness and you have to spend several minutes trying to turn it back up to be viewable if you're lucky.
While I don't have a proper fix that isn't 'disable i2c_dev and lose keyboard and brightness controls', I sure do have a workaround that (mostly) rectifies at least the fidgeting with the brightness part.
Much like everything else in the Linux world, the display brightness is exposed to the user as a text file with a single number value. On THE KING, it's located at
So the workaround for this is: create a late-firing service to set the brightness to something higher than 0. It's as follows:
Below is my service file and the script. I'm using Bedrock Linux with Debian's systemd, so adaptation of at least the service file will be necessary for other init systems.
After that,
While I don't have a proper fix that isn't 'disable i2c_dev and lose keyboard and brightness controls', I sure do have a workaround that (mostly) rectifies at least the fidgeting with the brightness part.
Much like everything else in the Linux world, the display brightness is exposed to the user as a text file with a single number value. On THE KING, it's located at
/sys/class/backlight/radeon_b10/brightness
and that's probably where the brightness is located on all affected PowerBooks. This value is a decimal representation of a byte, and thus has valid values from 0 to 255, 255 being 100% brightness.So what I believe happens is, but I don't know for sure, is that when the i2c_dev module is initialised, both the display and the keyboard brightness are set to 0. This is probably correct as evidenced by the existence of a service that restores the brightness saved on shutdown. However, something goes wrong with this service firing, resulting in the display brightness staying at 0. With this hypothesis, a proper fix would likely be tweaking the brightness restoring service so that it actually works. This workaround is likely no longer necessary if this is done, though I also have noticed that the value saved on shutdown is also corrupt, so, it's just a pile of yikes.
So the workaround for this is: create a late-firing service to set the brightness to something higher than 0. It's as follows:
- Create a script that sets the brightness to some large number. I used 200, but you can use whatever from 0 to 255.
- Create a service that runs this script on boot.
Below is my service file and the script. I'm using Bedrock Linux with Debian's systemd, so adaptation of at least the service file will be necessary for other init systems.
Code:
/lib/systemd/system/dlsd-backlight-fix.service
[Unit]
Description=Workaround Brightness Bug on ALS PowerBooks
[Service]
Type=oneshot
ExecStart=/usr/local/bin/dlsd-fix
TimeoutSec=30s
[Install]
WantedBy=multi-user.target
Code:
/usr/local/bin/dlsd-fix
#!/bin/bash
# I found that not having this sleep command results in the brightness-setting
# echo to fire too soon, resulting in no brightness still.
sleep 7
echo 200 > /sys/class/backlight/radeon_b10/brightness
After that,
# systemctl enable dlsd-backlight-fix
or the equivalent for your init system of choice and you should be on your way. Hope this helps even a little for the backlight issue for PBG4 users.