Brightness not adjusted when switching from AC to battery

Bug #522525 reported by Julien Valroff
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
DeviceKit-Power
Fix Released
Medium
gnome-power
Unknown
Medium
devicekit-power (Ubuntu)
Triaged
Low
Unassigned
gnome-power-manager (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Binary package hint: gnome-power-manager

Hi,

When swtiching from AC to battery (and back to AC), the screen brightness is not dimmed, while g-p-m is configured as it should (at least, I think it is).

this is using an Acer Timeline 1810TZ with the latest available BIOS update (3303).

The brightness can be adjusted using the fn keys or the brightness applet. Setting the default brightness via g-p-m preference window also works.

I do have an /sys/class/backlight/acpi_video0/brightness file, which is set to the current brightness.

I have also noticed that g-p-m needs a few seconds before updating its status when unplugging the laptop from AC (or plugging it again), which might means some information are incorrectly sent by acpi (?) but I am not sure what information should be provided to try and debug this issue.

Cheers,
Julien

ProblemType: Bug
Architecture: amd64
Date: Tue Feb 16 10:13:27 2010
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
Package: gnome-power-manager 2.28.1-0ubuntu1.3
ProcEnviron:
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-19.56-generic
SourcePackage: gnome-power-manager
Uname: Linux 2.6.31-19-generic x86_64

Revision history for this message
Julien Valroff (julienv) wrote :
Revision history for this message
Julien Valroff (julienv) wrote :

Also, the following works perfectly:
dbus-send --print-reply --system --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer_backlight org.freedesktop.Hal.Device.LaptopPanel.SetBrightness int32:5

Cheers,
Julien

Revision history for this message
Julien Valroff (julienv) wrote :

Hi,

I attach a log I had grabbed using gnome-power-manager verbose mode.

I have started g-p-m while on A/C, then switched to battery and plugged on A/C again.

I think I understand that when I go on battery, g-p-m sees the battery gets fully charged and only notices it is discharging after a while. Though, the brightness hasn't changed during the whole process and was always at the maximum level (9 as per /sys/class/backlight/acpi_video0/max_brightness).

Also, I have just noticed that screen brightness is dimmed after resuming from sleep.
I have also noticed after my tests that the laptop did not go to sleep when the lid was closed (though gpm was configured to do so when working on battery). After resuming from a manual sleep, it works again. I think I understand the battery state isn't correctly detected until something is refreshed (which happens eg. on resume). I am not sure what this something can be? G-p-m, hal ?

Cheers,
Julien

Revision history for this message
Julien Valroff (julienv) wrote :

Hi,

I have noticed that if booting the laptop while on battery, the brightness is correctly set to 4. If I then plug the A/C, the brightness is increased to 9 as expected. This doesn't happen when booting while on A/C nor after the first test.

I have also tested 10.04 alpha 2 and got the same issue.

Cheers,
Julien

Revision history for this message
Julien Valroff (julienv) wrote :

Hi,

gpm doesn't handle correctly the state of my battery which explains the previous issue with backlight.

While on battery, closing the lid blanks the screen (as configured for AC) whereas it should sleep:

 - ** EMIT: summary-changed(2): Batterie de l'ordinateur, 6 heures 40 minutes restantes (95,7 %)
TI:16:16:32 TH:0x9fc890 FI:gpm-manager.c FN:gpm_manager_client_changed_cb,829
 - same state as before, ignoring
TI:16:16:32 TH:0x9fc890 FI:gpm-button.c FN:gpm_button_emit_type,81
 - emitting button-pressed : lid-down
TI:16:16:32 TH:0x9fc890 FI:gpm-manager.c FN:gpm_manager_button_pressed_cb,749
 - Button press event type=lid-down
TI:16:16:32 TH:0x9fc890 FI:gpm-manager.c FN:gpm_manager_play,222
 - failed to play lid-close: File or data not found
TI:16:16:32 TH:0x9fc890 FI:gpm-manager.c FN:gpm_manager_lid_button_pressed,668
 - Performing AC policy
TI:16:16:32 TH:0x9fc890 FI:gpm-manager.c FN:gpm_manager_perform_policy,510
 - action: /apps/gnome-power-manager/buttons/lid_ac set to blank (The lid has been closed on ac power.)

first line proves that gpm is aware that the battery is discharging, while it states afterwards the lid has been closed on ac power (which is incorrect).

Cheers,
Julien

Changed in gnome-power-manager (Ubuntu):
importance: Undecided → Low
Revision history for this message
In , Julien Valroff (julienv) wrote :

Created an attachment (id=35798)
upowerd --verbose output when unplugging the laptop

Hi,

This is a follow-up for gpm bug #610600 [0] which needs to be re-assigned to upower.

When I unplug my laptop, upower doesn't detect the change immediately. It does only happen after 30 seconds, as shown in the output of upowerd --verbose (see attached file):

No updates on supply /org/freedesktop/UPower/devices/battery_BAT1 for
30 seconds; forcing update

Also see the discussion on the gpm mailing list about this issue [1].

I would be happy to make further tests or test any proposed patches which could solve this issue.

Also note this issue still happens with upower 0.9.4. This is on Debian unstable, with an Acer Aspire 1810TZ laptop.

Cheers,
Julien

[0] https://bugzilla.gnome.org/show_bug.cgi?id=610600
[1] http://mail.gnome.org/archives/gnome-power-manager-list/2010-March/msg00000.html

Revision history for this message
Julien Valroff (julienv) wrote :

It seems to be a bug in upower. I have reported it on the freedesktop bugtracker as #28213
https://bugs.freedesktop.org/show_bug.cgi?id=28213

Cheers,
Julien

Changed in gnome-power:
status: Unknown → New
Revision history for this message
In , Richard Hughes (richard-hughes) wrote :

Can you get the --verbose log when using upower 0.9.4 please. Thanks.

Revision history for this message
In , Julien Valroff (julienv) wrote :

Created an attachment (id=35887)
upower 0.9.4 verbose output

Hi Richard,

Here is the requested log.

Same as before:
 - No updates on supply /org/freedesktop/UPower/devices/battery_BAT1 for 30 seconds; forcing update

Cheers,
Julien

Revision history for this message
In , Richard Hughes (richard-hughes) wrote :

Could you try upower from git master please -- I think it might help. Thanks.

Revision history for this message
In , Julien Valroff (julienv) wrote :

hi,

I cannot compile git master.

I have a first error in configure:
./configure: line 3062: syntax error near unexpected token `0.6.7'
./configure: line 3062: `GOBJECT_INTROSPECTION_CHECK(0.6.7)'

If I remove this line by hand, it seems to work fine, but, then, no Makefile.in are created:
config.status: error: cannot find input file: `Makefile.in'

$ find . -name Makefile.*
./Makefile.am
./rules/Makefile.am
./etc/Makefile.am
./doc/Makefile.am
./doc/dbus/Makefile.am
./doc/man/Makefile.am
./libupower-glib/Makefile.am
./src/Makefile.am
./src/dummy/Makefile.am
./src/freebsd/Makefile.am
./src/linux/Makefile.am
./policy/Makefile.am
./tools/Makefile.am
./devkit-power-gobject/Makefile.am

Any hint?

Cheers,
Julien

Revision history for this message
In , Julien Valroff (julienv) wrote :

Hi,

0.9.5 is now in Debian, and I see no change compared to the previous release as for my issue.

Cheers,
Julien

Changed in gnome-power-manager (Ubuntu):
status: New → Triaged
Changed in devicekit-power (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Changed in devicekit-power:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in gnome-power:
importance: Unknown → Medium
Changed in devicekit-power:
importance: Medium → Unknown
Changed in devicekit-power:
importance: Unknown → Medium
Revision history for this message
In , Julien Valroff (julienv) wrote :

Hi,

I have just noticed I'm not hit by this issue any more. The fix is very recent, and the only possibly related update I can think of is that I am testing linux 3.0.0 rc2

I must admit that I haven't been able to test that much, hence I leave this report open for now, will close it later if my tests show it is actually fixed.

Cheers,
Julien

papukaija (papukaija)
tags: added: oneiric
papukaija (papukaija)
tags: added: battery-power-consumption i386 precise
papukaija (papukaija)
tags: removed: battery-power-consumption
Changed in gnome-power:
status: New → Unknown
Revision history for this message
In , Bugzilla-x (bugzilla-x) wrote :

Closing as per comment 6.

Changed in devicekit-power:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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