FN Key Tutorial (Part 3)..

**** WARNING: This will only work for releases up to Feisty. For Gutsy release and later check here! (only for FS model laptops). If you don’t have an FS model laptop, you can try this tutorial anyway but don’t install the Sony_acpi software from part 1 and download the 2.0.1 version of the fsfn software from here and use that in part 2. I’ve not tried this myself though, so please leave a comment if it works for you πŸ™‚ ****

You can find Part 1 of the tutorial here & Part 2 here!

Part 3 – This will be all about the fine tuning your Sony Fn Keys configuration file & making the software auto run at boot time.

Auto run the FSFN software on boot:

Open up a terminal, type in the BOLD parts of these lines one at a time in order & press enter after each one..


wget http://gp2x.projectinfinity.org.uk/downloads/fsfn/fsfn.txt
-Downloads the needed file to your desktop.

sudo mv fsfn.txt /etc/init.d/fsfn – This command will copy the file into the correct directory & renames it to fsfn.

cd /etc/init.d/ – Navigates you into the same directory that you just moved the file into.

sudo chown root:root fsfn && sudo chmod +x fsfn – This will change the owner of the file to root & stop anyone else from using it without sudo.

sudo update-rc.d fsfn defaults – This is the command that updates the boot process to include the FSFN daemon.

Auto run the On Screen Display software on boot:

If you want the on screen display to show up when you change volume/brightness you need to add it to the Gnome Sessions Manager. Dapper & Edgy users will need to click here to find out how to do that, as there’s currently a problem with the permissions for the default installs.

In the Startup Programs tab; click on the New button on the right to add your program..

Call it something like fsfn display in the Name: box & type fsfn -o in the Command: box & press the OK button to save it.

FsFnDisplay

Now you just need to press the Close button & save your entry.

Don’t restart just yet as you still need to tweak your settings a little πŸ˜€

Tweaking your configuration:

sudo killall fsfn – to stop the FSFN daemon.

sudo gedit /etc/fsfn.conf – This will open up the main configuration file in the text editor.

You’ll find the following options in the file, just remove the # from the beginning of a line to activate them or add it to disable them..

DEVICE=AUTO
#DEVICE=/dev/input/event1

————————————————————–
With the Device option set to AUTO, you don’t need to manually find out what event number your keyboard works on.
————————————————————–

ALSA_NAME=Front
#ALSA_NAME=Master
#ALSA_NAME=PCM

————————————————————-
These are your sound cards options.
The PCM option seems to work the best for me, but try them all to see which one you prefer.
————————————————————

#F2_CMD=
#F3_CMD=
#F4_CMD=
#F5_CMD=
#F6_CMD=
#F7_CMD=
#F10_CMD=
#F12_CMD=
#S1_CMD=
#S2_CMD=

————————————————————–
Adding different targets to these fields will override the default key actions.
e.g. S1_CMD=/usr/bin/gnome-system-monitor to start up the Gnome System Monitor when you press the S1 button.
————————————————————–

OSD_FONT=-*-lucida-*-*-*-*-24-*-*-*-*-*-iso8859-1
————————————————————-
Lets you choose which font the On Screen Display uses.
————————————————————

OSD_VCOLOR=Orange
OSD_BCOLOR=Blue
OSD_VCOLORZ=Red

————————————————————-
Allows you to choose which colours the On Screen Display uses for the font.
VCOLOR = Volume colour
BCOLOR = Brightness colour
VCOLORZ = Mute Volume colour
(I’ve changed these to make them fit in with the Ubuntu colour scheme a little better)
————————————————————-

#BRT_SETDEFAULT=3

————————————————————-
Sets the default brightness for your laptop to boot up with.
(The default is 3)
————————————————————

#OSD_TIMEOUT=2
————————————————————-
Allows you to manually set the amount of time that the On Screen Display shows for.
(The default is 3)
————————————————————-

#BRT_HACK_FJS=
————————————————————-
If you find that the software won’t change your brightness correctly, then try enabling this option.
————————————————————-

You should now have all the info that you need to set this software up to your preference. Don’t forget to save the file before exiting πŸ™‚

