! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Unable to change brightness with fn+brightness keys on Sony Vaio notebook
Status:
RESOLVED: INVALID
Product:
Xfce4-power-manager
Component:
General

Comments

Description Warren 2009-09-09 04:01:54 CEST
When I try to adjust the brightness on my Sony Vaio TZ27GN notebook with the fn+brightness keys, the xfce-power-manager OSD pops up and shows a progress bar indicating the current brightness, but modifying the brightness (+ or -) is ineffective.

I am able however to change the brightness by echoing a new brightness setting to /proc/acpi/video/GFX0/LCD/brightness

FYI:
wgvaio:/home/wg# cat /proc/acpi/video/GFX0/LCD/brightness
levels:  4 16 28 40 52 64 76 88 100
current: 88

When I change the brightness using the procfs, the new brightness is reflected in the xfce-power-manager OSD.
Comment 1 Ali Abdallah editbugs 2009-09-28 07:00:55 CEST
(In reply to comment #0)
Sorry for the late reply, i was on vacation.

> When I try to adjust the brightness on my Sony Vaio TZ27GN notebook with the
> fn+brightness keys, the xfce-power-manager OSD pops up and shows a progress bar
> indicating the current brightness, but modifying the brightness (+ or -) is
> ineffective.
> 
> I am able however to change the brightness by echoing a new brightness setting
> to /proc/acpi/video/GFX0/LCD/brightness
>

Is it effective to the hardware? i mean you see the brightness change in your lcd?
Comment 2 Warren 2009-09-28 07:05:00 CEST
(In reply to comment #1)
> (In reply to comment #0)
> Sorry for the late reply, i was on vacation.
> 
> > When I try to adjust the brightness on my Sony Vaio TZ27GN notebook with the
> > fn+brightness keys, the xfce-power-manager OSD pops up and shows a progress bar
> > indicating the current brightness, but modifying the brightness (+ or -) is
> > ineffective.
> > 
> > I am able however to change the brightness by echoing a new brightness setting
> > to /proc/acpi/video/GFX0/LCD/brightness
> >
> 
> Is it effective to the hardware? i mean you see the brightness change in your
> lcd?

Yes, that is correct.
Comment 3 Ali Abdallah editbugs 2009-09-28 12:41:24 CEST
Okay, i guess this is a problem with HAL.

Try to run the following command.


dbus-send --print-reply --system --dest=org.freedesktop.Hal   \
/org/freedesktop/Hal/devices/computer_backlight               \
org.freedesktop.Hal.Device.LaptopPanel.SetBrightness int32:9


while /org/freedesktop/Hal/devices/computer_backlight is the address of your laptop lcd brightness, you can get it from the output of lshal (then search for laptop_panel), but most probably it is as i said.

Try different brightness levels (int32:19 or int32:33, ...) and let me know your findings.
Comment 4 Warren 2009-10-04 11:58:58 CEST
wg@wgvaio:~$ dbus-send --print-reply --system --dest=org.freedesktop.Hal   /org/freedesktop/Hal/devices/computer_backlight               org.freedesktop.Hal.Device.LaptopPanel.SetBrightness int32:9
Error org.freedesktop.Hal.Device.LaptopPanel.Invalid: Brightness level is invalid

for all values above 8

Values 0 through 8 appear to work:

wg@wgvaio:~$ dbus-send --print-reply --system --dest=org.freedesktop.Hal   /org/freedesktop/Hal/devices/computer_backlight               org.freedesktop.Hal.Device.LaptopPanel.SetBrightness int32:0
method return sender=:1.2 -> dest=:1.1375 reply_serial=2
   int32 0
wg@wgvaio:~$ dbus-send --print-reply --system --dest=org.freedesktop.Hal   /org/freedesktop/Hal/devices/computer_backlight               org.freedesktop.Hal.Device.LaptopPanel.SetBrightness int32:1
method return sender=:1.2 -> dest=:1.1377 reply_serial=2
   int32 0
wg@wgvaio:~$ dbus-send --print-reply --system --dest=org.freedesktop.Hal   /org/freedesktop/Hal/devices/computer_backlight               org.freedesktop.Hal.Device.LaptopPanel.SetBrightness int32:2
method return sender=:1.2 -> dest=:1.1379 reply_serial=2
   int32 0

...

wg@wgvaio:~$ dbus-send --print-reply --system --dest=org.freedesktop.Hal   /org/freedesktop/Hal/devices/computer_backlight               org.freedesktop.Hal.Device.LaptopPanel.SetBrightness int32:8
method return sender=:1.2 -> dest=:1.1397 reply_serial=2
   int32 0
Comment 5 Warren 2009-10-04 12:01:41 CEST
(In reply to comment #4)

I should note that values 0 through 8 all result in a change in brightness level.
Comment 6 Ali Abdallah editbugs 2009-10-05 07:19:41 CEST
Then i don't understand your problem. 

Can you change your lcd brightness level with fn keys or not? please be more clear about (+ or -), do you mean these are fn+brightness-up fn+brightness-down? try also to reproduce your problem without xfpm running.
Comment 7 Warren 2009-10-05 10:53:00 CEST
(In reply to comment #6)
> Then i don't understand your problem. 
> 
> Can you change your lcd brightness level with fn keys or not? please be more
> clear about (+ or -), do you mean these are fn+brightness-up
> fn+brightness-down? try also to reproduce your problem without xfpm running.

No, it does not work with the fn keys.

By + and -, I mean the fn+brightness-up and fn+brightness-down keys (in this case fn+f5 (-) and fn+f6 (+)).

Pressing fn+brightness-up/down displays the xfce4-power-manager brightness OSD but there is no change in brightness.

I killed xfce4-power-manager, and I have the same problem, except that the xfce OSD does not display.
Comment 8 Ali Abdallah editbugs 2009-10-05 11:08:15 CEST
(In reply to comment #7)
> No, it does not work with the fn keys.
> 
> By + and -, I mean the fn+brightness-up and fn+brightness-down keys (in this
> case fn+f5 (-) and fn+f6 (+)).
> 
> Pressing fn+brightness-up/down displays the xfce4-power-manager brightness OSD
> but there is no change in brightness.
> 
> I killed xfce4-power-manager, and I have the same problem, except that the xfce
> OSD does not display.

Cool, now your problem is clear, it is not related to xfpm since, as you said, the problem is reproducible without xfpm running.

Please attach the output of lshal here for me to make sure.
Comment 9 Warren 2009-10-05 11:30:26 CEST
Created attachment 2575 
lshal output
Comment 10 Ali Abdallah editbugs 2009-10-05 12:05:05 CEST
(In reply to comment #9)
> Created an attachment (id=2575) [details]
> lshal output

So as i expected, there is "laptop_panel.brightness_in_hardware = true" key and this key when present (according to HAL documentation) power managers should not change brightness on fn key events, so that is your problem.

But it is strange that you have this key set to "true" which version of HAL you have?


try to add the following to your /usr/share/hal/fdi/information/10freedesktop/10-laptop-panel-hardware.fdi

<match key="linux.sysfs_path" suffix="/backlight/acpi_video0">
  <merge key="laptop_panel.brightness_in_hardware" type="bool">false</merge>
</match>

then restart HAL, lshal and search for the key laptop_panel.brightness_in_hardware should be set to false. 

This bug is not related to xfpm.

Bug #5750

Reported by:
Warren
Reported on: 2009-09-09
Last modified on: 2009-10-05

People

Assignee:
Ali Abdallah
CC List:
0 users

Version

Version:
0.8.3.1

Attachments

lshal output (150.26 KB, text/plain)
2009-10-05 11:30 CEST , Warren
no flags

Additional information