HowtoUbuntuVaioFj170

Configuring Sony Vaio VGN FJ170/S

Notes

Most of the information here was extracted from Greg Gulik's page for Fedora Core 6. Many thanks to him, and to all who contributed on Greg's mailing list - the credit for this page is all his.

==Fn Keys==

The Fn keys take some work to get working. I have not attempted to use the S1 and S2 keys, nor Fn+F10 and Fn+F12. If anyone tries these, please tell us your experiences here. So here we go:

Step1: sony_acpi kernel module

For some reason, the standard sony_acpi kernel driver does not work with this notebook. You will have to use this version of it. Download the source to a convenient directory (/usr/src for instance, or ~/src), extract it and compile it:

tar zxvf sony_acpi-0.3.tar.gz
cd sony_acpi-0.3
./configure
make && make install

Now, remove the previous module and load the one you just compiled:

modprobe -r sony_acpi
modprobe sony_acpi

This saves us from a reboot... Check that you have the /proc/acpi/sony directory, containing three files. One of the should be called "brightness". If you run as root:

echo x > /proc/acpi/sony/brightness

With x being an integer between 1 and 8, you should see the screen brightness change. If this is happenning, we're on the right track. Remember, you will have to go through this step every time you upgrade to a new kernel.

Step2: fsfn

Now we need to compile and install a package called fsfn, responsible for managing our Fn keys. Grab the package from here, and follow the same procedure as usual:

tar zxvf fsfn-1.1-take2.tar.gz
cd fsfn-1.1-take2
./configure
make && make install

Don't forget you have to be root to run make install.

Create a file called /etc/fsfn.conf, and paste the following two lines in there:

BRT_HACK_FJS=1
ALSA_NAME=Headphone

This is a hack to make the volume control work - for some reason the main volume control in this model is called Headphone rather than Front, so you have to set that in this file. Thanks again to Greg Gulik for sharing this with us. BTW, this is also useful info for configuring Gnome's volume applet - remember to always change the volume for "Headphone" rather than "Front".

Copy the following script and paste it at /etc/init.d/fsfn:

# Copyright 2005 messenjer
# Distributed under the terms of the GNU General Public License v2

PATH=/sbin:/bin

. /lib/lsb/init-functions

if ! test -e /proc/acpi/sony/fnkey ; then
    log_failure_msg "Sony acpi key handler not found"
    exit 1
fi

case "$1" in
    start)
        log_begin_msg "Starting fsfn key handler"
        start-stop-daemon --start \
                    --nicelevel 10 \
                    --pidfile /var/run/fsfn.pid \
                    -x "/usr/local/bin/fsfn"
        log_end_msg $?
    ;;
    stop)
        log_begin_msg "Stopping fsfn key handler"
        start-stop-daemon --stop --pidfile /var/run/fsfn.pid
        log_end_msg $?
    ;;
    *)
        log_success_msg "Usage: /etc/init.d/fsfn {start|stop}"
        exit 1
esac

exit 0

In order for fsfn to start automatically, you have to add it to your runlevel 5 scripts directory. You can do this through the graphical utility Gnome provides, or by creating a soft symlink from /etc/init.d/fsfn to /etc/rc5.d/Sxxfsfn, xx being a two-digit number indicating the sequence things get started in - in my case, I used 70. So run this command:

sudo ln -s /etc/init.d/fsfn /etc/rc5.d/S70fsfn

You should now see something like this:

garrido@mercurio:~/software$ ls -l /etc/rc5.d/ | grep fsfn
lrwxrwxrwx 1 root root  16 2007-04-18 14:56 S70fsfn -> /etc/init.d/fsfn

Yes, you can use the graphical utility if you find it easier, but in my opinion it is always nice to know how things work...

Now, the last step is to configure the on-screen display - a little bar that comes up when you change volume and brightness. To do that, install the xosd-bin and libxosd2. Also, add the command fsfn -o to your session configuration, so that the program gets autostarted when your session begins.

== Webcam ==

This is here for those not yet using Feisty: the webcam works straight out of the box. Upgrade to get it working.

Contact

You are welcome to get in touch with me through a private message in the forums if you encounter difficulties, my username is garrido.

HowtoUbuntuVaioFj170 (last edited 2008-08-06 16:59:54 by localhost)