Once you’ve finished with the tweaking, restart your laptop & you will have both of the programs load automatically & your Fn key will work as it should.

Huge thanks to everybody who’s worked on the FSFN software & to all the people in the Gentoo & Ubuntu forums who made this a lot easier than it would have been without them.

Advertisements

9 thoughts on “FN Key Tutorial (Part 3)..

  1. i used your tutorial on my sony vaio vgn-fs315m and it works perfectly well exept for one thing: i can’t set any commands for the S1 and S2 buttons. do you know anything about that problem? hints?

    great job, man!

  2. They worked for me, but not all of the time for some strange reason?

    Check out this part in the tutorial..

    Adding different targets to these fields will override the default key actions.
    e.g. S1_CMD=/usr/bin/gnome-system-monitor to start up the Gnome System Monitor when you press the S1 button.

    Sometimes programs can’t be started this way, so use the gnome-system-monitor as a test & take it from there. I know that one works.

    You did delete the # from the beginning of the line to activate it.. didn’t you?

    Cheers for the comment. It’s nice to know that it’s worked for some one so far πŸ˜€

  3. hey! I updated to ubuntu feisty fawn this weekend and got some trouble with fsfn now. Unlike under edgy eft, the fsfn buttons didn’t work immediately – I had to restart the computer first. And now I can’t change the volume! The status bar shows up, but doesn’t change anything! The brightness works perfectly. Do you have a clue??

    Thanks again for your great tutorial.

  4. after couple hours struggling with my old bookmarks with “how to” I found your website πŸ™‚
    I followed step by step and I got it πŸ™‚
    many thanks 2046

    configuration (sony vaio – vgn-fs395vp / feisty)

  5. Hi, sorry for my bad english.
    I followed your howto and I have my fnkeys working. Congratulations!
    only one problem, the keys s1 and s2 don’t work when ubuntu is inicilaized, but if I stop the daemon and restart fsfn, s1 and s2 works perfect.
    Can you help-me?
    Thanks

    configuration (sony vaio – vgn-fs640/w – feisty)

  6. I followed your howto and I have my fnkeys working , thanks for good work , but I have some errors , volum fn key work , brightness fn work , I do not tested to F7 to LCD and when I push it to up or down lights or volume and run dmesg I see output below :
    [ 1122.648000] atkbd.c: Unknown key pressed (translated set 2, code 0xf5 on isa0060/serio0).
    [ 1122.648000] atkbd.c: Use ‘setkeycodes e075 ‘ to make it known.
    [ 1122.836000] atkbd.c: Unknown key released (translated set 2, code 0xf5 on isa0060/serio0).
    [ 1122.836000] atkbd.c: Use ‘setkeycodes e075 ‘ to make it known.
    [ 1124.488000] atkbd.c: Unknown key pressed (translated set 2, code 0xf5 on isa0060/serio0).
    [ 1124.488000] atkbd.c: Use ‘setkeycodes e075 ‘ to make it known.
    [ 1124.716000] atkbd.c: Unknown key released (translated set 2, code 0xf5 on isa0060/serio0).
    [ 1124.716000] atkbd.c: Use ‘setkeycodes e075 ‘ to make it known.
    [ 1200.256000] atkbd.c: Unknown key pressed (translated set 2, code 0xf5 on isa0060/serio0).
    [ 1200.256000] atkbd.c: Use ‘setkeycodes e075 ‘ to make it known.
    [ 1200.544000] atkbd.c: Unknown key released (translated set 2, code 0xf5 on isa0060/serio0).
    [ 1200.544000] atkbd.c: Use ‘setkeycodes e075 ‘ to make it known.

    And some more I can’t to work S1 or S2 keys , Laptop is
    Sony Vaio VGN-BX195VP .
    But i try to found solution , one step is after you how to is work the second step is to found solution to errors .

  7. very nice tutorial – As Club Vaio Moderator (European part of Vaio = club.vaio.sony.eu), I’ll try to add your page to the sony site.

    I’ll test it this week wheater it works fine with the FE 31M

  8. Cheers for that benste. The tutorial was really only written for the VGN-FS range of laptops, but it should still be a good starting point for the other models too πŸ™‚

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s