Backlight isn't turned off after inactivity on iBook G4

Bug #249568 reported by Wojtek Kaniewski on 2008-07-17
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
xf86-video-ati
Fix Released
Medium
gnome-power-manager (Ubuntu)
Undecided
Unassigned
xserver-xorg-video-ati (Debian)
Fix Released
Unknown

Bug Description

Binary package hint: gnome-power-manager

When iBook is powered from a battery, the screen is blanked after a period of inactivity, but backlight isn't turned off. I'd expect GNOME Power Manager to turn off the backlight as well to save battery and/or make backlight lamp live longer. Unfortunately I don't remember if the backlight worked properly in previous versions.

Backlight can be turned on and off manually, so the kernel driver supports it properly:

    $ echo 0 | sudo tee -a /sys/class/backlight/radeonbl0/brightness
    $ echo 127 | sudo tee -a /sys/class/backlight/radeonbl0/brightness

GNOME Power Manager settings are:

    $ gconftool-2 -R /apps/gnome-power-manager/backlight
     idle_dim_battery = true
     dpms_method_battery = off
     idle_brightness = 30
     dpms_method_ac = default
     idle_dim_time = 30
     brightness_battery = 70
     enable = true
     idle_dim_ac = false
     battery_reduce = true
     brightness_ac = 100

Distribution: Hardy Heron 8.04
Hardware: iBook G4
Graphics: ATI Radeon Mobility 9200 (M9+) 5C63 (AGP)
Packages: gnome-power-manager 2.22.1-1ubuntu4

Wojtek Kaniewski (wojtekka) wrote :

BTW, manual backlight adjustment with function keys works fine too -- the backlight is turned off completely when changed to minimal value.

I've also attached dbus-monitor log. The scenario was:
1. Wait for backlight to dim.
2. Press some key.
3. Wait for backlight to dim.
4. Press some key.
5. Wait for screen saver to activate.

GPM should turn off the display 1 minute after screen saver activation, but looks like nothing happened as I kept logging for couple of minutes longer.

Pedro Villavicencio (pedro) wrote :

Thanks for taking the time to report this bug and helping to make Ubuntu better. Could you please attach the resulting log file of: gnome-power-bugreport.sh &> gpm.log to the report? You might also want to take a look to the Debugging instructions located at https://wiki.ubuntu.com/DebuggingGNOMEPowerManager for submit any other logs related to your problem.Thanks in advance.

Changed in gnome-power-manager:
status: New → Incomplete
lopthopman (lopthopman-ann0) wrote :

I've had this problem too, but it has been solved. Perhaps you have the same problem I did.

Is your screensaver on? If it is, TURN IT OFF. Even if you select "blank screen", it turns on the backlight. So, give this a try:

1. turn OFF the screensaver
2. on Powermanagement, set "put display to sleep when inactive" to the desired time

Please update this bug if this works for you

Created an attachment (id=21281)
ouput of "lspci -vv -nn"

Hi

I have a problem with DPMS. When my computer is idle, the monitor blank but the LCD backlight still on.
When I run the command "xset dpms force off", I have the same result.
My laptop is an Ibook (powerpc).
I join the Xorg.0.log and the ouput of "lspci -vv -nn" command.
I found an other bug with the same problem but it is closed : #3483.

Thomas

Created an attachment (id=21282)
Xorg.0.log

Is this regression? Did the backlight used to go off in a previous release? I suspect apple has the backlight wired up some non-standard way.

