Regression (10.10): Unable to adjust screen brightness on recent Sony Vaio notebooks, Intel GMA adapter

Bug #173652 reported by Michael Doube
106
This bug affects 8 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned
linux-source-2.6.22 (Ubuntu)
Won't Fix
Undecided
Unassigned
xbacklight (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Fn keys don't work for dimming the screen, though they do stimulate the sonybright.sh script.

xbacklight works if the notebook has an Intel 965 (x3100) display adapter, but is subject to bug #176888 (won't work on Hardy, bad XRandR setting).

See bug #95444 for a hack to nvclock which makes it possible to control backlight on nVidia 8 series adapters (SPEED mode on the SZ650).

There are 2 problems here:
1) The Vaio's LED screen is really very bright when burning at 100% and is hard to look at for any period
2) Battery life suffers

Pretty much all the newer Vaios (2007 onwards) have some combination of these graphics adapters so this bug should be widespread (and much appreciated when fixed!). A couple of script solutions have been proposed in this bug report; please feel free to hack and make suggestions.

One solution for notebooks with Intel 965 display adapters is to install xbacklight:

]$ sudo apt-get install xbacklight

Then add these 2 lines to /etc/rc.local (or just execute from the command line):

xrandr --output LVDS --set BACKLIGHT_CONTROL native
/etc/init.d/acpid restart

And edit /etc/acpi/sonybright.sh so that is contains only this:

#!/bin/bash
if [ "x$1" = "xdown" ]; then
   xbacklight -time 100 -steps 10 -dec 10 2>/tmp/sonybright.log
elif [ "x$1" = "xup" ]; then
   xbacklight -time 100 -steps 10 -inc 10 2>/tmp/sonybright.log
else
   echo >&2 Unknown argument $1
fi

Please note that this will not affect brightness on nVidia 8 series adapters, just Intel adapters.
Backlight on nVidia adapters is being dealt with in bug #95444, to separate this report from the nVidia report.
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: mdoube 4509 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfc500000 irq 48'
   Mixer name : 'SigmaTel STAC9872AK'
   Components : 'HDA:83847662,104d1e00,00100201 HDA:14f12c06,104d1700,00100000'
   Controls : 11
   Simple ctrls : 7
DistroRelease: Ubuntu 10.10
HibernationDevice: RESUME=UUID=a017c7e4-4a29-4ba1-bfea-52cd609781d8
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20100412)
MachineType: Sony Corporation VGN-SZ650N
Package: linux (not installed)
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.35-22-generic root=UUID=31cf7381-5708-4104-8d9e-a2eaaec7cbe7 ro quiet splash
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_GB.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
Regression: Yes
RelatedPackageVersions: linux-firmware 1.38
Reproducible: Yes
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
Tags: maverick kernel-graphics regression-release needs-upstream-testing
Uname: Linux 2.6.35-22-generic x86_64
UserGroups:

dmi.bios.date: 04/04/2008
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: R0122S5
dmi.board.asset.tag: N/A
dmi.board.name: VAIO
dmi.board.vendor: Sony Corporation
dmi.board.version: N/A
dmi.chassis.type: 10
dmi.chassis.vendor: Sony Corporation
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvrR0122S5:bd04/04/2008:svnSonyCorporation:pnVGN-SZ650N:pvrJ002UR2M:rvnSonyCorporation:rnVAIO:rvrN/A:cvnSonyCorporation:ct10:cvrN/A:
dmi.product.name: VGN-SZ650N
dmi.product.version: J002UR2M
dmi.sys.vendor: Sony Corporation

Revision history for this message
Michael Doube (michael-doube) wrote :

This big is still present and identical in Hardy Heron (today's Live CD)

Revision history for this message
Jim Stuttard (jim-stuttard) wrote :

Sony Vaio Z600 TEK 512MB 80MHz
Linux jim 2.6.22-14-server #1 SMP Sun Oct 14 23:34:23 GMT 2007 i686 GNU/Linux

Gutsy boots up dimmed. F+F5 and F+F6 do nothing so I have to run a brightness script.

Revision history for this message
Michael Doube (michael-doube) wrote :

The only solution I've come across so far is to run:

xbacklight -set n

where n is a number between 0 and 100.

And for the first time I have control over the brightness of my laptop's LCD. However, xbacklight has to be run from the command line and does not seem to interact with any of GNOME's applets, or ACPI events like plugging in AC mains or going onto battery. What's xbacklight doing that nothing else can do?

Revision history for this message
Michael Doube (michael-doube) wrote :

There's a limitation to xbacklight which is that it only works on the Intel adapter and not the nVidia one (Intel GM965 / GMA X3100 vs. nVidia 8400M GS), using the intel (experimental modesetting) or proprietary nvidia drivers.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Hardy Heron Alpha2 release will be coming out soon (like today). It will have an updated version of the kernel because unfortunately Hardy Alpha1 was released with the older Gutsy kernel. It would be great if you could test with this new release and verify if this issue still exists. I'll be sure to update this report when Alpha2 is available. Thanks!

Changed in linux:
status: New → Incomplete
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

I'm opened a new task against the actively developed kernel. However, I'm closing the report against linux-source-2.6.22 as it does not meet the criteria for a stable release update. You can learn more about the stable release update process at https://wiki.ubuntu.com/StableReleaseUpdates . Thanks!

Changed in linux-source-2.6.22:
status: New → Won't Fix
Revision history for this message
Michael Doube (michael-doube) wrote :

This bug is still present in Hardy alpha-2

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Thanks for testing Michael. Per the kernel team's bug policy, can you please attach the following information:

* uname -a > uname-a.log
* cat /proc/version_signature > version.log
* dmesg > dmesg.log
* sudo lspci -vvnn > lspci-vvnn.log

Please be sure to attach each file as a separate attachment. For more information regarding the kernel team bug policy, please refer to https://wiki.ubuntu.com/KernelTeamBugPolicies . Thanks again and we appreciate your help and feedback.

Revision history for this message
Michael Doube (michael-doube) wrote :
Revision history for this message
Michael Doube (michael-doube) wrote :
Revision history for this message
Michael Doube (michael-doube) wrote :
Revision history for this message
Michael Doube (michael-doube) wrote :
Revision history for this message
Michael Doube (michael-doube) wrote :

xbacklight does not work in Hardy on the Intel driver, as reported here:
https://bugs.launchpad.net/ubuntu/+source/xbacklight/+bug/176888

Revision history for this message
Michael Doube (michael-doube) wrote :

Logs from hardy follow...

Revision history for this message
Michael Doube (michael-doube) wrote :
Revision history for this message
Michael Doube (michael-doube) wrote :
Revision history for this message
Michael Doube (michael-doube) wrote :
Revision history for this message
Michael Doube (michael-doube) wrote :
Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: Incomplete → Triaged
Revision history for this message
Michael Doube (michael-doube) wrote :

This bug is still present in Hardy alpha-4

Revision history for this message
Michael Doube (michael-doube) wrote :

...and Hardy alpha 5 ...

Revision history for this message
Michael Doube (michael-doube) wrote :

And Hardy Beta...

description: updated
Revision history for this message
jeannich (jeannich) wrote : Re: unable to adjust screen brightness on recent Sony Vaio notebooks

I have the same bug on my Sony Vaio-SZ95 laptop.
The default script "/etc/acpi/sonybright.sh" in Hardy beta does not seem to work.
You can try replacing it my workaround bellow (mainly inspired by "Matt"'s comment at "http://moelhave.dk/gnulinux-ubuntu-gutsy-gibbon-710-on-the-sony-vaio-sz6-series/") [Note that this script uses "/etc/acpi/var/brightness" file so, you have to create it]

#!/bin/bash
function adjust
{
   BRIGHTNESS=$1
   if [ $BRIGHTNESS -ge 9 ]; then
      BRIGHTNESS=9
   fi

   if [ $BRIGHTNESS -le -9 ]; then
      BRIGHTNESS=-9
   fi

   echo $BRIGHTNESS >/etc/acpi/var/brightness
   B=0.$BRIGHTNESS
   B=$(echo $B | sed -e {s/0.-/-0./})
   echo “adjusting brightness to $B”
   /usr/bin/nvidia-settings -c ":0.0" -V -a Brightness=$B 2>/tmp/sonybright.log
}

BRIGHTNESS=$(cat /etc/acpi/var/brightness)

if [ "x$1" = "xdown" ]; then
   BRIGHTNESS=$(( $BRIGHTNESS - 1 ))
   adjust $BRIGHTNESS
elif [ "x$1" = "xup" ]; then
   BRIGHTNESS=$(( $BRIGHTNESS + 1 ))
   adjust $BRIGHTNESS
else
   echo >&2 Unknown argument $1
fi

Revision history for this message
Michael Doube (michael-doube) wrote :

OK. Today dumb work decided that it would be great to have guys installing new windows in the lab, and didn't tell anyone. So here I am in the foyer hacking Ubuntu to get away from the annoying sound of masonry drills, instead of writing the code I'm meant to...

I've re-written jeannich's script to work with xbacklight.

To set up the file where brightness is stored, you have to
]$ mkdir /etc/acpi/var/
]$ cat 50 > /etc/acpi/var/brightness

