Ubuntu

Make script for changing backlight using xbacklight on VAIO laptop

Reported by Pihhan on 2008-05-21
6
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: acpi-support

I have Sony Vaio laptop version VGN-FZ210C. It comes with Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller, also called X3100 on selling materials. Ubuntu has several way to control brighness, but most are ACPI or some laptop-specific driver based. Several Vaios have ACPI driven support. But mine does not. I believe every computer with X3100 is able to control brighntess using intel driver for that card. Using extension i can control backlight using xbacklight utility coming from xbacklight package (not in default ubuntu install).

I am able to map right fn key to right script, but there is none working. I believe it could be reused for other laptops with intel X3100 graphics as well, so it wont work only with sony.

Problem with xbacklight is that it needs access to X DISPLAY, as it does it via X11 extension. If ubuntu could configure mapping some global keys to userspace and it had prepared mappings for right keys, it might be possible to map it like XF86Play keys are in metacity. So metacity does not have such mapping in their hotkeys setup also. So, if it is doable, make also xbacklight working from acpi events.

It would be nice if sonybright.sh checked existence of files it is using.
It does read or write file /sys/class/backlight/sony/brightness, but it does not check if it does even exist. It is making error messages to log only that way. As not all VAIOs have same method of configuring backlight, it might be wise check before reading it.

Pihhan (pihhan) wrote :

i managed to make it work using some similar scripts in screenblank.sh. This way it does work as expected. I changed /etc/acpi/event/sony-brightness-down to call /etc/acpi/xbacklight-down.sh as action and similar with brightness-up. Also i changed event line, as my model reports actions using SNC and not SPIC. So i modified it to:

/etc/acpi/event/sony-brightness-down:
event=sony/hotkey (SPIC|SNC) 00000001 00000011
action=/etc/acpi/xbacklight-up.sh

Problem is i believe in not generic scripts. Many models have same hotkeys IDs (provided using SNC maybe, but ids are the same), it might need autodetection in script or manual type specification somewhere for generic and always working scripts for VAIOs. My script is working for me, but for Nvidia based models wont work.

Pihhan (pihhan) wrote :
Pihhan (pihhan) wrote :

Okay, made a newer version of this, in one script, with on-line/battery switching also. Comes with all changes needed (i hope) for sony vaios with intel.

summary: - Make script for changing backlight using xbacklight
+ Make script for changing backlight using xbacklight on VAIO laptop
Thomas Hotz (thotz) wrote :

Are you still affected by this bug? Thank you for telling us!

Changed in acpi-support (Ubuntu):
status: New → Incomplete
Launchpad Janitor (janitor) wrote :

[Expired for acpi-support (Ubuntu) because there has been no activity for 60 days.]

Changed in acpi-support (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers