Sony Vaio VGN-SZ640 Ubuntu Maverick

04 Nov 2010 20:21

Recently I updated the Ubuntu I'm using on my laptop to version 10.10 (codename Maverick).

Although things work pretty good, I had to do some tricks to make it work in specific areas.

Broken suspend

It seems tpm* modules (who knows what they are for?) break this. Putting file like this:

# With these modules loaded suspend doesn't work
blacklist tpm
blacklist tpm_bios
blacklist tpm_tis
blacklist tpm_infineon

to /etc/modprobe.d/blacklist-tpm.conf (and rebooting) solves the problem for me.

Brightness buttons not working

Run this code in terminal:

while true; do
    line=`acpi_listen | head -n 1`;
    if echo "$line" | grep 'sony/hotkey SPIC 00000001 00000010'; then
        xbacklight -dec 25 -time 0 -steps 1
        smartdimmer -d
    fi
    if echo "$line" | grep 'sony/hotkey SPIC 00000001 00000011'; then
        xbacklight -inc 25 -time 0 -steps 1
        smartdimmer -i
    fi
done

You need to have smartdimmer and xbacklight package. The keys kind of work now (but quite lamely).

Other stuff

The Ubuntu font is great. I love it. It seems nouveaux driver (for nVidia card) is really good. It supports multi-monitor configuration via xrandr and other standard stuff. Unfortunately you won't get 3D effects (Compiz) with it and you'll need to install nVidia commercial drivers for it.

Consult Sony Vaio SZ Series And Linux for more (mostly old) information.

Comments: 1

Export To Twitter

18 Oct 2010 20:57

From today on, you can export pages updates to your Twitter account. For each page created a Twitter status update will be posted.

The functionality is called Tweet My Wiki and is available for all Wikidot users (free and Pro).

This feature was coded mostly by me, including the Wikidot URL shortener, that utilizes Redirect module and internal PageSaver API (similar to pages.save_one external API method) to make it all happen.

Comments: 0

Lighttpd X-Sendfile Problem

01 Oct 2010 18:03

It's not a secret Wikidot uses Lighttpd web server to serve its service. We also use X-Sendfile mechanism to deliver files more intelligently.

Instead of having a PHP process copying file through FastCGI to Lighttpd (which would copy it again to the client) we send a special header to Lighttpd naming the file it should serve to the client. This means PHP processes are terminated quicker, which result in overall better performance.

When working on a Wikidot bug (some uploaded files with some special characters in their names are not accessible using links generated by Wikidot itself), I discovered Wikidot also doesn't serve files whose name end with a space.

The problem disappeared when I (just for test) disabled X-Sendfile mechanism. Pure PHP has no problems in reading such files and sending them through Lighttpd to browser, so it seemed there's a problem with Lighttpd.

Lighttpd v1.4.24 introduced a second X-Sendfile header: X-Sendfile2, which asks Lighttpd to send a chunk of a file (from byte Xth, to Yth), but also a whole file (from byte 0th to the last one). The syntax is:

X-Sendfile2: PATH RANGE

Where PATH is URL-encoded file path (PHP's rawurlencode, not the non-standard urlencode), RANGE is X-Y (or "0-" for whole file), so changing:

header("X-Sendfile: " . $path);

to

header("X-Sendfile2: " . rawurlencode($path) . " 0-");

fixes the problem.

Comments: 0

Brussels Bikes

27 Aug 2010 21:25

Bikes are very important means of transport in Brussels, see the photos:

I'm posting this mostly because I could not find the squeezed bike on the street lamp photo on Google Maps anymore.

Comments: 0

page 1 of 3123next »
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License