There's only one snag, you have to run this during your xsession:
]$ sudo /etc/init.d/acpid restart

Also, GNOME appears to be totally ignorant of brightness, so no icon is echoed to the screen as brightness is adjusted.
A hybrid version of these scripts would be useful for those of us with both Intel 965 and nVidia 8400M GS cards (i.e all the recent SZ's) so that the Fn keys work in both SPEED or STAMINA modes

Save this script as /etc/acpi/sonybright.sh

#!/bin/bash
export DISPLAY=:0
function adjust
{
   BRIGHTNESS=$1
   if [ $BRIGHTNESS -ge 100 ]; then
      BRIGHTNESS=100
   fi

   if [ $BRIGHTNESS -le 0 ]; then
      BRIGHTNESS=0
   fi

   echo $BRIGHTNESS >/etc/acpi/var/brightness
   B=$BRIGHTNESS
   echo “adjusting brightness to $B”
   /usr/bin/xbacklight -set $B 2>/tmp/sonybright.log
}

BRIGHTNESS=$(cat /etc/acpi/var/brightness)

if [ "x$1" = "xdown" ]; then
   BRIGHTNESS=$(( $BRIGHTNESS - 10 ))
   adjust $BRIGHTNESS
elif [ "x$1" = "xup" ]; then
   BRIGHTNESS=$(( $BRIGHTNESS + 10 ))
   adjust $BRIGHTNESS
else
   echo >&2 Unknown argument $1
fi

description: updated
Revision history for this message
Michael Doube (michael-doube) wrote :

Actually,
export DISPLAY=:0
is not required.

Revision history for this message
jeannich (jeannich) wrote :

Thanks for the update, I didn't knew "xbacklight". The script can therefore shortened as xbacklight keeps a copy of the current luminosity. Here is the shortened script:

#!/bin/bash
if [ "x$1" = "xdown" ]; then
   xbacklight -time 0 -steps 1 -dec 10 2>/tmp/sonybright.log
elif [ "x$1" = "xup" ]; then
   xbacklight -time 0 -steps 1 -inc 10 2>/tmp/sonybright.log
else
   echo >&2 Unknown argument $1
fi

Revision history for this message
Michael Doube (michael-doube) wrote :

Thanks for that jeannich, it works really well (though I like to set -time 100 -steps 10 for smooth changing).

You still have to run these 2 lines after each reboot though:

:~$ xrandr --output LVDS --set BACKLIGHT_CONTROL native
:~$ sudo /etc/init.d/acpid restart

And GNOME does not recognise a change in backlight state.

Revision history for this message
jeannich (jeannich) wrote :

Right Michael,
And probably those 2 lines could be added in /etc/rc.local till bug #197929[https://bugs.launchpad.net/ubuntu/+source/linux/+bug/197929] (and therefore 176888[https://bugs.launchpad.net/ubuntu/+source/xbacklight/+bug/176888] as a duplicate) isn't solved.
I didn't tried yet but it should work.

By the way about smooth changing matter, I think I have a bug at least on my machine: xbacklight response times is sometime not immediate and in some cases doesn't respect the "time" setting.
I have set "time" to 0 in order to hace an immediate xbacklight change it sometime doesn't work.
This may be another issue: could you check on your machine Michael?

Here is an use case example:
-Push Fn keys 3 times to increase backlight luminosity

Result expected:
-Luminosity is increased 3 times successively by the amount asked (10% with my above script)

Bad result sometime on my computer:
-Luminosity doesn't change for an approximate time of 1 to 2 seconds (it should be immediate) and then suddenly increase luminosity by 3 steps

Revision history for this message
Michael Doube (michael-doube) wrote :

Jeannich,

My backlight always changes smoothly, though if I hit Fn+F5 or Fn+F6 rapidly 5 times it takes a couple of seconds to make the whole change, but there is no delay from my first key press to the first backlight increment / decrement.

I'm not going to add those 2 lines to /etc/rc.local because they will obscure bug fixes.

Revision history for this message
jeannich (jeannich) wrote :

Thank you for the feedback Michael,

So if you have that delay too, that may be an other xbacklight issue (or an improvement/feature request).
About rc.local, I'll keep mine modified and will remove it when xbacklight patch is released.

Revision history for this message
Zaca (zaca98) wrote :

I have a Sony Vaio VGN-NR11Z (GMA x3100)

The brightness control didn't work. Installing xblacklight and
using the "xrandr --output LVDS --set BACKLIGHT_CONTROL native"
I can set the brightness over the command line. The scripts
above didn't work for me, the Fn-F5 and Fn-F6 don't work anyway.

I'm not sure the script is being activated at all by those keys, how
can I check that?

Revision history for this message
benste (benste) wrote :

XRANDR doesn't work for my nvidia driver.

But you can use powersaving functions of a geforce card:
the normal driver installs nvclock
just type in your terminal "nvclock -S -10" or instead of - or + 10 a value between 15 and 100

Can someone change the script that these options are used for nvidia cards?

Revision history for this message
Petr Menšík (pihhan) wrote :

I have wrote script for using xbacklight for acpi buttons. I believe your script wont work, because mine havent work also when done like yours. Problem is that xbacklight needs access to X server, when executed by acpi event, it does not have it. When executed from terminal when testing, it work well. Moreover, you have your own file to store brightness value. That is not needed, because xbacklight have increase and decrease options also.

My script is under https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/232464 bug in acpi routines. It does contain some more things, like lower bright on battery run. I suggest you take a look on archive, as it is a bit better.

As for nvidia driver: check /etc/acpi/sony-bright.sh script, how is that done. If nvclock does not need access to X server, you can basically remove all other there. Or, you might try edit /etc/acpi/events/sony-brightness-(up|down).sh, and there put nvclock command with full path and parameters. It might work better. Reload then acpid using sudo invoke-rc.d acpid reload.

Note that i dont need any change in xbacklight before changing backlight. I have combination there from startup and it does work fine enough.

 $ xrandr --prop | grep BACKLIGHT
 BACKLIGHT_CONTROL: combination
 BACKLIGHT: 10396 (0x0000289c) range: (0,26015)

I have Sony Vaio VGN-FZ210C with
 $ lspci|grep VGA
 00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)

Revision history for this message
benste (benste) wrote :

:-) I tried to mod the sonybrightness file with nvclock -S -10 command and so on but I'm not exactly shure wheter it was right - can you give me a nvclock script which should work? I don't understand enough of the script for modding right.

Revision history for this message
huiii (a00ps) wrote :

which version of nvclock are u using?

Revision history for this message
benste (benste) wrote :

NVClock v0.8 (Beta3)

Revision history for this message
benste (benste) wrote :

@ pihhan
I've already posted my events:
http://ubuntuforums.org/showthread.php?t=465491&goto=newpost

-> site seems to be curretnly offline

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

I dimmed my screen!!! You guys don't have any idea how happy I am!

I did add those two lines to rc.local and used the most shortened version of the script.

I do so with the rest of my extra hardware worked such as VGA, mic, headphone, etc. But this is a HUGE step in that direction.

Thanks for everybody that figured out how to get this far.

description: updated
description: updated
Revision history for this message
Michael Lustfield (michaellustfield) wrote :

I found an issue with that rc.local idea. It appears that those lines need to be executed after gdm is running. I created a script that lets you run it. Once running, press "i" to run the two lines that make screen brightness work. One uses sudo so you will need to be able to run that command. From there you can press either the up or down arrow keys to change the brightness. You don't need to run "i" each time you start the script, just each time gdm starts up. and obviously q will exit the script.

