Toshiba Acpi Driver |
New [plans for toshiba_acpi] have been announced.
Please note: This driver is only intended to provide the extra support for ACPI functionality specific to Toshiba laptops. In other words, this driver is not intended to cover standard ACPI functions such as shutdown, reboot, suspend, hibernate, battery info, etc. Such generic functions are being supported by the ACPI4Linux project [1] [2] and the Software Suspend 2 project [3]
Another important note: This driver does not work on all Toshiba laptops, particularly those models which seem to have a BIOS or other firmware which was not developed by Toshiba itself. New reverse engineering work will have to be done on these machines, or Toshiba will have to disclose the necessary details. (For support of machines with Phoenx BIOS, try the [Omnibook driver].) The error you will see in this case is:
$ modprobe toshiba_acpi FATAL: Error inserting toshiba_acpi (.../kernel/drivers/acpi/toshiba_acpi.ko): No such device
The information on this page is only applicable to the latest version of the driver.
If you can already load the "toshiba_acpi" kernel module, you may skip this section.
If you have a 2.6 kernel, or a relatively recent 2.4 kernel (version 2.4.22 or newer), the driver is already included with the kernel source. Skip to "Configure the kernel".
Patch the kernel - If you have an older 2.4 kernel, or want to apply one of the experimental patches that are available on occassion, you'll have to apply a patch to the kernel source and compile it. [Download patches]
Assuming you have downloaded and unpacked the kernel source, enter the top directory and apply the patch with:
patch -p1 < some_patch_file
Configure the kernel - For a 2.6 series kernel, you'll find the driver located at:
For a 2.4 series kernel, it's at:
If all is well, the directory toshiba
should appear under /proc/acpi
. Within that, proc files exist for examining and changing the state of various devices. Generally any user may view the state, but changing state requires root privilege.
As an example, let's look at the LCD device status (lines that start with $ are entered by the user, the other lines are output):
$ cat /proc/acpi/toshiba/lcd brightness: 6 brightness_levels: 8
Now let's change the LCD brightness:
$ echo "brightness:4" > /proc/acpi/toshiba/lcd
If doing this manually doesn't seem like much fun, there are a few programs that will monitor hotkeys and perform the approprite action:
Here are details about the various proc files:
brightness
. Valid range is [0..brightness_levels
-1]. Note that level 0 is not "off".
lcd_out
, crt_out
, and tv_out
. Each output may be toggled independently. To set more than one at the same time, separate the expressions with a semicolon. For example:
$ echo "lcd_out:0;crt_out:1" > /proc/acpi/toshiba/video
running
. A read-write field, force_on
, allows you to enable the fan manually. Valid values are [0, 1]. (NOTE: If the general ACPI fan driver should one day improve to support the same functionality, this interface will be removed.)
hotkey_ready
, a value of 1 indicates that there is at least one hotkey value available in the queue, and the head value can be read from the hotkey
field. (For details about hotkey event codes, see Jonathan Buzzard's Toshiba HCI document [4].) Writing a value of 0 to hotkey_ready
then advances the queue. Since only one consumer is supported, a user-space hotkey server would be needed to fan the queue output to multiple applications. During the consumer's init, the queue should be flushed by writing a 0 to hotkey_ready
until a 0 value is read back.
driver
and proc_interface
. The proc interface version is important to allow user-space programs to handle multiple versions of the driver. The version will be incremented whenever a new driver release contains an incompatible change to the proc interface. Note that a change in the order of keys within a file, or an addition of new keys or files, is not considered an incompatible change.
The following requested features can be covered by toshset and the ExperimentalToshibaAcpiDriver:
Completed features from the poll: video switch, fan control, hotkey status
Somebody had requested the ability to control the LCD backlight. This is already covered by the video switching feature. If you disable the LCD output, the backlight will be shut off (it is). Another route is to use DPMS to turn off the monitor, either from X, or with something like vbetool.
Somebody had requested "software suspend or hibernate". That is covered under generic ACPI (or Suspend2) and beyond the scope of this driver.
This driver has been released under the GNU General Public License, which means it may be used free of charge, and may even be modified by others and sold for profit (for example, as part of a Linux-ready Toshiba laptop system). As trivial as this driver may appear, I've spent a considerable amount of time developing it. Perhaps there will be users who are grateful for the extra 30 minutes or more of life they can get from a standard Libretto battery. What I would ask in return-- but am not at the present time-- is a small monetary donation of US $0.60. The reason I am foregoing the donation request is that it isn't practical to transact such small amounts of money. However I would like to continue, as an exercise, to explain the details of this hypothetical suggested donation.
I would ask for a one-time, per-user donation of US $0.60. I would also ask an additional $0.60 for each year thereafter in which, as a user, you feel I have made useful improvements to the software. For every 60 cents received, I would donate 10 cents in turn to the Linux ACPI driver development team. My driver depends on their work, and I would be donating to encourage further improvements in the ACPI subsystem. Of the remaining 50 cents, and for a limited duration of one year, I would donate 10 cents to Jonathan Buzzard. This would be in appreciation of his Toshiba driver work which paved the way for other drivers such as mine, and for his helpful assistance. Also 3 cents would be allocated towards GNU/Linux development, since my product has no purpose without its continued existence. Finally, 2 cents would be donated to the Electronic Frontier Foundation.
Again, this is hypothetical. I am not asking for donations.