If you copy the patch in the untared sony_acpi dir as sony_acpi.patch (you are a nice person if you follow my advice), patch the sony acpi ext (this will include the functions keys handling using acpi)

waooo!! i missed this great tip while i was on holidays... so thank you for this, it works great on my vaio (FS115E).

Looking quickly into the code of sonyfn.c showed my that a shortcut was already defined for "fn+F12 --> suspend" but i also noticed:

Code:

}
// rest i don't care
}

so it's not implemented in sonyfn...
Since i don't have any knowledge in programming (not even a litlle), i didn't succeeded to get this working. I've tried something like this:

Code:

if ((key & FN_F12)==FN_F12) {
hibernate();
}

but compilling fails (cause "hibernate" is an external prog and isn't defined ).
How could i do that??
thx in advance_________________Reality is that which, when you stop believing in it, doesn't go away.

Cool, thanks for correcting the path
I guess I really should take a look at the hibernate thing one of this day

For the note, you can add the same kind of code to map S1 and S2 buttons to some scripted actions... And as you already knows, they will be runned as root... this means this could be a security issue as well...

To finish, i made a dirty init script for sonyfn, so feel free to "c/p" it

Code:

#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

Hi guys,
have you got any idea about how to make video out switch (Fn-F7) working ?
I've a vaio fs-115s laptop with nvidia video card.
I'm using sony_acpi kernel module and sonyfn program (thanks for it !!).

Hey all, I maybe alittle late to post, but I just bought a Sony S460. Its very close to the FS (pretty much identical except for screen size) and I suspect that this will work.

When I try to patch the driver it give me an error, and refuse to patch one hunk out of one, I think that the driver has been updated(it is dated the 28 of june), and the patch no longer works. so I tried to hand patch it, just copied and pasted the 5 lines over (took out the +s) then compiled modprobed but " Fnkey" does not show up (the other two do). Could someone pm a patched version of sony_acpi.c?

To finish: If not working, did you give a try to the sonypi thing ?
(cf http://popies.net/sonypi/
@max.bl: Sorry, i don't have the time to look for the crt out yet... If i find out how to make it work, i will post it here

I just updated the patch above. I mishandled the threaded xosd object and ended up leaking threads all over the floor

Now you should see a total of 3 processes reported by ps. Two of these are really just GUI handling threads used by the xosd libs that should sleep most of
the time. These could be avoided by creating and destroying the xosd object at each fnkey press. It is a tradeoff, two lightweight threads sleeping in the background vs. dynamically creating and destroying the threads each time a fnkey is pressed.

wouldn't it be easier if all the steps were in the right order on the first post on this page?? I'm not good at this kind of stuff _________________Animula vagula blandula,
Hospes comesque corporis,
Quae nunc abibis in loca
Pallidula rigida nudula,
Nec ut soles dabis iocos...
- Imp. Caesar Hadrianus

Actually, yap, but the things is i like the incremental way to do it... there is still one trade off... Or you use the nice X one or the other one with the init.d - but both of them is a not go...
(...I guess, didn't try this ...)

Actually i think making a nice ebuild should be the thing to do and host it somewhere...
(and use nice #IFDEF thing to allows with/without xosd on one src...)
If someone is interested go ahead... I am quite in a buzz now... if not, will do that next week...
edit: LOL

Actually, yap, but the things is i like the incremental way to do it... there is still one trade off... Or you use the nice X one or the other one with the init.d - but both of them is a not go...
(...I guess, didn't try this ...)

Actually i think making a nice ebuild should be the thing to do and host it somewhere...
(and use nice #IFDEF thing to allows with/without xosd on one src...)
If someone is interested go ahead... I am quite in a buzz now... if not, will do that next week...
edit: LOL

Yup... I thought wrapping the functions and their calls in IFDEF's but didn't want to complicate things. I guess I could update this and make an ebuild... So whoever has free time first

Actually I'll try to post an IFDEF'd wrapped version later today and you can just compile it with -DUSE_XOSD to make it easy.