Hope it helps. I know it can be cleaned up, but I'm more concerned about a convenient and usable script. I keep this one in my ./bin.

#!/bin/bash

while true; do
 clear
 echo "up = Screen Brightness Up"
 echo "down = Screen Brightness Down"
 echo "i = Intialize Hardware"
 echo "q = Quit"

 read -s -n1 key

 clear

 case "$key" in
  $'\033')
   read -s -n1 key; read -s -n1 key
   case "$key" in
    A)
     xbacklight -time 0 -steps 1 -inc 10 2>/tmp/sonybright.log
     ;;
    B)
     xbacklight -time 0 -steps 1 -dec 10 2>/tmp/sonybright.log
     ;;
   esac
   ;;
  i)
   xrandr --output LVDS --set BACKLIGHT_CONTROL native
   sudo /etc/init.d/acpid restart
   ;;
  q)
   clear
   exit 0
   ;;
 esac
done

Revision history for this message
benste (benste) wrote :

Does it also work for nvidia card like my 7600 Go??

Revision history for this message
Petr Menšík (pihhan) wrote :

Before changing it like this, make sure nvclock does handle decrementing below zero and does not crash, if you request descreasing -S -10 when on 0, if that does ignore it. If it is, it is safe make it very simple. I recommend backup of original files. It should be safe making entire new files, maybe appending 2 to its name :) But havent tried it.

# /etc/acpi/events/sony-brightness-up

event=sony/hotkey (SPIC|SNC) 00000001 00000011
action=/usr/sbin/nvclock -S +10

# /etc/acpi/events/sony-brightness-down

event=sony/hotkey (SPIC|SNC) 00000001 00000010
action=/usr/sbin/nvclock -S -10

then reload acpid configuration, and it should work:
sudo invoke-rc.d acpid reload

Check also /var/log/acpid, if it does not report some interesting errors after key pressed. Should work after that, but who knows. Try and see.

If it does not handle border values, you try to find way to get value of current backlight from nvclock (maybe nvclock -S without number?). It should be needed to make script then.

But it is obvious we should make some detection script, maybe run at startup. It should guess which type of backlight control would work for our model, and set some variable to some file. At keypress of backlight, we may be able to use right method using that variable. I dont think it is wise to autodetect it at each keypress again and again. This would be needed especially on laptops with two GPUs, speed and stamina, as they could be always different on each boot (or does it support hotswap at windows?). We should make some wiki pageand write table, for what laptops with what GPU what method of backlight control did work. Because i dont believe one script will simply work for all vaios this way. And i want always working method, if possible :)

Revision history for this message
benste (benste) wrote :

It does handle border values:

benste@vaiofe31m:~$ nvclock -S -10
Changing Smartdimmer level from 30% to 20%
New Smartdimmer level: 20%
benste@vaiofe31m:~$ nvclock -S -10
Error: The proposed Smartdimmer change would result in a brightness level lower than 15% or higher than 100%.
-> ther is an error and level doesn't go deeper:

I'll try your solution

Revision history for this message
benste (benste) wrote :

nvclock isn't in /usr/sbin
it's in /usr/bin/nvlclock

the log file showed

[Wed May 28 15:36:57 2008] executing action "/usr/sbin/nvclock -S -10"
[Wed May 28 15:36:57 2008] BEGIN HANDLER MESSAGES
/bin/sh: /usr/sbin/nvclock: not found
[Wed May 28 15:36:57 2008] END HANDLER MESSAGES
[Wed May 28 15:36:57 2008] action exited with status 127

--> it works now !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1

thank you very very much !!!!!!!!

Is this also an solution for all othe

rs who can use nvlcock? Should it be posted into ubuntuforums.org - calling all vaio owners thread ?
There is only one bug which seems to be linked to nvlclock - if using nvlcock a couple of times (diming from 100% to 15% and back) it splits the display output in the midd le - but only the output is splited - you still have to click in the left corner if you want to be there - >
a screenshot give the normal results - so I think it's a mistake in the nvidia part.

Revision history for this message
benste (benste) wrote :

lol - it didn't work - I only used the wrong key (super insted of FN) :-)
I've no idea what's going on - here is the logfile:
[Wed May 28 15:55:09 2008] received event "sony/hotkey SNC 00000001 00000010"
[Wed May 28 15:55:09 2008] notifying client 5753[110:122]
[Wed May 28 15:55:09 2008] notifying client 14990[0:0]
[Wed May 28 15:55:09 2008] notifying client 14990[0:0]
[Wed May 28 15:55:09 2008] executing action "/usr/bin/nvclock -S -5"
[Wed May 28 15:55:09 2008] BEGIN HANDLER MESSAGES
Segmentation fault
[Wed May 28 15:55:09 2008] END HANDLER MESSAGES
[Wed May 28 15:55:09 2008] action exited with status 139
[Wed May 28 15:55:09 2008] completed event "sony/hotkey SNC 00000001 00000010"
[Wed May 28 15:55:09 2008] received event "sony/hotkey SNC 00000001 0000003b"
[Wed May 28 15:55:09 2008] notifying client 5753[110:122]
[Wed May 28 15:55:09 2008] notifying client 14990[0:0]
[Wed May 28 15:55:09 2008] notifying client 14990[0:0]
[Wed May 28 15:55:09 2008] completed event "sony/hotkey SNC 00000001 0000003b"

Revision history for this message
Petr Menšík (pihhan) wrote :

Ok, sorry, dont have that tool as i dont have nvidia, just guessed where it could be and missed.
Problem is with Segmentation fault line between handler messages. That is result with which program ended, which means, program crashed (fault of program, never should do that).
So, try running "DISPLAY= sudo /usr/bin/nvclock -S -5", what will it report that. In other words, we need to know if that tool does need access to X server to work. If it does dim screen anyway, it does not need it. Post what it does return.

Revision history for this message
benste (benste) wrote :

normally it works without sudo - like in the terminal
I changed it to DISPLAY = sudo ...
but there is still no action log file shows:

[Wed May 28 21:49:40 2008] received event "sony/hotkey SNC 00000001 00000010"
[Wed May 28 21:49:40 2008] notifying client 5929[0:0]
[Wed May 28 21:49:40 2008] notifying client 5771[110:122]
[Wed May 28 21:49:40 2008] notifying client 5929[0:0]
[Wed May 28 21:49:40 2008] completed event "sony/hotkey SNC 00000001 00000010"
[Wed May 28 21:49:40 2008] received event "sony/hotkey SNC 00000001 0000003b"
[Wed May 28 21:49:40 2008] notifying client 5929[0:0]
[Wed May 28 21:49:40 2008] notifying client 5771[110:122]
[Wed May 28 21:49:40 2008] notifying client 5929[0:0]
[Wed May 28 21:49:40 2008] completed event "sony/hotkey SNC 00000001 0000003b"

Revision history for this message
Petr Menšík (pihhan) wrote :

My last post was not related to acpi. I wanted to know, if nvclock does need working Xserver to operate. I tried basic things on my geforce card, but it does not support what i want to try. So.

Please test this command in terminal:

sudo su
# make sure you do not have full backlight, you want to increase it
/usr/bin/nvclock -S +10
# report if that did wrote anything, and if that changed backlight. It should
/usr/bin/nvclock -S -10
# did it lower backlight again? Did it write some error?
export DISPLAY="" HOME=/root
# now we dont have access to X server
/usr/bin/nvclock -S +10
# does it still work? does it print some error now?
exit

If all does work, try ctrl+alt+f1, and login there as user. then make it from sudo su to exit again from text console, and see if it does still work.

please try one command after one by hand, and see what it does. You have mapped it well to acpi event. If you changed event files in /etc/acpi/events with DISPLAY sudo ..., please put back there what i wrote about 5 post before. It does execute right thing, but it is crashing. I think you should create bug report for nvclock package, as it did Segmentation fault. It should work and do not crash.

Revision history for this message
benste (benste) wrote :

step by step - (you may contact me via IM - jabber: <email address hidden> or MSN - same adress or ICQ 477995243)

benste@vaiofe31m:~$ nvclock -S 50%
Changing Smartdimmer level from 100% to 50%
New Smartdimmer level: 50%
--> chaneing to 50% for start --> ok

benste@vaiofe31m:~$ sudo su
[sudo] password for benste:
root@vaiofe31m:/home/benste# /usr/bin/nvclock -S +10
Error: Can't open '/root/.nvclock'. Is it really a directory?

