Archive for October, 2008

HP 2133 and Ubuntu

Wednesday, October 29th, 2008

Last week I got a HP 2133 mini notebook for me to use on presentations, college, meetings, events, etc. It’s a very nice toy with 1Gb RAM, a 1.2 GHz VIA Processor, 120Gb of storage, Wifi and bluetooth. Well, it’s very handy and the keyboard is amazing… except for the key, that is a little smaller than the on in my “official” notebook, and I always try to press it in the wrong place :-P

But… I’ve spent a lot of time to make it work with my Ubuntu. Why? Mainly because of the freakin’ VIA proprietary video driver. So I decided to write here some tips about how to get Ubuntu working on the 2133 (after trying to configure the xorg.conf for 3 hours because I hadn’t made a backup of the one that was working :P ).

The problem I have is that the desktop is bigger than the screen. Oh, you say, it’s just the Virtual xorg.conf Option.

IT’S NOT. Damn it!

Thanks to VIA there is a driver option called PanelID. This option is “well documented” in the README file.

The first thing you need to do is to tell the driver that your PanelID is 17. Why? I really don’t know. PanelID 17 means, accordingly to the README, that your display (or your Panel) resolution is 1024×600. The problem is that I want my resolution to be 1280×768 (which is supported by 2133). Anyway, using option “PanelID” 17 solves the problem partially, the desktop isn’t bigger than the screen anymore.

BUT… it thinks that your resolution is 1024×600 (because of the PanelID option, probably), so try to imagine what a 1280×768 desktop looks like in a 1024×600 display (or panel, whatever). The result is that you can see 3/4 of your Desktop, but your pointer “sees” the “panel” borders (i mean, it can’t go any longer than the screen limits).

To solve this problem you need to tell the X server that you have a Virtual display of 1024×600 (yes, you’re lying!!!) so it will arrange your 1280×768 desktop inside this virtual display of 1024×600. To do this you need to add the line

Virtual 1024 600

in the Display subsection of the Screen section.

Your xorg.conf will look like this (the relevant sections only):

Section “Device”
Identifier “via-P4M900 Device 0″
BoardName “Chrome9 HC IGP”
BusID “PCI:1:0:0″
Driver “via”
Option “Monitor-LCD” “HP-2133 LCD”
Option “PanelID” “17″
Option “NoDDCValue”
EndSection

Section “Screen”

Subsection “Display”
Depth 24
Modes “1280×768-60.0″
Virtual 1024 600
EndSubsection

EndSection

If you have any trouble with the video (or anything) trying to install Ubuntu on the HP 2133 Mini, leave a comment and I promise I’ll TRY to help :-D

Nokia Code Camp São Paulo

Monday, October 27th, 2008

Last Friday (Oct 25) I’ve attended to the Forum Nokia Code Camp here in São Paulo. I must admit that the main motivation to go was that the place was very near my house :-P

After finding out that rbp, lhonda and Luiz Irber (friends from our local Python User Group) were attending too I thought that it’d be a nice event. At least we could talk about GruPy-SP plans…

Anyway, I went to the hotel and after watching the three presentations (speaking about Nokia Serie60, Python and mobile development) the fun really started. 4 hours to develop the coolest mobile application in the world :-P

The prize was two E71 (the “new” Nokia Smartphone) for the “winner” application, so we decided to code in pairs. Me and rbp, after talking about our ideas, decided to write a musical instrument using the N95 accelerometer.

The first two hours of “development” actually we spent trying to find a proper way to transfer files to our cellphones (the S60 SDK is Windows only…). Then, with the “bluetooth easiest method” for transferring the app working, we started trying to find out how to interpret the accelerometer data. It worked as expected. Then we needed to play a sound (as it was a musical instrument). Easy, Python for S60 is very intuitive, the API is very High Level. Looking to the reference guide there was something like:

from audio import Sound
Sound.open(“file.mp3″).play()

Just as I expected… except that there wasn’t any sound coming from the freakin’ phone’s speaker. There was forty minutes left to the end of the competition and all we had was a soundless musical instrument, not very useful.

Ok, plan B. I started looking to some old code in my N95 and found a bluetooth webcam prototype. Rbp had an idea of making the webcam “crash” with a movement (using the accelerometer). And then we made it.

It’s a funny application and, as I said to rbp, as programmers we are great comedians. We presented the webcam in the stage and people seemed to like us (the app or the comedians? I really don’t know :-) )

Well, me and rbp won a Nokia E71 (each), it’s a very nice (and THIN) smartphone, I don’t like phones with qwerty keyboards, but this one is really cool (thin, small and almost comfortable to type).

10/27/2008

Thanks Forum Nokia! :-)