doesn't dim screen on SONY VAIO (vgn FS215M / Z1 RMP) (regression)

Bug #65028 reported by Paolo Borelli
76
Affects Status Importance Assigned to Milestone
gnome-power-manager (Ubuntu)
Invalid
Undecided
Unassigned
hal (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

This used to work well in the past, but on edgy it doesn't work anymore.

I failed to notice before because I usually prefer to keep 100% of the brightness also when running on battery.

(May be a HAL issue, not sure)

1) From gnome-power-prefs, set brigthness on battery to 50%
2) detach power cord

expected:
  screen is dimmed

result:
  nothing happens

I digget in it a tiny bit and the proper script /usr/share/hal/scripts/hal-system-lcd-set-brightness gets called.

I made the script do the following:

echo "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" >> /home/paolo/acpihasrun
echo "$HAL_PROP_LAPTOP_PANEL_NUM_LEVELS" >> /home/paolo/acpihasrun
echo "$HAL_PROP_LINUX_ACPI_PATH" >> /home/paolo/acpihasrun

 ...

# read value for set brightness
read value

echo ${value} >> /home/paolo/acpihasrun

and the result is:

sony
8
/proc/acpi/sony/brightness
7
sony
8
/proc/acpi/sony/brightness
6
sony
8
/proc/acpi/sony/brightness
5
sony
8
/proc/acpi/sony/brightness
4
sony
8
/proc/acpi/sony/brightness
3
sony
8
/proc/acpi/sony/brightness
2
sony
8
/proc/acpi/sony/brightness
1

which looks rather weird and leads to no effects

Revision history for this message
Paolo Borelli (pborelli) wrote :

Just for completeness, running gnome-power-manager --no-daemon --verbose, I get:

[gpm_brightness_set_hw] gpm-brightness.c:301 (18:00:27): Setting 1 of 7
*** WARNING ***
[gpm_brightness_set_hw] gpm-brightness.c:308 (18:00:27): An unknown error occured
[gpm_brightness_set_hw] gpm-brightness.c:301 (18:00:27): Setting 2 of 7
*** WARNING ***
[gpm_brightness_set_hw] gpm-brightness.c:308 (18:00:27): An unknown error occured
[gpm_brightness_set_hw] gpm-brightness.c:301 (18:00:27): Setting 3 of 7
*** WARNING ***
[gpm_brightness_set_hw] gpm-brightness.c:308 (18:00:27): An unknown error occured
[gpm_brightness_set_hw] gpm-brightness.c:301 (18:00:27): Setting 4 of 7
*** WARNING ***
[gpm_brightness_set_hw] gpm-brightness.c:308 (18:00:27): An unknown error occured
[gpm_brightness_set_hw] gpm-brightness.c:301 (18:00:27): Setting 5 of 7
*** WARNING ***
[gpm_brightness_set_hw] gpm-brightness.c:308 (18:00:27): An unknown error occured
[gpm_brightness_set_hw] gpm-brightness.c:301 (18:00:27): Setting 6 of 7
*** WARNING ***
[gpm_brightness_set_hw] gpm-brightness.c:308 (18:00:27): An unknown error occured
[gpm_brightness_set_hw] gpm-brightness.c:301 (18:00:27): Setting 7 of 7
*** WARNING ***
[gpm_brightness_set_hw] gpm-brightness.c:308 (18:00:27): An unknown error occured

Revision history for this message
dennis (dwavomba) wrote :

I can confirm this behavior on a sony vgn-fs790. It worked fine on dapper

Revision history for this message
Luka Renko (lure) wrote :

It looks like this is more generic regression on multiple Sony laptops.
See duplicate bug 67074 where the problem is on Sony FJ170 .

Changed in gnome-power-manager:
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Revision history for this message
dennis (dwavomba) wrote :

This is a clarification on my previous post. On a sony vaio vgn-fs790, whats strange is I cannot set the brightness using the settings on gnome-power-manager. However, I can explicitly set the brightness by running (as root):

echo "1" > /proc/acpi/sony/brightness
(for maximal dimming)

echo "8" > /proc/acpi/sony/brightness
(for maximum brightness)

Hopefully, that helps. I don't know if this is reproducible on other sony vaio laptops.

Revision history for this message
Sylvek (smaucourt-deactivatedaccount) wrote :

the same under my sony vaio Z1RMP see #60588

Revision history for this message
Pedro Martinez-Julia (pedromj) wrote : Re: [Bug 65028] Re: doesn't dim screen on sony vaio vgn fs215m (regression)

Try this:

sudo mv /bin/sh /bin/sh.bak
sudo ln -s /bin/bash /bin/sh