--> didn't change brightness !!! -> error

root@vaiofe31m:/home/benste# /usr/bin/nvclock -S -10
Changing Smartdimmer level from 50% to 40%
New Smartdimmer level: 40%

--> all fine - dimed display

root@vaiofe31m:/home/benste# /usr/bin/nvclock -S +10
Changing Smartdimmer level from 40% to 50%
New Smartdimmer level: 50%
-->ok
root@vaiofe31m:/home/benste# export DISPLAY="" HOME=/root
-> no output (no idea what it does)
root@vaiofe31m:/home/benste# /usr/bin/nvclock -S +10
Changing Smartdimmer level from 50% to 60%
New Smartdimmer level: 60%
--> worked !

changed to tty1:

used sudo su
k
/usr/bin/nvclock -S -10
worked!!

I'll change the events now - but please contact me to inform me how to go on

Revision history for this message
dreiche2 (david-reichert) wrote :

Alright guys, I'm no expert at all and basically tried to hack myself through the scripts, and now I'm not completely sure what I actually changed... but anyway, I *think* in /etc/acpi/events/sony-brightness-down it originally read:

event=sony/hotkey SPIC 00000001 00000010

However, when I use acpi_listen and the corresponding button, I get

sony/hotkey SNC 00000001 00000010

Note it reads SNC, not SPIC (whatever that means). I now changed SPIC to SNC in /etc/acpi/events/sony-brightness-down, and suddenly I can adjust my brightness with the corresponding keys (while still referring to the original /sonybright.sh as event)!

So is that the whole problem after all? I'm confused...

Revision history for this message
benste (benste) wrote :

sony/hotkey SNC 00000001 00000010
sony/hotkey SNC 00000001 0000003b
--> brightness down

sony/hotkey SNC 00000001 00000011
sony/hotkey SNC 00000001 0000003b
brightness up

--> I'll try to deleteSPIC in my script

Revision history for this message
benste (benste) wrote :

didn't work !!

Revision history for this message
Gaz Williams (garethjohnwilliams) wrote :

Just to chime in with a bit more information and a reminder in case we are losing focus, the original bug description concerned the NVidia Geforce 8 series cards, I have a Vaio VGN-SZ71WN which has a 8400 GS card on it, I tried the nvclock mentioned above (nvclock 8 b3) but it tells me:

"Smartdimmer is only supported on certain laptops using a Geforce 6200/7x00Go. If you want support on your laptop contact the author"

Which means the original problem is still not solved

Revision history for this message
moenster (moenster) wrote :

Aloha there!

Well, in a certain way it calms me, that I'm not the only one around with a nice Vaio Lappy I need sunglasses for ;-)
It's a FZ18M, nVidia 8400M GT.

Before I installed Hardy Heron (Kernel 2.6.24-16; nVidia drivers 169.12) I had Windows XP running besides Win Vista. The fn-keys did'nt work either -- BUT... With a slight modification of the driver's inf-file it was possible to adjust the LCD's brightness through the nVidia control center!

It's definitely a driver problem, isn't it? The most other forums I browsed say the same. So we'll have to wait for nVidia :-(

smartdimmer, nvclock, xbacklight, spicctrl and all these neat tool are more or less useless :-/

Revision history for this message
benste (benste) wrote : Re: [Bug 173652] Re: unable to adjust screen brightness on recent Sony Vaio notebooks
  • unnamed Edit (1.4 KiB, text/html; charset=ISO-8859-1)

I'm sorry, I'll open a new bug in a few days.

On Fri, Jun 6, 2008 at 10:27 PM, Gaz Williams <email address hidden>
wrote:

> Just to chime in with a bit more information and a reminder in case we
> are losing focus, the original bug description concerned the NVidia
> Geforce 8 series cards, I have a Vaio VGN-SZ71WN which has a 8400 GS
> card on it, I tried the nvclock mentioned above (nvclock 8 b3) but it
> tells me:
>
> "Smartdimmer is only supported on certain laptops using a Geforce
> 6200/7x00Go. If you want support on your laptop contact the author"
>
> Which means the original problem is still not solved
>
> --
> unable to adjust screen brightness on recent Sony Vaio notebooks
> https://bugs.launchpad.net/bugs/173652
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
Einen schönen Tag wünscht:

Benedict Stein
www.acwebdesign.de
Skype: Benedict.Stein
MSN: = Mail
ICQ : 477995243
Wolferskaulwinkel 19
52078 Aachen- Brand

Revision history for this message
Gaz Williams (garethjohnwilliams) wrote : Re: unable to adjust screen brightness on recent Sony Vaio notebooks

I am taking a two pronged attack now, I have raised the lack of 'Smartdimmer' support for Geforce 8 series cards here: http://sourceforge.net/forum/forum.php?thread_id=2070702&forum_id=67425

Be interesting to see which appears first, the bug fix, or the work around fix :-)

Revision history for this message
renato neves (trigun666) wrote :

anyone knows the state of this bug ?

Revision history for this message
benste (benste) wrote :

Yes, I know,

Geforce 8 series is not supported by smartdimmer + nvclock
and FNkeys in brightness script won't work for geforce series and intels
on some notebook like Fz an sz they seems to work but sonybrightness script seems not to be able to handle smartdimmer so that it takes affect on the brightn.

Revision history for this message
renato neves (trigun666) wrote :

And in the future ? Are there any plans to resolve this bug ?

Revision history for this message
benste (benste) wrote :

I've got not enugh knowledge for things like that,
I was in contact with phihan who created something like 59 sony acpi rules and added the keys in xorg.
This option can create the shotcuts but after relogin hey're away.
2nd problem the geforce8 seriece with nvclock is disscused in sourceforge and nv forum

Revision history for this message
darylb (darylblanc) wrote :

Regarding the Intel chip issue on Sony Vaio's, the xbacklight xrandr workaround no longer works on Intrepid Ibex Alpha 3 (running livecd):

root@ubuntu:~# xbacklight -set 50
No outputs have backlight property
root@ubuntu:~# xrandr --output LVDS --set BACKLIGHT_CONTROL native
X Error of failed request: 170
  Major opcode of failed request: 151 (RANDR)
  Minor opcode of failed request: 15 ()
  Serial number of failed request: 14
  Current serial number in output stream: 14
root@ubuntu:~# xbacklight -set 50
No outputs have backlight property
root@ubuntu:~#

Revision history for this message
Michael Doube (michael-doube) wrote :

It works for me on Intrepid alpha 4 live CD - amd64 desktop version.

Revision history for this message
darylb (darylblanc) wrote :

Ahhh, Its probably because I had to boot the LiveCD in safe graphics mode. Thanks for checking Michael!

Revision history for this message
darylb (darylblanc) wrote :

I have installed Intrepid Alpha 4 to my HDD now, so I'm not in "safe graphics" anymore. Also I have installed all updates just now and rebooted. However this still doesn't work for me.
I have a Vaio VGN-SZ71WN. I'm running the 32 bit desktop version. If there is any more info you would like me to collect I'd be happy to do it.

daryl@lappytoppy:~$ xrandr --output LVDS --set BACKLIGHT_CONTROL native
X Error of failed request: 171
  Major opcode of failed request: 152 (RANDR)
  Minor opcode of failed request: 15 ()
  Serial number of failed request: 14
  Current serial number in output stream: 14
daryl@lappytoppy:~$ xbacklight -set 50
No outputs have backlight property
daryl@lappytoppy:~$ xrandr --prop | grep BACKLIGHT
daryl@lappytoppy:~$

root@lappytoppy:~# lspci | grep Display
00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)

