FnFX v0.3 (c) 2003, 2004 Timo Hoenig <thoenig at nouse dot net> ======================================================================= Documentation 1. FnFX 2. Requirements 2.1 Hardware Requirements 2.2 Software Requirements 3. General Information 3.1 FnFX Concept 3.2 Verified Toshiba Models 3.3 Known Laptops Which Do Not Work (Phoenix BIOS) 4. Functions 4.1 Daemon Functions 4.2 Client Functions 5. Installation 5.1 Compilation 5.2 Daemon Configuration 5.3 Client Configuration 5.4 Configuration Examples 6. To-do 7. License 8. Contact 9. Thanks 10. References ======================================================================= 1. FnFX FnFX enables owners of Toshiba laptops to change the LCD brightness, control, the internal fan and use the special keys on their keyboard (Fn-x combinations, hot-keys). The internal functions will give the possibility to map the Fn-Keys to functions like volume up/down, mute, suspend to disk, suspend to ram and switch LCD/CRT/TV-out. These functions heavily depend on the system and/or kernel configuration. You will need at least a kernel (v2.4.x, v2.5.x, v2.6.x) with ACPI and Toshiba support (CONFIG_ACPI and CONFIG_ACPI_TOSHIBA). 2. Requirements 2.1 Hardware Requirements Any recent Toshiba model. Recent means: Every Toshiba laptop built in 2002 and later will work with FnFX. A list with verified and tested Toshiba laptops is found under 3.2. One exception: There are a few laptops which do not have a Toshiba (e.g. Satellite P25-S520) but a Phoenix BIOS. These machines will fail on loading the Toshiba ACPI driver and hence will not be supported by FnFX. 2.2 Software Requirements - Linux v2.4.x - Linux v2.5.x - Linux v2.6.x All Linux v2.4.x kernels will need ACPI patches. All 'major' dis- tributions already roll out v2.4.x kernels with these patches. To make it short: At least CONFIG_ACPI and CONFIG_ACPI_TOSHIBA must be defined in the kernel config. More information on ACPI and Linux can be found under [1]. All v2.5.x and v2.6.x kernels already have the required ACPI drivers. Again: ACPI must be enabled. CONFIG_ACPI and CONFIG_ACPI_TOSHIBA are your friends. To check if ACPI and ACPI Toshiba support are enabled check the following proc entries exists: /proc/acpi /proc/acpi/toshiba If they do exist, FnFX will work on that system. If they do not exist try `modprobe toshiba_acpi' as root. If this throws errors like 'FATAL: Module toshiba_acpi not found' the kernel is most likely not compiled with CONFIG_ACPI and CONFIG_ACPI_TOSHIBA. Please recompile your kernel with the ACPI drivers or have a look for a precompiled kernel for your distribution which has ACPI and ACPI Toshiba support. 3. General Information 3.1 FnFX Concept FnFX consists of two programs: The daemon `fnfxd` and the client `fnfx`. Fnfxd has to be run as root. While running without fnfx, the daemon reacts on Fn-x combinations and hot-keys which are def- ined in `/etc/fnfx/fnfxd.conf'. If a instance of fnfx is running, the received Fn-x/hot key events are passed to the client which reads its configuration from '~/.fnfxrc'. While fnfxd only executes internal commands, fnfx can also start arbitrary programs. If you only want to use the internal commands (changing LCD bright- ness...), there is no need to run the client fnfx. On the other side, if you really want to map the Fn-x combinations/hot-keys to launch programs, you will need to configure and start both - the server and client. 3.2 Verified Toshiba Models The following Toshiba laptops have been tested by FnFX users. Note: every new Toshiba laptop really should work just fine with FnFX. - Toshiba Libretto L5W - Toshiba Portege 2000 - Toshiba Portege 2010 - Toshiba Portege 3440CT - Toshiba Portege 4000 - Toshiba Portege 7020ct - Toshiba Portege R100 - Toshiba Satellite 1410-303 - Toshiba Satellite 1410-604 - Toshiba Satellite 1800-821 - Toshiba Satellite 2405 - Toshiba Satellite 2410-303 - Toshiba Satellite 2410-304S - Toshiba Satellite 2410-514 - Toshiba Satellite 2450-401 - Toshiba Satellite 2450-S203 - Toshiba Satellite 5005-504 - Toshiba Satellite 5100-201 - Toshiba Satellite 5200-801 - Toshiba Satellite 5200-802 - Toshiba Satellite 5200-903 - Toshiba Satellite 5202-S503 - Toshiba Satellite 5205 - Toshiba Satellite 5205-S703 - Toshiba Satellite 5205-S705 - Toshiba Satellite A10-S100 - Toshiba Satellite A10-S203 - Toshiba Satellite A20-S103 - Toshiba Satellite A25-S207 - Toshiba Satellite A40-211 - Toshiba Satellite M30-164 - Toshiba Satellite M30-344 - Toshiba Satellite Pro 490CDT - Toshiba Satellite Pro 6000 - Toshiba Satellite Pro 6100 - Toshiba Satellite Pro M10 - Toshiba Tecra 8100 - Toshiba Tecra 9000 - Toshiba Texra M1 - Toshiba Dynabook EX1/524CDET (Japanese) 3.3 Known Laptops Which Do Not Work (Phoenix BIOS) - Toshiba Tecra S1 - Satellite P25-S520 4. Functions 4.1 Daemon Functions The daemon can execute the following internal commands: - brightness up -- increase LCD brightness - brightness down -- decrease LCD brightness - toggle bluetooth -- switch bluetooth on/off (need kernel patch) - toggle cpu -- toggle ACPI high and low limit - toggle fan -- switch fan on/off - toggle video -- toggle video: LCD -> LCD & CRT -> CRT - suspend to ram -- suspend to ram via ACPI - suspend to disk -- suspend to disk (hibernate) via ACPI - volume up -- increase mixer volume - volume down -- decrease mixer volume - mute -- toggle mute Notes: - "toggle video" is _not_ supposed to work on all systems. - "toggle bluetooth" requires kernel patch. See http://www.cwrose.de/toshiba/s5200.html#bluetooth for details. - "toggle cpu" works on /proc/acpi/processor/CPU0/limit and hence does not work on all systems. It does not cooperate with cpufreq. - "suspend to ram" and "suspend to disk" will only work, if the kernel was compiled with the corresponding power management and acpi drivers and if the system does support the sleep states (S3, S4). The daemon configuration is made by changing the file '/etc/fnfx/fnfxd.conf'. All valid Fn-x combinations and hot-keys can be found in '/etc/fnfx/keymap' Examples for the configuration are found under 5.3. 4.2 Client Functions The client can execute the internal commands as well as any arbitrary program. The client configuration '~/.fnfxrc' has to be copied to the home directory of the user who executes the client. An example can be found in '/etc/fnfx/fnfxrc_example'. Examples for the configuration are found under 5.3. 5. Installation 5.1 Compilation The same as usual: - ./configure - make - su - - make install Too quick? To compile FnFX, simply extract the file `fnfx-0.3.tar.gz` by running `tar xfv fnfx-0.2.tar.gz`. Afterwards run `./configure`. To compile FnFX run 'make'. If this worked, become root and run 'make install' If './configure' was run without any additional parameters, the daemon is found in '/usr/local/sbin/fnfxd' and the client resides in '/usr/local/bin/fnfx'. The configuration files are copied to '/etc/fnfx'. 5.2 Daemon Configuration If all steps from 5.1 went well, FnFX is ready to be configured. The daemon configuration '/etc/fnfx/fnfxd.conf' has a two sections. All actions are defined in the section [actions] and are parsed by the daemon on start up. An action entry has the following format: action(key="FN-KEY";command="COMMAND") Where FN-KEY is a Fn-x combination or hot-key. See `/etc/init.d/keymap' and COMMAND is one of the internal commands listed under 4.1. In the second section [mixer], the mixer can be defined which is taken for the internal commands "volume up", "volume down" and "mute". The format is quite easy: mixer(device="MIXER") Where MIXER is the mixer device. For example: /dev/mixer. In the third section [defaults], defaults for daemon startup can be configured. Currently this is only the display brightness. defaults(brightness="<value from 0..7>") 5.3 Client Configuration The client configuration file is `.fnfxrc`, which first has to be copied to the home directory of the user who is starting fnfx. See 4.2 and 5.4 for details. The configuration file has the same structure like the one of fnfxd. All actions are defined below [actions] and have the format: action(key="FN-KEY";command="COMMAND") While the daemon can only use the internal commands as command, fnfx is able to run programs. See 5.4 for details. 5.4 Configuration Examples The following lines are examples for action commands. action(key="Fn-Escape";command="mute") action(key="Fn-F6";command="brightness down") action(key="Fn-F7";command="brightness up") action(key="Fn-a";command="xmms") The first three examples don't need further explanation. The forth line is only possible in the client configuration. Remember? Only fnfx can start programs, in this case 'xmms' when hitting Fn-a. 6. To-do Yes, a X11 client is still missing. It's prio #1 and the next I will code. 7. License FnFX is released under the GPL. 8. Contact Comments, bugs and beer to: Timo Hoenig, <thoenig at nouse dot net> Project home page is: http://fnfx.sf.net Sourceforge home page is: http://sf.net/projects/fnfx 9. Thanks A very warm 'Thank You' goes to all people who made patches, sent feedback and supported laptops. I can't express how much I appreciate it. 10. References [1] ACPI4Linux, http://acpi.sf.net =======================================================================