Make script for changing backlight using xbacklight on VAIO laptop
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
acpi-support (Ubuntu) |
Expired
|
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/
summary: |
- Make script for changing backlight using xbacklight + Make script for changing backlight using xbacklight on VAIO laptop |
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: /etc/acpi/ xbacklight- up.sh
event=sony/hotkey (SPIC|SNC) 00000001 00000011
action=
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.