Also, a separate issue (although it may be related to the above failure which is why I'm mentioning it) is that my screen resolution is detected as 1024x600, but should really be 1280x800.

Revision history for this message
Michael Doube (michael-doube) wrote : Re: [Bug 173652] Re: unable to adjust screen brightness on recent Sony Vaio notebooks

daryl

Is the intel driver loaded?

grep intel /var/log/Xorg.0.log should return something like this:

(==) Matched intel for the autoconfigured driver
(II) LoadModule: "intel"
(II) Loading /usr/lib/xorg/modules/drivers//intel_drv.so
(II) Module intel: vendor="X.Org Foundation"
(II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
(II) intel(0): Creating default Display subsection in Screen section
(==) intel(0): Depth 24, (==) framebuffer bpp 32
(==) intel(0): RGB weight 888
(==) intel(0): Default visual is TrueColor
(II) intel(0): Integrated Graphics Chipset: Intel(R) 965GM
(--) intel(0): Chipset: "965GM"
(--) intel(0): Linear framebuffer at 0xD0000000
(--) intel(0): IO registers at addr 0xFC000000
(II) intel(0): 2 display pipes available.
(==) intel(0): Using EXA for acceleration

2008/8/17 darylb <email address hidden>:
> I have installed Intrepid Alpha 4 to my HDD now, so I'm not in "safe graphics" anymore. Also I have installed all updates just now and rebooted. However this still doesn't work for me.
> I have a Vaio VGN-SZ71WN. I'm running the 32 bit desktop version. If there is any more info you would like me to collect I'd be happy to do it.
>
> daryl@lappytoppy:~$ xrandr --output LVDS --set BACKLIGHT_CONTROL native
> X Error of failed request: 171
> Major opcode of failed request: 152 (RANDR)
> Minor opcode of failed request: 15 ()
> Serial number of failed request: 14
> Current serial number in output stream: 14
> daryl@lappytoppy:~$ xbacklight -set 50
> No outputs have backlight property
> daryl@lappytoppy:~$ xrandr --prop | grep BACKLIGHT
> daryl@lappytoppy:~$
>
> root@lappytoppy:~# lspci | grep Display
> 00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c)
>
> Also, a separate issue (although it may be related to the above failure
> which is why I'm mentioning it) is that my screen resolution is detected
> as 1024x600, but should really be 1280x800.
>
> --
> unable to adjust screen brightness on recent Sony Vaio notebooks
> https://bugs.launchpad.net/bugs/173652
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
darylb (darylblanc) wrote : Re: unable to adjust screen brightness on recent Sony Vaio notebooks

No. Looks like it wasn't autodetected correctly, its using VESA instead. In Gutsy and Hardy I believe this was autodetected and didn't need any manual setup. I have attached /var/log/Xorg.0.log.

Revision history for this message
darylb (darylblanc) wrote :

My xorg.conf actually specifies vesa. Is this done by the installer due to running the installer in safe graphics mode? In any case there is an issue with the graphics when running the LiveCD, which may be the reason I'm loading vesa now and not intel. This is a separate bug however.

Revision history for this message
darylb (darylblanc) wrote :

I have logged a separate bug 258884 against my separate issue. Apologies for the noise in here.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Since Michael is the original bug reporter and he has commented that this is fixed in Intrepid - https://bugs.edge.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/173652/comments/61 - I'm tentatively marking this "Fix Released" . Michael, if you notice any regressions please feel free to flip the status back to "New". Thanks.

Changed in linux:
status: Triaged → Fix Released
Revision history for this message
Niels Slot (nielsslot) wrote :

Can anyone confirm that this also works on Vaio's with NVida GeForce 8 graphics cards? As far as I know this fix is only for Intel graphics cards.

Revision history for this message
Olivier Cortès (olive) wrote :

Hi,

here on a Sony Vaio BZ11XN (Intel X4500MHD), the back light doesn't work (it is @100% at boot, and Fn-F5/F6 do not work). After having followed #258994 (which I encountered too), i came here.

The rc.local/xrandr + manual xbacklight trick works. I didn't try to alter the /etc/acpi/ script yet, but I will.
On my up-to-date intrepid, the

xrandr --output LVDS --set BACKLIGHT_CONTROL native

command works as expected and doesn't produce any error.

Revision history for this message
Michael Doube (michael-doube) wrote :

Leann,

What works in Intrepid is the workaround. Dimming and Fn keys are not implemented in Intrepid.

Changed in linux:
status: Fix Released → In Progress
description: updated
Revision history for this message
Alwin Garside (yogarine) wrote :

I have a VAIO VGN-NR230AE and both on Hardy and Intrepid only rc.local/xrandr + manual xbacklight works.

Also on Hardy the functions keys don't even produce any ACPI events according to https://wiki.ubuntu.com/LaptopTestingTeam/HotkeyResearch (see bug #251665), I haven't tested this on Intrepid yet, though.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

I'll be sure to try it out. I don't know if I'll be able to right away since I'm getting back surgery soon. I'll do my best to remember to put some blank CD's by my bed.

Also, I do have some issues with hardware working on this thing. Things such as microphones, and speakers don't always work. I'll remember to report on all of it.

I've been modifying that light script some. I like it much better and I've constantly been forgetting to post the update. So here it is.

Revision history for this message
Warren Seine (warren-seine) wrote : Re: [Bug 173652] Re: unable to adjust screen brightness on recent Sony Vaio notebooks

On Thu, Aug 28, 2008 at 7:34 PM, Leann Ogasawara <email address hidden> wrote:

> The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the
> upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would
> appreciate it if you could please test this newer 2.6.27 Ubuntu kernel.
> There are one of two ways you should be able to test:
>
> 1) If you are comfortable installing packages on your own, the linux-
> image-2.6.27-* package is currently available for you to install and
> test.
>
> --or--
>
> 2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer
> 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4.
> Please watch http://www.ubuntu.com/testing for Alpha5 to be announced.
> You should then be able to test via a LiveCD.
>
> Please let us know immediately if this newer 2.6.27 kernel resolves the
> bug reported here or if the issue remains. More importantly, please
> open a new bug report for each new bug/regression introduced by the
> 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please
> specifically note if the issue does or does not appear in the 2.6.26
> kernel. Thanks again, we really appreicate your help and feedback.
>

The bug probably comes from the nVidia driver. Why would a kernel update
change anything ?
Take a look at nVidia unofficial forums [1], it has been reported a few
times. The current Linux nVidia driver just don't deal correctly with screen
brightness. It's especially a problem with GeForce 8.

[1] http://www.nvnews.net/vbulletin/showthread.php?t=100494
--
Warren Seine

Revision history for this message
benste (benste) wrote : Re: unable to adjust screen brightness on recent Sony Vaio notebooks

This bug report is not only about nvidia 8 series,
there is also a problem for 7 and older series.

Most recent models has not working FN Keys in Ubuntu, in my opinion this is the main problem.

Revision history for this message
Alwin Garside (yogarine) wrote :

Actually this bug report is also about VAIO's with Intel bases GPU's...

Revision history for this message
Olivier Cortès (olive) wrote :

Hi,

Here still on Vaio BZ11XN (Intel X4500MHD).
The 2.6.27-2 kernel does NOT fix the problem. (My Intrepid is up-to-date)

Only rc.local/xrandr + xbacklight can workaround the problem ;

BUT : 2 times out of 3, the rc.local call to xrandr seems to make some kind of race condition with gdm startup, and X do not start completely : gdm starts, the screen blinks 2 or 3 times, then remains black (with backlight on) ; no response from anything (CAPS led is unresponsive, nor SysRq-reboot). Pulling the xrandr call from rc.local and calling it in a terminal *after* GNOME session has opened is OK and makes xbacklight work everytime.

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

Currently on the latest alpha release. Running Linux/x86_64 (2.6.27-3-generic).

Here we go w/ screen brightness..... Nope, didn't work.

Xev produced output for:
127 Pause
127 Break
37 Control_L
no output for the mute button, but that did work.

That's leave the screen brightness up and down, the button for changing to an external monitor, the magnifying class with a + in it, and the sleep button I think.

I was able to get some output from showkey -k and -a, but not from -s. I'm attaching all three files.

Revision history for this message
Michael Lustfield (michaellustfield) wrote :
Revision history for this message
Michael Lustfield (michaellustfield) wrote :
Revision history for this message
Michael Lustfield (michaellustfield) wrote :

hrm.... Thid might be interesting as well... I was trying to execute "/etc/init.d/hotkey-setup start" and got an error. I went looking into the script and found a pretty like block that pretty much slapped me. Nice script guys, very neat and tidy.

So I tried executing it on my own...

root@ubuntu:~# modprobe sonypi; # Needed to get hotkey events
FATAL: Module sonypi not found.
root@ubuntu:~# modprobe sony-laptop
root@ubuntu:~#

For the record, I'm looking at line #166.

As an end user, I'm not sure what more I can do. It does however, seem that perhaps there's a module missing from the kernel that should maybe be there?

If I'm right, could that maybe be revisited in my bug report for the motion eye camera?

On another side note. I just found out today there's a WLAN light on here. That's really neat, I've had it for a year and never seen it before. It's already getting irritating to see, but it's progress. :) (Not entirely fond of the NewHuman theme, but it does in fact meet a lot of requests.

Revision history for this message
Michael Doube (michael-doube) wrote :

Michael

The sonypi module has been (or will be) deprecated:
http://www.linux.it/~malattia/wiki/index.php/Sony-laptop

So it should probably not even be asked for in /etc/init.d/hotkey-setup - in any case, it just throws an error because the sonypi module is no longer included with the kernel.

At the moment, the hotkeys themselves are set up and send acpi events, but translating those events into actual hardware changes is where we get stuck (you can check this with tail -f /var/log/acpid ).

Revision history for this message
Michael Doube (michael-doube) wrote :
Revision history for this message
Michael Lustfield (michaellustfield) wrote :

I was actually trying to do that from the Live CD, but the file didn't exist. I probably should have looked into it a little more.

Well, I guess we have 8.10 right around the corner, it looks like this one might not make the cut. :(

Revision history for this message
Michael Doube (michael-doube) wrote :

This bug is still present in Intrepid alpha 6

Revision history for this message
benste (benste) wrote :

sadly I think there won't be a solution even in 9.04.
But I hope I can get some infos from Sony europe on Club Vaio Conference which is at the end of october.

Are there any detailed questions for writing a driver? or something like that?

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

I'm also experiencing the same problem on vgn-fz21E with nvidia 8400M GT
But changing the brightness from the nvidia control panel work very well.... So is it realy an nvidia driver issue ?

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

I've also found another bug : https://bugs.launchpad.net/ubuntu/+source/hotkey-setup/+bug/95444 that is only on the problem from nvidia and brightness on vaio, that is to me less confusing than speaking for two different cards

Revision history for this message
Michael Doube (michael-doube) wrote : Re: Unable to adjust screen brightness on recent Sony Vaio notebooks, Intel GMA adapter

OK, lets make this bug just about Intel backlight, and send nVidia vaio problems to bug #95444.

description: updated
Revision history for this message
Michael Lustfield (michaellustfield) wrote :

In yesterdays daily build I tried to change screen brightness. The screen somewhat blinked and I saw a waiting cursor for a second. Unfortunately, the screen brightness didn't change.

After running this command, I had no more reaction from pressing the keys. I couldn't get a network connection to download xbacklight to run the part of the script that changes the brightness
xrandr --output LVDS --set BACKLIGHT_CONTROL native

Looking hopeful,
-Mike

Revision history for this message
Walter_Wittel (wittelw) wrote :

Wow, long bug. Hope I didn't miss something obvious. I have a Vaio VGN-CR120E with the " Integrated Graphics Chipset: Intel(R) 965GM" chip set and have always (since at least Hardy beta) been able to adjust the brightness with the following two command lines (although hotkeys have never worked):

sudo /etc/acpi/sonybright.sh up
sudo /etc/acpi/sonybright.sh down

Not sure how I discovered this workaround for the keys, but in release Hardy someone tipped me off that I could use the panel gnome-brightness-applet which gave me an acceptable solution. Unfortunately that is now broken in Intrepid and I'm back to terminal to adjust my screen brightness :-( https://bugs.launchpad.net/ubuntu/+source/gnome-power-manager/+bug/243904 ).

Anyway, hope this bit of information might be helpful to others.

Revision history for this message
Michael Doube (michael-doube) wrote :

Backlight hotkeys are working much better in Intrepid Beta on my Vaio SZ650, Intel 965.

The on-screen indicator came up, showing me that GNOME was aware of my keypresses, but backlight only changed after I ran this command:

]~$ xrandr --output LVDS --set BACKLIGHT_CONTROL native

I did not have to install xbacklight nor edit sonybright.sh, nor restart acpid.

Revision history for this message
Alwin Garside (yogarine) wrote :

In Intrepid, backlight hotkeys are now working for me after I run 'xrandr --output LVDS --set BACKLIGHT_CONTROL native'

Revision history for this message
Michael Doube (michael-doube) wrote :

Check out bug #176888, which I have unduped because it has not been fixed by the mother-bug's fixing.

Revision history for this message
Olivier Cortès (olive) wrote :

Hi,

on latest intrepid and vaio BZ11XN (X4500MHD) :
 - sudo /etc/acpi/sonybright.sh {up|down} works, but only after "xrandr … CONTROL=native"
 - xbacklight works, with xrandr previously called too (but not without)
 - Fn-keys produce nothing for LCD (but work for sound), and I attached my acpi debug info to bug https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/251665 but I think it was missed because the bug is fixed for original poster and not for me, though we had the same problem.

more HW info available @ http://deep-ocean.net/files/sony/

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

Just another confirm for working after running 'xrandr --output LVDS --set BACKLIGHT_CONTROL native'.
I'm now running 8.10 so I'll scream with joy in here when it's working for me.

One thing I am noticing though, is that the reaction time is pretty slow. When I press the Fn+F5/6 it takes almost a second to change. This keeps me from being able to quickly tap down the brightness next to bottom.

One other thing I've been noticed (previous work arounds as well)... When turning the brightness all the way down, the screen goes from slightly visible (about the lowest I can use it) to pretty much entirely black.

Either way - :D :D :D

Side Note: Touchpad doesn't work quiet the same and has a very narrow right scroll. As well as I need to test out all the other hardware such as external monitor since it might work now. :D

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

OH! Unfortunate!

Apparently nobody ever sit on this xrandr fix. After changing the screen brightness to the desired level, I use the system. I'm completely active when doing so. Somehow the screen just starts fading to black. I haven't had this issue with the fix in 8.04.1 but it's showing up now.

It seems like once this starts happening, I can't change the screen brightness easily. I hit the screen brightness up in reaction to the downward direction it's taking and it doesn't respond for a while. It takes 5-20 sec for it to react and change the brightness back up. It does seem to somewhat snap back up once it hits the point of listening to me though.

Not sure what else I can do to help here.

Revision history for this message
Michael Doube (michael-doube) wrote :

@ Lustfield
Check out bug #258920
It's probably not a bug in xbacklight, but I don't know what else to target it at.

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

ok, so that bug will take care of this new issue.

We're still left with needing to run xrandr in this one...

Progress :D

Revision history for this message
Michael Doube (michael-doube) wrote :

Ran a bunch of updates today and now I get a screen brightness icon showing up when I hit the backlight Fn keys. Hardy. Not sure if scripts etc. are still needed, will test over the next few days.

Revision history for this message
Olivier Cortès (olive) wrote :

Here on latest Intrepid, Fn-keys still not working. Intel GMA X4500MHD on Sony Vaio BZ11XN.
Backlight works with xbacklight on command line, ONLY AFTER xrandr call in the session startup.

Revision history for this message
Michael Doube (michael-doube) wrote :

Backlight behaviour in Hardy has changed slightly; now the backlight indicator (I guess from g-p-m) is shown on the screen in response to Fn-keys but the rest of the bug is unchanged: still need script, to run xrandr command and restart acpid.

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

There's a difference here too.

I can use the Fn keys to change the brightness setting prior to running the xrandr command. Once I run it, I have no control over it. The xbacklight commands no longer work either.

I guess we're somewhat back to it not working at all except that I still have the oscillation.

description: updated
Revision history for this message
Michael Lustfield (michaellustfield) wrote :

After todays updates the xrandr command allows the dimming to occur.

This really sucks that it's not a true dim but rather that other bug. I guess that's why I don't notice much over 15min improvement on battery life.

Revision history for this message
Brian Royer (brian-royer) wrote :

Through countless hours of searching, I've compiled two different scripts into one short bash.

#!/bin/bash

# backlight control (sudo apt-get install xbacklight)
# props to everyone in the ubuntu community ~shyce

xrandr --output LVDS --set BACKLIGHT_CONTROL native
sudo /etc/init.d/acpid restart
app=`which xbacklight`
current=`$app -get`
ans=$(zenity --scale --text "Set LCD brightness 0-100" --value "${current%%.*}");
$app -set $ans

Enjoy! Something was noted about xrandr not being needed anymore - which would comment out the first two line, is this true? If so, would you mind sharing exactly what needs to be done to update our xrandr?

Revision history for this message
Brian Royer (brian-royer) wrote :

Forgot, for anyone who hasn't wrote a script before:

Put that in a new file and name the file 'ChangeBacklight.sh'

Open up a terminal window and navigate to the directory you saved the file in, i.e 'cd ~/Desktop'

Type 'sudo chmod a+x ChangeBacklight.sh'

Then just open up the file and set the backlight.

Revision history for this message
Petr Menšík (pihhan) wrote :

Please concentrate on fixing correct way of backlight control instead of writing custom scripts. Instead, report please if on correct FN keys it does move backlight bar with OSD and if it dimmed backlight or only bar changed without changing brightness.

I report on my model, using live CD downloaded today, hotkeys does work out of the box pretty nice. It does show backlight OSD, it does move the bar in correct way. After login, it does not work, because i have to switch xrandr control to other method. I have tried all four and all were working but default one: kernel. So i am subjecto to bug #176888 also. After switching xrandr. it does work.

I am including script to gather some (maybe) needed information to solve this problem. We have to figure out what models need xrandr modification and what do not. Please secify your model, exact card revision and status of working before and after xrandr changing to native. I made script to help with that, it should help you to gather info.

Revision history for this message
Petr Menšík (pihhan) wrote :

For me, it does work after change of BACKLIGHT_CONTROL using xrandr to combination (or any different from kernel)

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

I do feel this is redundant. BUT.....

I attached that info you wanted. I feel that script is rather bloated so instead ran the commands.

I need xrandr. Once I do that, everything works except for the oscillation bug. This bug is filed and mentioned above.

Once oscillation begins, I need to wait for it to hit a certain point before changing the brightness again. This tends to mean going to pretty much entirely non-visible first.

There were some xorg updates today (I think today) that I haven't tested yet.

-
The script posted above by Brian Royer is not correct. ACPI does not need to be restarted. There is no need to zenity. As of this point in time, there is only one command that needs to be run to gain control over all systems that are being actively tested against. "xrandr --output LVDS --set BACKLIGHT_CONTROL native"

Again, I feel this is redundant, but perhaps it will help people that skim this bug, which is getting large, looking for a quick fix or more information.

Revision history for this message
Brian Royer (brian-royer) wrote :

Not sure what is up with the negative post, I was giving people with Hardy (no backports/unsupported updates) 8.04 a temporary alternative until a full out fix is patched into this LTS.

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

This wasn't a negative post. People are posting things that have been repeated. Not as bad as a me too though. If you have a problem with what I said, bring it to me outside of a bug report.

Revision history for this message
JGJones (jgjones) wrote :

Laptop - Sony VAIO VGN-SZ71E
Ubuntu - 8.10 updated up to 4th Nov 2008.

On Stamina mode, so using Intel graphics, which is Intel

I confirm that in order to get dimming working all I need to do is to run this command:

xrandr --output LVDS --set BACKLIGHT_CONTROL native

And I do not need xbacklight, nor need to restart acpi. Just run the above command, the screen then blank out for half a second and back, and then I am able to use the Fn-F5/F6 to increase/decrease brightness on my Sony (finally...was going blind from the brightness, which is very extreme on a week-old laptop)

I've not attempted nvidia on Speed yet so will read the other bug report (it's not exactly needed...until I start putting on games that is :D)