> Is this regression? Did the backlight used to go off in a previous release?
For me, the problem has always existed. But before, I used the PBButtonsd daemon (http://pbbuttons.berlios.de/). This daemon switched off the backlight putting the level brightness to zero.
But I think the radeon driver should switch off the backlight alone without an other daemon because all "power manager" programs (like gnome-power-manager) use the DPMS features to control the switch on/off display.

> I suspect apple has the backlight wired up some non-standard way.
Yes, I agree with you. I also read about this on internet but I can't find the article again.

How can I help you to find a solution ?

(In reply to comment #3)
> > Is this regression? Did the backlight used to go off in a previous release?
> For me, the problem has always existed. But before, I used the PBButtonsd
> daemon (http://pbbuttons.berlios.de/). This daemon switched off the backlight
> putting the level brightness to zero.
> But I think the radeon driver should switch off the backlight alone without an
> other daemon because all "power manager" programs (like gnome-power-manager)
> use the DPMS features to control the switch on/off display.
>

I agree, I just don't know how apple does it.

>
> > I suspect apple has the backlight wired up some non-standard way.
> Yes, I agree with you. I also read about this on internet but I can't find the
> article again.
>
> How can I help you to find a solution ?
>

if you could use radeontool from here:
http://cgit.freedesktop.org/~airlied/radeontool
and dump the regs when the backlight is on and when it's off and attach the dumps, I'll see what I can find. as root:
./radeontool regmatch '*' > blon.dump
./radeontool regmatch '*' > bloff.dump

Created an attachment (id=21325)
possible fix

This implements the on chip backlight control, not all oems use it. It might work for you, it might not. Also, depending on how the backlight is wired up, the levels may be reversed (not sure whether 0 = on or off and 255 = on or off).
if it doesn't work, try switching the levels in the patch. I've got the alternate setting commented out below the main one, so just switch the comments. Make sure you switch both the enable and disable paths.

Created an attachment (id=21339)
outpout of "radeontool regmatch" when screen backlight is on

Created an attachment (id=21340)
outpout of "radeontool regmatch" when screen backlight is off

(In reply to comment #5)
> Created an attachment (id=21325) [details]
> possible fix
>
> This implements the on chip backlight control, not all oems use it. It might
> work for you, it might not. Also, depending on how the backlight is wired up,
> the levels may be reversed (not sure whether 0 = on or off and 255 = on or
> off).
> if it doesn't work, try switching the levels in the patch. I've got the
> alternate setting commented out below the main one, so just switch the
> comments. Make sure you switch both the enable and disable paths.
>

I tested your patch but when I run Xorg, the brightness was always very low (zero) and the backlight wasn't switch off.

I test the current git repository without patch and the driver works very well but this backlight bug is present.

I thought a lots about this problem and I checked in differents projects (PowerDevil for KDE and Gnome Power Management) to see how the screen is switched off.
This projects use the DPMS function to switch off the screen (define in X11/extensions/dpms.h)

The problem on Ibook is that the screen's power is controled by Power Management Unit (PMU). There is a module on Linux system. You can control this device with /dev/pmu.

Do you think radeon driver must control PMU or each desktop power management (Powerdevil, GPM...) must control PMU themselves?

Thanks in advance for your help.

(In reply to comment #9)
> The problem on Ibook is that the screen's power is controled by Power
> Management Unit (PMU). There is a module on Linux system. You can control this
> device with /dev/pmu.
>
> Do you think radeon driver must control PMU or each desktop power management
> (Powerdevil, GPM...) must control PMU themselves?

I'm not sure what the best solution is. Adding it to the driver would make it just work when dpms is used, but most power managers already mess with backlight to save power, so that should work too.

Dimitrios Symeonidis (azimout) wrote :

no answer received, closing as won't fix

Changed in gnome-power-manager (Ubuntu):
status: Incomplete → Won't Fix
Thomas Champagne (lafeuil) wrote :

Hi
I have the same problem 3 years ago and I never solve it. I create a lot of bug reports in various project :
In gnome-power-manager : https://bugzilla.gnome.org/show_bug.cgi?id=550524
In radeon driver : https://bugs.freedesktop.org/show_bug.cgi?id=19168

The problem is that I don't know where is exactly the bug. On Xorg, Radeon driver, gnome-power-manager ?

Gnome-power-manager switch off backlight calling this similar command : xset dpms force off.

But on Ibook, there isn't DPMS feature. The xorg server logs this in /var/log/Xorg.0.log :
(II) RADEON(0): No DPMS capabilities specified

So, when the command is called, the screen is black but the backlight is always on....
The solution to switch off backlight is to put backlight to 0.

Please help me :-p

Changed in xserver-xorg-video-ati (Debian):
status: Unknown → New
Changed in xf86-video-ati:
status: Unknown → Confirmed

Hello Alex

Today, I'm testing the current developpement tree of radeon driver (6.12.99).
When I went to cook, I saw the screen of my computer switching off.
So, I tested the command "xset dpms force off" and the screen switched off again.

I don't know what you have changed in the master tree but I think that it solves this bug.
I found this commit in the git repository :
http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=48aa5064aff4b9adf768e480df2312d4375e9c40
Is this patch that solves the problem ?

If this bug is fixed, it's for me a very good news !

Thomas

(In reply to comment #11)
> Hello Alex
>
> Today, I'm testing the current developpement tree of radeon driver (6.12.99).
> When I went to cook, I saw the screen of my computer switching off.
> So, I tested the command "xset dpms force off" and the screen switched off
> again.
>
> I don't know what you have changed in the master tree but I think that it
> solves this bug.
> I found this commit in the git repository :
> http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=48aa5064aff4b9adf768e480df2312d4375e9c40
> Is this patch that solves the problem ?

Could be. This fixed another mac LVDS problem so maybe yours needed it too.

Changed in xf86-video-ati:
status: Confirmed → Fix Released
Changed in xf86-video-ati:
importance: Unknown → Medium
Changed in xf86-video-ati:
importance: Medium → Unknown
Changed in xf86-video-ati:
importance: Unknown → Medium
Changed in xserver-xorg-video-ati (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.