# Function Keys (FN) on Sony Vaio not working

## aton

all the function keys (fn-keys) are not working ... i cannot adjust the volume nor the brightness nor can i put my laptop into sleep mode...

i have sonypi compiled as module and 

made a link /dev/sonypi -> /dev/misc/sonypi which is major 10 minor 63 and mod 666

now when i try to test the keys with sonypid i get nothing.

the keys just seem to be dead.

any helps greatly appreciated

----------

## BradN

I wouldn't expect the volume or suspend commands to work that well, but brightness adjusting and video output selection should work.  Try disabling the sonypi thing and enabling ACPI support.

----------

## Camoes

function keys and that kind of stuff are not supported by default, anyway there is a way to get it working.

For my notebook( a acer travelmate) which also has special keys exists a hotkeys driver somewhere on the net. This driver compiled and lineakd used u can access the keys and assign actions to it.

So your next task should be a search for the keys driver (if one exists)

Google and Tuxmobil are your friends  :Wink: 

----------

## aton

okay thanks i will try acpi again, it didnt work well on my first try. perhaps my laptop powers down on shutdown automatically then, too

----------

## hulk2nd

you can not compare "special" buttons from normal laptops with "special" buttons from vaio laptops. 

as already said, vaio laptops have a special interface (sonypi). every vaio has got fn keys, some have a jog dial, programmable buttons or a bluetooth button.

be sure to follow the instructions on http://spop.free.fr/sonypi/ to get the module or to get the into-the-kernel-compiled driver to work.

if everything worked well, you can emerge spicctrl and sonypid. spicctrl lets you do some things like changing brightness or enable/disable bluetooth. sonypid is a daemon that can recognices events from sonypi but that does not mean that he does the changes that you expect when pressing buttons. it just recognices!

for example if you run sonypid in a console end you press FN+F3 it will recognice the event and give you a message like "FN+F3 PRESSED".

if you come to this point, then you need a deamon for the deamon. a deamon, that can grep events from the sonypid and then do the expected things like changing brightness, volume etc. there are several like the sonypidd which is a perl script that runs in the background. or have a look at sourceforge.net. there are several other more comfortable programs (like rsjog, vaiocontrol ...) for example that gives you a popup that shows you the brightness when changing like acme from gnome does.

in short: you need working sonypi driver (to get the sony programmable interface working), running sonypid (to recognice events from sonypi) and another daemon / program (that can react on outputs from sonypi).

some programs have already sonypid included, so you just have to try if these working without running sonypid.

sonypidd (the perl script) is good because it is easy to edit the script to create own events for buttons. but it is not very comfortable because it does not show popups or other things. everything is done in the background.

i hope i could have helped you.

greets,

hulk

----------

## BradN

On my Vaio, the BIOS handles brightness changes + video output settings properly even in linux.

*shrug*

----------

## hulk2nd

right, these things are handled by the bios.

greets,

hulk

----------

## thundersteele

 *BradN wrote:*   

> On my Vaio, the BIOS handles brightness changes + video output settings properly even in linux.
> 
> 

 

So, how do you change your brightness exactly? 

Under Windows I have FN+F5 for brightness setting, need to press it once and then change brightness using the direction keys. I would not mind if the same worked in Linux.

----------

## hulk2nd

spicctrl -b <value between 0 and 255>

but as already said, if you want to do this by pressing fn + f5 you have to assign this function to that shortcut.

greets,

hulk

----------

## thundersteele

I know this and I do it like this (with FN Keys)

BradN wrote his BIOS was handling this and I wanted to know what this means exactly.

----------

## BradN

Mine probably works a little differently than yours.  To make mine brighter, I press fn+F5, or darker shift+fn+F5.  The software to handle it is built into the BIOS on the motherboard and it just automatically handles me pressing it - no specific linux support is needed (or if there is, only ACPI support might be, i'm not sure).  The same goes for TV out/ VGA out switching with fn+F7 and fn+F8.  Although, I can't get the TV out switching to work while using the ATI video driver anymore for XFree, I have to use the VESA one.

This is with a PCG-FXA48 - maybe yours depends on the windows software to handle changing these things?

----------

## hulk2nd

does that mean you don't even need sonypi support in your kernel?

----------

## BradN

correct  :Smile: 

----------

## thundersteele

@hulk

have you ever tried an kernel without sonypi driver? I never have, might be worth a try. Or, I think there is some option to not make it start at boottime. If you compiled it as module then it is simple. 

FX series is very well usable with linux, I have been told this somewhere else yet. Well, I own an Z1.

----------

## hulk2nd

yes, and it is working great. you need an option in your kernel grub line. i can post it if you want. sonypi supports every event except the ones from the P1 and P2 button (i too have a z1), but after mailing around with some sonypi developer i get (at least) one button of them working. the problem is that both of them sends the same input event so sonypi can not recognice whether it was from p1 or p2. but hey, better than nothing!

greets,

hulk

----------

## thundersteele

Which option do you have in grub? My sonypi is working without any. sonypid get every event exept the two buttons you mentioned. 

The thing I was wondering about was what would happen if I didn't use the driver. I never tried without (compiled in always). Also, I never tried using APM. There might be some things I never noticed, thats why I asked.

edit:

by the way, htp://ndiswrapper.sourceforge.net finally supports centrino wlan card.

----------

## hulk2nd

i tried apm and id did not work for me (standby / hibernate). i use 

```
sonypi=-1,0,0,0,0,0xffffffff
```

 right after i buyed mine, i replaced the intel minipci wlan card with a dell truemobile so i dont need the ndiswrapper but thanks anyway for mentioning it.

----------

## thundersteele

```
sonypi=-1,0,0,0,0,0xffffffff
```

That's just the default setting according to /usr/src/linux/Dokumentation/sonypi.txt

So setup should be the same in general. 

Have you had a look at kde 3.2 beta yet? kdeutils contains some sonypi configuration menu for kde control center. It is nice at some point, you have a scrollbar for changing brightness for example. But it is written by someone having a vaio with jogdial, and is only focussed on this. It wasn't really useful for me, but perhaps someday.

----------

## hulk2nd

hehe, never looked into that sonypi documentation  :Smile: 

i've never looked at the kde beta cause i use gnome. but there are some nice tools on sourceforge according to sonypi. never tried once. atm i'm playing around with getting sleep and suspend to work, either with acpi or apm. i dont want to use that buggy swsusp patch. i want that these features are native supported.

greets,

hulk

----------