Revision history for this message
kaervos (eudoxus) wrote :

Vaio VGN FS840/W (915GM chipset) here, using the latest xserver-xorg-video-intel v2:2.4.1-1ubuntu10. I also have this problem with my backlight. After quite some time debugging the gnome brightness applet and gnome-power-manager, I realized gnome-power-manager is seemingly dependent upon xrandr. When running gnome-power-manager with --no-daemon and --verbose, I can see that it thinks the range for my brightness is (0,0). Xrandr also thinks the range is (0,0). If I change BACKLIGHT_CONTROL to legacy with xrandr, --prop will say my backlight range is (0,255), which is reflected in gnome-power-manager. Unfortunately, adjusting the BACKLIGHT with xrandr or the brightness applet does nothing (I have tried setting BACKLIGHT_CONTROL to native, kernel, legacy and combination with no results).

When I run xbacklight, it returns "nan".

If I write a value from 0 to 7 into /class/backlight/sony/brightness, my screen brightness will be adjusted. I understand this to be a function of the sony-laptop module however, not the video driver. The brightness applet doesn't use this method, so it is effectively broken.

If I use the VESA driver, xrandr and the brightness applet work as expected.

I assume this has to do with the intel video driver?

Revision history for this message
Francesco Mignogna (frank17next) wrote :

