1 Sony Notebook Control Driver (SNC) Readme
2 -----------------------------------------
3 Copyright (C) 2004- 2005 Stelian Pop <stelian@popies.net>
4 Copyright (C) 2007 Mattia Dongili <malattia@linux.it>
6 This mini-driver drives the SNC and SPIC device present in the ACPI BIOS of the
7 Sony Vaio laptops. This driver mixes both devices functions under the same
8 (hopefully consistent) interface. This also means that the sonypi driver is
9 obsoleted by sony-laptop now.
13 Some models report hotkeys through the SNC or SPIC devices, such events are
14 reported both through the ACPI subsystem as acpi events and through the INPUT
15 subsystem. See the logs of acpid or /proc/acpi/event and
16 /proc/bus/input/devices to find out what those events are and which input
17 devices are created by the driver.
21 If your laptop model supports it, you will find sysfs files in the
22 /sys/class/backlight/sony/
23 directory. You will be able to query and set the current screen
25 brightness get/set screen brightness (an integer
27 actual_brightness reading from this file will query the HW
28 to get real brightness value
29 max_brightness the maximum brightness value
34 Loading the sony-laptop module will create a
35 /sys/devices/platform/sony-laptop/
36 directory populated with some files.
38 You then read/write integer values from/to those files by using
42 brightness_default screen brightness which will be set
43 when the laptop will be rebooted
44 cdpower power on/off the internal CD drive
45 audiopower power on/off the internal sound card
46 lanpower power on/off the internal ethernet card
48 bluetoothpower power on/off the internal bluetooth device
49 fanspeed get/set the fan speed
51 Note that some files may be missing if they are not supported
52 by your particular laptop model.
55 # echo "1" > /sys/devices/platform/sony-laptop/brightness_default
56 sets the lowest screen brightness for the next and later reboots,
57 # echo "8" > /sys/devices/platform/sony-laptop/brightness_default
58 sets the highest screen brightness for the next and later reboots,
59 # cat /sys/devices/platform/sony-laptop/brightness_default
62 # echo "0" > /sys/devices/platform/sony-laptop/audiopower
63 powers off the sound card,
64 # echo "1" > /sys/devices/platform/sony-laptop/audiopower
65 powers on the sound card.
70 If you want to help with the development of this driver (and
71 you are not afraid of any side effects doing strange things with
72 your ACPI BIOS could have on your laptop), load the driver and
73 pass the option 'debug=1'.
75 REPEAT: DON'T DO THIS IF YOU DON'T LIKE RISKY BUSINESS.
77 In your kernel logs you will find the list of all ACPI methods
78 the SNC device has on your laptop. You can see the GCDP/GCDP methods
79 used to pwer on/off the CD drive, but there are others.
81 I HAVE NO IDEA WHAT THOSE METHODS DO.
83 The sony-laptop driver creates, for some of those methods (the most
84 current ones found on several Vaio models), an entry under
85 /sys/devices/platform/sony-laptop, just like the 'cdpower' one.
86 You can create other entries corresponding to your own laptop methods by
87 further editing the source (see the 'sony_nc_values' table, and add a new
88 entry to this table with your get/set method names using the
89 SNC_HANDLE_NAMES macro).
91 Your mission, should you accept it, is to try finding out what
92 those entries are for, by reading/writing random values from/to those
93 files and find out what is the impact on your laptop.
95 Should you find anything interesting, please report it back to me,
96 I will not disavow all knowledge of your actions :)
98 See also http://www.linux.it/~malattia/wiki/index.php/Sony_drivers for other
104 * This driver is not based on official documentation from Sony
105 (because there is none), so there is no guarantee this driver
106 will work at all, or do the right thing. Although this hasn't
107 happened to me, this driver could do very bad things to your
108 laptop, including permanent damage.
110 * The sony-laptop and sonypi drivers do not interact at all. In the
111 future, sonypi could use sony-laptop to do (part of) its business.
113 * spicctrl, which is the userspace tool used to communicate with the
114 sonypi driver (through /dev/sonypi) does not try to use the
115 sony-laptop driver. In the future, spicctrl could try sonypi first,
116 and if it isn't present, try sony-laptop instead.