# toshina-fn

## aLeSD

Hi,

I coded a little software to manage the fn+key combinations on the toshiba laptops.

It works very good for me ( Toshiba M30 ) and it should work on every toshiba that support toshiba and toshiba_acpi modules.

It's very easy to install it and for gentoo users I put inside init scripts too.

Read the INSTALL.gentoo file inside the package.

It uses near of 0% of my cpu : centrino 1.7Mhz in 600Mhz state

I suggest to compile toshiba and toshiba_acpi like modules and check the support of the laptop with

# modprobe toshiba 

# modprobe toshiba_acpi

Here is the link

http://sourceforge.net/projects/toshiba-fn

Please let me know if it works on your model

WORKS ON:

satellite M30 ... with modprobe toshiba fn=0x62

satellite 5200-801 ... with modprobe toshiba fn=0x62 (thanks darius)

Have funLast edited by aLeSD on Thu Mar 09, 2006 1:06 am; edited 4 times in total

----------

## Elv13

will it work on a a70? its a phoenix bios will some buggy powermanagement option that partially work (fn work for lcd touchpad and wireless) acpi battry meter work but not the management, both plugin dont really work.  :Rolling Eyes: 

----------

## aLeSD

You have to try:

if the toshiba modules loadup without problems maybe yes

For example:

I have a phoenix bios too

in my case modules load up well but with toshiba-fn-scan utility I could't say any change when I pressed the fn+key combination.

I had to use fnfind (read README.fnfind) to find a parameter to pass to the module. In my case:

# modprobe toshiba fn=0x62

-----

In the end toshiba-fn is very light and uses internal way only to set brightness:

that is my configuration file /etc/toshiba-fn/toshiba-fn.conf :

# To find the value of every fn+<key> combination

# use the toshiba-fn-scan application

#

# command="<terminal command>"

#

# internal command

# brightness down

# brightness up

node(value=0x01;command="amixer set Master toggle >/dev/null")

node(value=0x3b;command="xscreensaver-command --lock >/dev/null")

node(value=0x3d;command="echo mem > /sys/power/state")

node(value=0x3e;command="echo disk > /sys/power/state")

node(value=0x40;command="brightness down")

node(value=0x41;command="brightness up")

as u can see I use external program and script to do the things.

For example 0x3b is fn+F1 for me and tells to xscreensaver to lock the computer : 

xscreensaver-command --lock >/dev/null 

It's only a terminal command! If you give it in a shell your xscreensaver will lock the screen 

Now to set the governor you have (usually) to put the governor name (powersave,performance etc etc ) in  /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

So if 

# echo "powersave" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

works for you , chose a fn+key, find the value with 

# toshiba-fn-scan

and personalize your toshiba-fn.conf file

node(value=<your_keycode> ;command="echo "powersave" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor")

Bye

PS. If people likes it I will code more internal function to do things that only a terminal command can't do

----------

## aLeSD

Released toshiba-fn-0.0.4

I added an internal function to toggle the fan

now my /etc/toshiba-fn.conf is:

node(value=0x01;command="amixer set Master toggle >/dev/null")

node(value=0x3b;command="xscreensaver-command --lock >/dev/null")

node(value=0x3c;command="fan_toggle")

node(value=0x3d;command="echo mem > /sys/power/state")

node(value=0x3e;command="echo disk > /sys/power/state")

node(value=0x40;command="brightness down")

node(value=0x41;command="brightness up")

node(value=0x02;command="echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor")

node(value=0x03;command="echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor")

node(value=0x04;command="echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor")

node(value=0x05;command="echo "powersave" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor")

Bye

----------

## 96140

Will this work for an old Satellite 2805-s603?

I've been looking for almost two years now and still haven't found anything that really works with my Fn key or the "media" keys at the top (Play/Pause, Stop, FF, RW, etc.).

----------

## aLeSD

The things that are necessary to make the application works is:

load the module toshiba and check for the existence ot the file /proc/toshiba

load the module toshiba_acpi and check for the existence of the dir /proc/acpi/toshiba

if you have a command from the terminal to do what u want, put it in the configuration file and chose a key to link with.

----------

## firsttry

Hi,

just dropping a post (it's darius, up on the first post, but the nick was taken) to say that the program works for me... just had to use toshiba-fn-scan to configure the Fn keys. I got a Satellite 5200-801... even hibernate works! Just make sure the toshiba options in the kernel are compiled as modules.

In reply to nightmorph, it unfortunately doesn't work with my playback stop etc. buttons, at the front of the laptop.

Thanks again alesd for helping me set the thing up (bit of a gentoo newb...)

Cheers!   :Very Happy: 

----------

## aLeSD

toshiba-fn-0.0.5 released

added volume control functions

example of /etc/toshiba-fn/toshiba-fn.conf

# To find the value of every fn+<key> combination

# use the toshiba-fn-scan application

# command="<terminal command>"

#

# internal command

# brightness down

# brightness up

# fan_toggle

node(value=0x01;command="amixer set Master toggle >/dev/null")

node(value=0x3b;command="xscreensaver-command --lock >/dev/null")

node(value=0x3c;command="fan_toggle")

node(value=0x3d;command="echo mem > /sys/power/state")

node(value=0x3e;command="echo disk > /sys/power/state")

node(value=0x40;command="brightness down")

node(value=0x41;command="brightness up")

node(value=0x06;command="amixer set Master 10%+ >/dev/null")

node(value=0x07;command="amixer set Master 10%- >/dev/null")

# To set the cpu frequency governor uncomment the following lines (only if you support it)

#node(value=0x02;command="echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor")

#node(value=0x03;command="echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor")

#node(value=0x04;command="echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor")

#node(value=0x05;command="echo "powersave" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor")

----------

## firsttry

Hey alesd,

reporting a bug:

for some strange reason my sound disappears and I have to mute-unmute it to get it back. Also I get a driver error unless I run alsamixer after boot. When I run /etc/init.d/toshiba-fn stop the sound is fine.

I'm using version 0.0.4

Does anyone else get this?

----------

## Zee

a bit off-topic but might help. I had the same problems with my external sound card. I solved iz by copying the file /etc/asound.state to ~/.asound.state.

I have a Toshiba laptop too but my sound card is not working properly (changes the pitch when playing) so I have an external one.

zee

----------