RESOLVED:

Hi,
I've posted the solution on my website: http://www.frank17.it/linux/fz18m.htm (from http://www.linux-on-laptops.com/)
(In Italian language, i'm Italian)
See ya!

Revision history for this message
Eric Donkersloot (ericd) wrote :

The above solution is not for Vaio owners with an Intel chipset I guess, the hotkeys still do no work on my laptop, running up-to-date Intrepid:

ericd@vaiopro:~$ grep . -r /var/lib/acpi-support/*-*
/var/lib/acpi-support/bios-version:R0290Q1
/var/lib/acpi-support/system-manufacturer:Sony Corporation
/var/lib/acpi-support/system-product-name:VGN-BZ12XN
/var/lib/acpi-support/system-version:C102QZ98

ericd@vaiopro:~$ lspci -nn |grep -i vga
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller [8086:2a42] (rev 07)

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

You didn't follow the instructions on that site, did you?

The patch right now is to JUST run this command:
xrandr --output LVDS --set BACKLIGHT_CONTROL native

This is the only fix that's been confirmed.

Revision history for this message
Eric Donkersloot (ericd) wrote :

No, I didn't follow those instructions, I am using the workaround you mentioned in a script to set my brightness but this is far from ideal, a fix would be great. I guess I am suffering from two bugs ?

1. The xrandr bug, or is it a bug in xserver-xorg-video-intel ?
2. sony_laptop kernel module not working correctly with my laptop/chipset, brightness (and other) hotkeys do not work

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

Could you please go through the above steps we've taken to diagnose the problem?

At this point, we do have a working patch. It's only time before another developer takes this work and merges it upstream. This is how the bug fix process works.

Revision history for this message
Sean Coleman (sean-coleman) wrote :

I have a fairly recent model: Sony VGN-NR498E, Intel X3100.

With a fresh install of 8.10, the function keys cause the backlight OSD to move up and down properly, however there is no adjustment to the backlight.

If I use the command "xrandr --output LVDS --set BACKLIGHT_CONTROL native", I can immediately adjust brightness with the function keys. With native, I am subject to what I believe above is being called the oscillation bug. This setup is non-functional. Also, with native, if I click the power manager icon, the power manager doesn't respond.

On the other hand, If i use the command "xrandr --output LVDS --set BACKLIGHT_CONTROL legacy", I have brightness control with the function keys, and I don't have the oscillation problem. Some other events do adjust brightness (and leave it that way) though, such as going to preferences of the power manager dims the display.

With either BACKLIGHT_CONTROL setting, I don't have to use the xbacklight command at all, and I don't have xbacklight installed.

At the moment, "BACKLIGHT_CONTROL legacy" is the only tolerable situation.

Revision history for this message
bh1nd3r (preet-bhinder) wrote : Re: [Bug 173652] Re: Unable to adjust screen brightness on recent Sony Vaio notebooks, Intel GMA adapter

With "xrandr --output LVDS --set BACKLIGHT_CONTROL native" I can adjust my lcd brightness using xbacklight by I am still unable to get my function keys detected.

https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.15/+bug/38323

I have a sony vaio VGN-CR220e I wonder when my laptop's function keys will be supported by linux

Sean Coleman wrote:
> I have a fairly recent model: Sony VGN-NR498E, Intel X3100.
>
> With a fresh install of 8.10, the function keys cause the backlight OSD
> to move up and down properly, however there is no adjustment to the
> backlight.
>
> If I use the command "xrandr --output LVDS --set BACKLIGHT_CONTROL
> native", I can immediately adjust brightness with the function keys.
> With native, I am subject to what I believe above is being called the
> oscillation bug. This setup is non-functional. Also, with native, if I
> click the power manager icon, the power manager doesn't respond.
>
> On the other hand, If i use the command "xrandr --output LVDS --set
> BACKLIGHT_CONTROL legacy", I have brightness control with the function
> keys, and I don't have the oscillation problem. Some other events do
> adjust brightness (and leave it that way) though, such as going to
> preferences of the power manager dims the display.
>
> With either BACKLIGHT_CONTROL setting, I don't have to use the
> xbacklight command at all, and I don't have xbacklight installed.
>
> At the moment, "BACKLIGHT_CONTROL legacy" is the only tolerable
> situation.
>
>

Revision history for this message
Leann Ogasawara (leannogasawara) wrote : Re: Unable to adjust screen brightness on recent Sony Vaio notebooks, Intel GMA adapter

I'm changing the status of this bug back to a "Triaged" state. The reason is that a bug in an "In Progress" state should be assigned to a specific member of the kernel team to indicate who on the kernel team is working on the bug. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. I think this bug may inadvertently be getting overlooked since it is in an In Progress state but a specific member of the kernel team is not working on a fix. Thanks.

Changed in linux:
status: In Progress → Triaged
Revision history for this message
Eric Donkersloot (ericd) wrote :

Just wanted to let you know that under Fedora 10, I can use the LCD brightness applet in Gnome to set the brightness and I also don't need to run "xrandr --output LVDS --set BACKLIGHT_CONTROL native" or "xrandr --output LVDS --set BACKLIGHT_CONTROL legacy" first.

Hardware: Sony Vaio VGN-BZ12XN, Mobile Intel 4500MHD
Driver: xorg-x11-drv-i810-2.5.0-3.fc10.i386

The fn brightness keys still do not work though and they don't produce any acpi events.

Revision history for this message
Jobson (mrjobson-gmail) wrote :

Ony Sony Vaio VGN-CP190 brightness keys does not produce any event. Even with showkey -s / -k it does not show any code. But snd up/down - shows!

xrandr + xbacklight works but cannot be mapped to its hotkeys

Revision history for this message
Launchpad Janitor (janitor) wrote : Kernel team bugs

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

Revision history for this message
Derek7 (enrico-vittorini) wrote : Re: Unable to adjust screen brightness on recent Sony Vaio notebooks, Intel GMA adapter

On my SZ61, after typed in console:

xrandr --output LVDS --set BACKLIGHT_CONTROL native

i can control the luminosoty with the Fn key, on Intel video card.

Revision history for this message
Derek7 (enrico-vittorini) wrote :

sorry, I ment "the brightness"

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

I installed 9.04 today. Screen brightness and hotkeys for it are working perfect out of the box.

Revision history for this message
bh1nd3r (preet-bhinder) wrote : Re: [Bug 173652] Re: Unable to adjust screen brightness on recent Sony Vaio notebooks, Intel GMA adapter

Still now working with 9.04. My laptop is a Sony Vaio VGN-CR220E

On Fri, Jan 9, 2009 at 4:57 PM, Michael Lustfield <email address hidden>wrote:

> I installed 9.04 today. Screen brightness and hotkeys for it are working
> perfect out of the box.
>
> --
> Unable to adjust screen brightness on recent Sony Vaio notebooks, Intel GMA
> adapter
> https://bugs.launchpad.net/bugs/173652
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>

Revision history for this message
bh1nd3r (preet-bhinder) wrote :

I'm sorry I meant "still NOT working"

On Fri, Jan 9, 2009 at 10:05 PM, Mohan Preet S Bhinder <
<email address hidden>> wrote:

> Still now working with 9.04. My laptop is a Sony Vaio VGN-CR220E
>
>
>
> On Fri, Jan 9, 2009 at 4:57 PM, Michael Lustfield <email address hidden>wrote:
>
>> I installed 9.04 today. Screen brightness and hotkeys for it are working
>> perfect out of the box.
>>
>> --
>> Unable to adjust screen brightness on recent Sony Vaio notebooks, Intel
>> GMA adapter
>> https://bugs.launchpad.net/bugs/173652
>> You received this bug notification because you are a direct subscriber
>> of a duplicate bug.
>>
>
>

Revision history for this message
Michael Doube (michael-doube) wrote : Re: Unable to adjust screen brightness on recent Sony Vaio notebooks, Intel GMA adapter

Backlight control from hotkeys is now working on a fresh installation of Jaunty alpha 4.

More than 5 brightness steps would be better though, perhaps 10 would be good?

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

To be honest, with the patch I'm using in stable, I get 20 steps. I find this just a slight tad to many. mostly because I feel it should have a little better flow. 19 to 20 goes from I'd like this a little darker to completely black. Perhaps 15 would be a good number?

I'll have to grab an a4 cd and check it out. For me I know it'll be a matter of how well it works as opposed to working or not.

Revision history for this message
darylb (darylblanc) wrote : Re: [Bug 173652] Re: Unable to adjust screen brightness on recent Sony Vaio notebooks, Intel GMA adapter

On Jaunty with latest updates I now get 9 steps for the backlight with the
Fn key combination.
When I installed (Alpha 3) there were only 5 steps, so some update changed
it.
9 steps (while an odd number) is working a lot better now, and much more
usable because the difference between the steps is not so drastic.
I think its working very well now.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote : Re: Unable to adjust screen brightness on recent Sony Vaio notebooks, Intel GMA adapter

Hi Micheal,

Since you are the original bug reporter, based on you most recent comment - https://bugs.edge.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/173652/comments/132 - it would seem that the original issue of the brightness keys not even working is no longer an issue in the latest Jaunty Alpha. The granularity of the number of brigthness steps available would be more of a low to wishlist bug importance and I think should likely even warrant a new bug being opened. Would you agree? If so, lets go ahead and mark this one Fix Released for Jaunty and post a link to the new bug. It's much easier on the development teams if bug reports target one specific issue, otherwise they end up having to sift through 100+ comments before they even get to the new issue at hand. Thanks.

Changed in xbacklight:
status: New → Fix Released
Revision history for this message
Michael Lustfield (michaellustfield) wrote :

Yup, bug is definitely at Fix Released. Here's the follow up for that last little stuff. Bug 338596

Changed in linux:
status: Triaged → Fix Released
Revision history for this message
Michael Lustfield (michaellustfield) wrote :

Well... whether you were talking to me or not. :P I just thought you were referring to me since I also filed one prior. There really is enough here to call it fixed though. We haven't heard anyone come back yet disagreeing about the current state. Hurray for an extremely lengthy bug going away.

Changed in linux (Ubuntu):
status: Fix Released → New
summary: - Unable to adjust screen brightness on recent Sony Vaio notebooks, Intel
- GMA adapter
+ Regression (10.10): Unable to adjust screen brightness on recent Sony
+ Vaio notebooks, Intel GMA adapter
Revision history for this message
Michael Doube (michael-doube) wrote :

.... And this bug is back in 10.10 (Maverick) released yesterday. No backlight control using Fn keys, but xbacklight works fine.

Revision history for this message
Michael Doube (michael-doube) wrote : AcpiTables.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Michael Doube (michael-doube) wrote : AlsaDevices.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote : BootDmesg.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote : Card0.Codecs.codec.0.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote : Card0.Codecs.codec.1.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote : IwConfig.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote : Lspci.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote : Lsusb.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote : PciMultimedia.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote : ProcModules.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote : UdevDb.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote : UdevLog.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote : WifiSyslog.txt

apport information

Revision history for this message
Michael Doube (michael-doube) wrote :

I filed a new bug against acpi-support, bug #658198, so feel free to mark this report fix released (again) if you think it's a new issue.

Revision history for this message
Eric Donkersloot (ericd) wrote :

Brightness controls work fine on my Sony Vaio BZ12XN, I cannot reproduce this bug on 10.10.

Revision history for this message
Michael Doube (michael-doube) wrote :

Eric: fresh install, or upgrade? I upgraded using update manager.

Revision history for this message
Eric Donkersloot (ericd) wrote :

Michael: I did a fresh install of 10.10.

Revision history for this message
Walter_Wittel (wittelw) wrote :

FWIW the brightness keys (Fn-F5 & Fn-F6) work fine on my Vaio VGN-CR120E using the 32-bit version of 10.10 release booted from a LiveCD.

Revision history for this message
Michael Doube (michael-doube) wrote :

OK, looks like it's specific to my model, will re-close this bug and point everyone to bug #658198, where I am logging the not-very-entertaining task of bisecting Maverick's kernel Git tree to find where this bug started.

Changed in linux (Ubuntu):
status: New → Fix Released
To post a comment you must log in.