Finally a brightness How To for Vaio FW Series
WARN: This how to is only for laptops with Ati graphics. Do not apply any changes to DSDT if you have Intel graphics.
WARN: Remember, when you update your kernel, you should remake all this again for new kernel.
WARN: DSDT update cause kernel panic during boot on 64bit kernels <= 2.6.27-9. Use noacpi option in grub to boot without DSDT.
UPD: S1/AV mode keys are enabled in new patch for sony-laptop module.
Hello there guys. Long time no updates, and here is a big one )
Thanks to Anze for pointing me to 11682 bug. I have managed to make easy howto on enabling brightness control.
First of all we need to install iasl and acpidump:
sudo apt-get install acpidump iasl
Third, we need to patch our default DSDT table:
UPD: If you have Sony Vaio FW2xx or FW2x models, please use dsdt-error-fw21.patch and dsdt-ati-fix-fw21.patch here.
UPD: If you have Sony Vaio FW3xx or FW3x models, use dsdt-error-fw21.patch then dsdt-error.patch and then dsdt-ati-fix-fw21.patch here.
sudo acpidump -b -t DSDT -o DSDT.aml iasl -d DSDT.aml sudo rm DSDT.aml patch < dsdt-error.patch patch < dsdt-ati-fix.patch iasl DSDT.dsl sudo cp DSDT.aml /etc/initramfs-tools/ sudo dpkg-reconfigure linux-image-`uname -r`
Here we dumped our DSDT table and then decompilled it. Then patched with dsdt-error.patch, this patch fix wrong name (“_T_0”) produced by disassembler. Without this patch we can not recompile this table back. Then we patch with dsdt-ati-fix.patch, this is the actual fix made by Zhang Rui from bugzilla, and recompile table back. And then we put our patched DSDT into initramfs, to allow kernel load it instead of original DSDT.
Fourth, we need to patch sony-laptop module to make our Fn keys for brightness work correctly:
UPD: If you have Jaunty kernel version >= 2.6.28-11.36, do not do this step, this patch is included already.
Install kernel source and all packages needed for compiling it (who knows a better way to not download so many packages by build-dep? or build-essential is enough).
sudo apt-get build-dep linux-source-2.6.27 sudo apt-get install linux-source-2.6.27 cp /usr/src/linux-source-2.6.27.tar.bz2 ./ tar jxvf linux-source-2.6.27.tar.bz2 cd linux-source-2.6.27
Then put here (
linux-source-2.6.27) sony-laptop.patch patch and make this:
patch -p0 < sony-laptop.patch cd drivers/misc/ make -C /lib/modules/`uname -r`/build/ M=`pwd` modules strip --strip-debug sony-laptop.ko sudo install -m644 -b sony-laptop.ko /lib/modules/`uname -r`/kernel/drivers/misc
This will compile and install our new patched sony-laptop module.
Now we need to reboot.
After rebooting we can check if all ok:
dmesg | grep -i sony-laptop dmesg | grep -i dsdt
We should get something like this:
[ 16.045201] sony-laptop: Sony Notebook Control Driver v0.6. [ 16.190130] sony-laptop: detected Sony Vaio FW Series
[ 0.000000] ACPI: DSDT BFE06010, 8016 (r1 Sony VAIO 20080605 INTL 20051117) [ 0.044471] ACPI: Checking initramfs for custom DSDT [ 0.359780] ACPI: Found DSDT in DSDT.aml. [ 0.359785] ACPI: Override [DSDT- VAIO], this is unsafe: tainting kernel [ 0.359793] ACPI: Table DSDT replaced by host OS
Now try to use Fn brightness keys. This should work =)