Earlier this year I worked on reverse engineering the brightness control of my MSI S270 laptop. Turning this work into a proper kernel driver was still left to be done. Until yesterday... The result of yesterday's work are two kernel patches I already posted for upstream inclusion.
If you want to test these drivers, download the latest kernel patches:
The two patches apply to kernel 2.6.17. After patching activate "MSI S270 Laptop Extras" under "Device Drivers"/"Misc devices" and recompile and install. After loading the s270 module, you now have a backlight class driver exposing its innards in /sys/class/backlight/s270bl/. For changing the screen brightness issue as root:
echo 8 > /sys/class/backlight/s270bl/brightness
This will set the screen brightness to maximum. The integer range is 0..8.
In addition to this backlight class driver we export a platform driver which allows reading the current state of the WLAN/Bluetooth subsystem. The platform drivers also allows toggling the automatic brightness control feature:
cat /sys/devices/platform/s270pf/wlan # Show WLAN status cat /sys/devices/platform/s270pf/bluetooth # Show Bluetooth status echo 1 > /sys/devices/platform/s270pf/auto_brightness # Enable automatic brightness control
If the driver refuses to load (returning ENODEV) and you are sure you have an MSI S270 the machine is probably not recognized correctly by its DMI data. In that case you can pass force=1 to the driver which will force the driver load even when the DMI data doesn't match. YMMV. If everything works correctly please make sure to send me the output of dmidecode, so that I can add the DMI data to the list of known laptops in the driver.
There might even be a chance that this driver works on other MSI laptop models, too (such as S260). YMMV. But don't come running when the driver causes your machine to explode! MSI laptops such as the S270 or S260 are often sold as OEM hardware under different brands (such as Cytron/TCM/Medion/Tchibo MD96100 or "SAM2000"), so if your laptop looks remotely like this one and dmidecode | grep MICRO-STAR yields at least a single line, and you are adventurous than you might want to test this driver on it. And don't forget to send me your dmidecode output if it works for you!
Unfortunately HAL (at least in my version 0.5.7) doesn't support the generic backlight device class yet, which means no gnome-power-manager support for now.
Although this driver is based on reverse engineered data it should be legally safe even in the US. After I did my initial work on the S270 controls MSI supplied me with a register table of their ACPI Embedded Controller (which is what this driver interfaces with) and one of their engineers even tested my work.
Last but not least I created a mailing list for discussion of Linux on the MSI S270. Please join if you run Linux on one of these machines! I will announce future driver work for the S270 there.