Ubuntu On Sony Vaio FW Series

Tips & Tricks related to Sony Vaio FW series laptops

Lucid brightness control progress

with 60 comments

I have spend some time on figuring out what’s broken in Lucid for brightness. It actually works through HAL and I can control it with python or shell scripts manually hooked to acpi events for Fn keys. But it’s a dirty hack.
So then I finally figured out that gnome-power-manager is responsible for osd notification of brightness control and for handling Fn brightness keys, and it is broken. It’s broken somehow partially because you can control brightness through power preferences (which is gnome-power-manager itself).
While I’m hacking a power manager the easiest way to control brightness is to add Brightness Applet on the gnome panel and control it with mouse scroll wheel.

P.S. I guess there is a way to add AV Mode key support without patching sony-laptop module.

Written by egaistek

May 20, 2010 at 12:17

Posted in Vaio

Tagged with

What’s about latest Ubuntu 10.04 beta?

with 44 comments

I want to gather all problems for the latest beta in the one post. If someone have any problems with FW models in latest Ubuntu 10.04 beta, leave comments here then.

Written by egaistek

April 15, 2010 at 00:31

Posted in Vaio

Tagged with

ATI Catalyst 10.2 (fglrx) warning

with one comment

With dual monitor setup you have invisible mouse cursor on laptop screen 🙂

Written by egaistek

February 22, 2010 at 13:12

Posted in Vaio

Tagged with ,

AV Mode media key patch for 9.10 (Karmic Koala)

with 6 comments

I have made a patch for latest sony-laptop module in 2.6.31 kernel to fix broken AV Mode key handling.

If you want to apply this patch please follow fourth step in Finally a brightness How To post but apply this new patch instead of old one.

From: Anton Veretenenko <anton@veretenenko.ru>
Subject: [PATCH] UBUNTU: sony-laptop: Sony Vaio FW series media keys: AV Mode key support broken

Bug: #502751

AV Mode media key support broken on sony-laptop kernel module.

Signed-off-by: Anton Veretenenko <anton@veretenenko.ru>
---
 drivers/platform/x86/sony-laptop.c |    2 ++
 1 file changed, 2 insertions(+)
--- /usr/src/linux-2.6.31/drivers/platform/x86/sony-laptop.c	2010-01-03 23:21:05.000000000 +0500
+++ drivers/platform/x86/sony-laptop.c	2010-01-04 03:32:20.000000000 +0500
@@ -868,6 +868,8 @@ static struct sony_nc_event sony_100_eve
 	{ 0x10, SONYPI_EVENT_ANYBUTTON_RELEASED },
 	{ 0x91, SONYPI_EVENT_PKEY_P2 },
 	{ 0x11, SONYPI_EVENT_ANYBUTTON_RELEASED },
+	{ 0xA1, SONYPI_EVENT_PKEY_P3 },
+	{ 0x21, SONYPI_EVENT_ANYBUTTON_RELEASED },
 	{ 0x81, SONYPI_EVENT_FNKEY_F1 },
 	{ 0x01, SONYPI_EVENT_FNKEY_RELEASED },
 	{ 0x82, SONYPI_EVENT_FNKEY_F2 },

Bugreport on lanuchpad.net.

Written by egaistek

January 22, 2010 at 14:29

Posted in Vaio

Tagged with , , , ,

HDMI/VGA display detection solution

with 2 comments

Here is my solution about second display detection before login screen. First of all I configured xorg for one screen only with Catalyst Control Center (CCC) and saved xorg.conf as xorg.conf.mono in /etc/X11. Then I connect second monitor to HDMI and reconfigures xorg for double screen with Xinerama enabled and saved xorg.conf as xorg.conf.dual in /etc/X11.

The only way I’ve found to detect another display on HDMI/VGA port is by reading xorg log file after it loads (/var/log/Xorg.0.log). If display connected through HDMI there is “DFP1 connected” line present and “DFP1 disconnected” if not. The same is for VGA except that DFP1 should be changed to CRT1 I guess.

Ok, I need system to load xorg then read log file then select right config file (xorg.conf.mono/xorg.conf.dual) and put it as /etc/xorg.conf and restart xorg. This actions needs to be done before GDM loads because I don’t need any screen flickering with login screen 🙂

There is such script (/etc/gdm/Init/Default) which GDM runs before loading for initializing. I wrote a little script for actions I need and put it on top of just before <code>PATH=/usr/bin:$PATH</code> line /etc/gdm/Init/Default.

Here it is:

ISMULTI=`/bin/cat /var/log/Xorg.0.log | /bin/grep -c 'DFP1 connected'`
ISMULTI_MUTEX=/etc/X11/fglrx-multi-xorg-killed

if [ "$ISMULTI" != "1" ] ; then
    /bin/cp /etc/X11/xorg.conf.mono /etc/X11/xorg.conf
    if [ ! -f "$ISMULTI_MUTEX" ] ; then
        /usr/bin/touch "$ISMULTI_MUTEX"
        /usr/bin/killall Xorg
    else
        /bin/rm "$ISMULTI_MUTEX"
    fi
else
    /bin/cp /etc/X11/xorg.conf.dual /etc/X11/xorg.conf
    if [ ! -f "$ISMULTI_MUTEX" ] ; then
        /usr/bin/touch "$ISMULTI_MUTEX"
        /usr/bin/killall Xorg
    else
        /bin/rm "$ISMULTI_MUTEX"
    fi
fi

Now when booting with second display connected, I got two enabled displays on login screen ready and vise versa.

Written by egaistek

December 6, 2009 at 20:19

Posted in Vaio

HDMI/VGA display detection

with one comment

Does anybody knows how to detect second display before Xorg or GDM loads? I’m always moving between home with second display (through hdmi) and another places with just my laptop screen 🙂

Why am I asking. Ok I can enable second display in Catalyst Control Center (CCC), but for applying changes I need to re-login. Next I need to enable Xinerama and re-login again. Now I have two working displays. Next I move somewhere without additional display, boot my laptop. It boots to login screen with wrong resolution (1280), I login, disable Xinerama, re-login, disable second display, change resolution back (without re-login). That’s too m uch moves to enable/disable second display. Oh I forgot to mention, it’s all about FGLRX of course. XrandR does not work with Xinerama enabled. I guess radeonhd should work ok, but I need performance.

Here is what I want. Just before login screen appears system should check if second display connected and load appropriate configuration for Xorg.

I know how to detect it after GDM loads Xorg, and I’ll post a solution soon when I test it. But I want a better way out.

Stay tuned.

Written by egaistek

November 28, 2009 at 18:47

Posted in Vaio

Tagged with , , , , , , ,

Sony finally unlock Intel Virtualization

with 15 comments

As I saw on Bernhard Froemel‘s blog, Sony plans to make bios updates with enabled VT. Sony decides to enable it after people complain about non working XP Mode in Windows 7.

I see people confirming it in comments, but I still can not find any update for my model on sony-europe.com

Written by egaistek

October 26, 2009 at 02:06

Posted in Vaio

Tagged with ,