Then try to change brightness in g-p-m. If it works by hand but not when
you unplug AC... it's AC event problem and you should wait until the
first battery event happends.

--
Pedro Martínez Juliá
\ <email address hidden>
)| WebLog: http://www.pedromj.com/blog
/ Página web: http://www.pedromj.com
GoogleTalk: <email address hidden>
Socio HispaLinux #311
Usuario Linux #275438 - http://counter.li.org

Revision history for this message
Sylvek (smaucourt-deactivatedaccount) wrote :

it's working ! thks

Revision history for this message
dennis (dwavomba) wrote : Re: [Bug 65028] Re: doesn't dim screen on sony vaio vgn fs215m (regression)

Thanks Pedro,

That worked although it would be good to know why.

d

On 11/1/06, Pedro Martínez Juliá <email address hidden> wrote:
>
> Try this:
>
> sudo mv /bin/sh /bin/sh.bak
> sudo ln -s /bin/bash /bin/sh
>
> Then try to change brightness in g-p-m. If it works by hand but not when
> you unplug AC... it's AC event problem and you should wait until the
> first battery event happends.
>
> --
> Pedro Martínez Juliá
> \ <email address hidden>
> )| WebLog: http://www.pedromj.com/blog
> / Página web: http://www.pedromj.com
> GoogleTalk: <email address hidden>
> Socio HispaLinux #311
> Usuario Linux #275438 - http://counter.li.org
>
> --
> doesn't dim screen on SONY VAIO (vgn FS215M / Z1 RMP) (regression)
> https://launchpad.net/bugs/65028
>

Revision history for this message
Pedro Martinez-Julia (pedromj) wrote : Re: [Bug 65028] Re: doesn't dim screen on sony vaio vgn fs215m (regression)

It works because "dash" is the default "/bin/sh" in Edgy and the scripts
that change the brightness depends on "let" that is not implemented in
"dash".

--
Pedro Martínez Juliá
\ <email address hidden>
)| WebLog: http://www.pedromj.com/blog
/ Página web: http://www.pedromj.com
GoogleTalk: <email address hidden>
Socio HispaLinux #311
Usuario Linux #275438 - http://counter.li.org

Revision history for this message
Andrew Chadwick (achadwick) wrote :

The workaround in comment 6 in this thread works for my Vaio VGN-B3XP.

This isn't really a bug with gnome-power-manager IMO: it's a bug with the hal deb. I've enclosed a patch against hal_0.5.7.1 which appears to fix it for me.

--

If you're an ordinary user and you just want to mend a running edgy so that backlight dimming when on battery works on a Sony laptop, just replace

    $((value + 1))

in /usr/share/hal/scripts/hal-system-lcd-set-brightness with:

    $(($value + 1))

and that should fix it. You'll need admin rights to do this: open a terminal and type

  sudo gedit /usr/share/hal/scripts/hal-system-lcd-set-brightness

and press return. Then make the change above, save, and quit. The change should take effect immediately.

Revision history for this message
Andrew Chadwick (achadwick) wrote :

Sorry, disregard the last patch. Forgot the -get- script :(

This one is just a replacement debian/patches/09_sony_brightness.patch .

--

Ordinary users who Just Want It Fixed may find it's simpler to do what Pedro mentioned in comment 6 above and ignore everything I've said.

If you want to fix it without making bash your default shell though, try changing

       let "value = ${value} - 1"

in /usr/share/hal/scripts/hal-system-lcd-get-brightness to

        value="$(($value - 1))"

as well as doing the thing above. Hope it works out for you :)

Revision history for this message
Julius (caesar-bs) wrote :

i confirm the bug on a vgn fe 21B with edgy.

julius

Revision history for this message
Mathias_Laurin (mathias-laurin) wrote :

confirmed on a Vaio VGN-G1 and solved by changing #!/bin/sh to #!/bin/bash in both set and get for good measure.

Revision history for this message
Oliver Grawert (ogra) wrote :

redirecting to hal to notify the right people

Revision history for this message
Oliver Grawert (ogra) wrote :

fixed in feisty

Changed in gnome-power-manager:
status: Unconfirmed → Rejected
Changed in hal:
status: Confirmed → Fix Released
Revision history for this message
Vyacheslav Rodionov (bepcyc) wrote :

I can confirm this bug for Feisty on Sony VAIO SZ340 (with intel video)

solved with making link to /bin/bash for /bin/sh

Revision history for this message
Duncan Lithgow (duncan-lithgow) wrote :

Vyacheslav, is the dimming failing on your machine? This bug is marked 'Fix released' - is that wrong? Should it be 'Fix committed'?

Revision history for this message
Markus Kienast (elias1884) wrote :

not working yet in feisty. vaio s560p

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.