Nautilus / disable spatial mode

Latest version of Gnome Nautilus come by defaut with the "spatial mode", this is really kool, but i hate the fact it open another window for every click. After a quick search, i don’t find anything .. but today i discover this, and the scoop is to disable nautilus spatial: use gconf-editor and set /apps/nautilus/preferences/always_use_browser to true.

Shuttle ST62K Zen Install Howto for Linux

Hardware

The Shuttle STK62K is a small XPC that use:

  • ATI IGP9100 video board
  • ATI IXP150 AC’97 Audio Controller
  • OHCI based USB 2
  • Realtek network card

As i run into different issue with that box, i decided to write a little howto. Look here for more infos

0000:00:00.0 Host bridge: ATI Technologies Inc: Unknown device 5833 (rev 02)
0000:00:01.0 PCI bridge: ATI Technologies Inc: Unknown device 5838
0000:00:13.0 USB Controller: ATI Technologies Inc: Unknown device 4347 (rev 01)
0000:00:13.1 USB Controller: ATI Technologies Inc: Unknown device 4348 (rev 01)
0000:00:13.2 USB Controller: ATI Technologies Inc: Unknown device 4345 (rev 01)
0000:00:14.0 SMBus: ATI Technologies Inc ATI SMBus (rev 17)
0000:00:14.1 IDE interface: ATI Technologies Inc: Unknown device 4349
0000:00:14.3 ISA bridge: ATI Technologies Inc: Unknown device 434c
0000:00:14.4 PCI bridge: ATI Technologies Inc: Unknown device 4342
0000:00:14.5 Multimedia audio controller: ATI Technologies Inc IXP150 AC'97 Audio Controller
0000:01:05.0 VGA compatible controller: ATI Technologies Inc: Unknown device 5834
0000:02:05.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
0000:02:06.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 80)

Issues

Caution, i run into weird issues at the first boot.. a lot of segfaults and other weird things. I spend a part of the night to discover that the main trouble isn’t Linux based, but a hardware issue. The ST62K seems to have a lot problems with cheap memory. My current install use two Elixir (CAS=3) 512Mo stick in dual channel. After a little test with memtest+ i discover that the memory should be downsized to 266MHz FSB (instead of the common 400FSB). I found severall other users with the same issue. So don’t expect to use a DDR400 at full speed on this box with cheap memory, or buy Corsair (CAS=2.5 not the CAS=3!).

Linux

I tried several kernels: 2.4.26 and 2.6.7 debian stock kernel, but i run into trouble with this meanly because the APM is set by default in .. so to run it i need to build kernel 2.6.7 from scrash.

Processor

My box run on a Intel 3.0C running at 3.2Ghz as this box support overclocking form +0 to +15 FSB, so (200 + 10) * 15 = 3.2 Ghz, i managed to overclock it to 3.3 without any trouble. In the kernel i set:

[*]   Symmetric multi-processing support
[*]   SMT (Hyperthreading) scheduler support

SMT is the new scheduler that support the HT processors

ACPI / APM

The main reason why i start with ACPI, is that the box do some really strange things if you have APM set. So you need to disable the APM, and set the ACPI in you kernel.

[*] ACPI Support
[*]   Sleep States (EXPERIMENTAL)
<M>   AC Adapter
<M>   Battery
<M>   Button
<M>   Fan
<M>   Processor
<M>   Thermal Zone

The Thermal Zone is the only import here.

Network

The ST62K use a Realtek nic, so just use the 8139too driver.

Hardrive / DMA

Recent kernel as support for ATI IXP chipset so ..

Device Driver > ATA/ATAPI/MFM/RLL support
<*>       Generic PCI IDE Chipset Support
[*]       Generic PCI bus-master DMA support
[*]         Use PCI DMA by default when available
<*>        ATI IXP chipset IDE support

Video

The embeded video card is IGP 9100. To have support for X you have 3 options:

  • use the ‘ati’ driver wich come with XFree. It’s works fine (without acceleration)
  • use the ‘radeon’ one, but this require a some kernel tweak
  • the ATI made drivers doesn’t seems to support the IGP card right now.

I now run the radeon on. To do this you have 2 options:
- use the stock kernel one
- use the DRI based one

stock kernel

Devices Drivers > Graphics support
<*>   ATI Radeon display support

Don’t use module if you want to have framebuffer support. You need to enable AGPGart too (i’m not really sure)

Section "Device"
#Driver      "ati"
Driver       "radeon"
VendorName  "ATI Technologies Inc"
BoardName   "Unknown Board"
BusID       "PCI:1:5:0"
EndSection

DRI

First you need to download the latest XFree86 binary (which is 4.3.99) and put this in the place of XFree binary. Next download the Radeon driver from the DRI website. Simply untar and install it. (You need to set the kernel drivers as module not built-in for that)

Which One ?

Right now, this doesn’t really change anything because the kernel base kernel doesn’t support DRI. And the DRI one, disable the DRI because it doesn’t find it as a AGP card, so disable the direct rendering. So don’t expect good openGL performance :( But the radeon driver is really punchy on X .. so as i don’t play game, this isn’t a issue. I think this gonna change soon anyway.

update: TV Output

For the TVout put, there is currently no options. The only way to have it works, is to configure the X server to use a vesa driver (instead of radeon) and 800×600 screen size. After that, plug the TV set and reboot to enable it. (Done thought the bios post), and enjoy. Thanks Per for the tips.

Sound

Again only recent kernel support this :)

Device Drivers> Sound > Alsa PCI devices
<M> ATI IXP 150/200/250/300

After simply load the ‘snd_atiixp’ module

Sensors

I read a couple of post saying that the sensors doesn’t work, but i managed to use it without any trouble, as it use a it87 isa based sensors.

I2C > Hardware Sensors Chip support
<M> ITE IT87xx and compatibles

Don’t forget to set i2c-dev Results:

it87-isa-0228
Adapter: ISA adapter
VCore 1:   +1.45 V  (min =  +1.42 V, max =  +1.56 V)
VCore 2:   +1.53 V  (min =  +2.40 V, max =  +2.60 V)   ALARM
+3.3V:     +6.40 V  (min =  +3.12 V, max =  +3.44 V)   ALARM
+5V:       +4.97 V  (min =  +4.72 V, max =  +5.24 V)
+12V:     +11.68 V  (min = +11.36 V, max = +12.60 V)
-12V:     -19.77 V  (min = -12.63 V, max = -11.41 V)   ALARM
-5V:       -2.38 V  (min =  -5.28 V, max =  -4.81 V)   ALARM
Stdby:     +5.02 V  (min =  +4.72 V, max =  +5.24 V)
VBat:      +3.16 V
fan1:     1795 RPM  (min =    0 RPM, div = 16)
fan2:        0 RPM  (min =  332 RPM, div = 16)
fan3:        0 RPM  (min =  664 RPM, div = 8)
M/B Temp:    +60°C  (low  =   +15°C, high =   +40°C)   sensor = diode
CPU Temp:    +44°C  (low  =   +15°C, high =   +45°C)   sensor = diode
Temp3:       +41°C  (low  =   +15°C, high =   +45°C)   sensor = thermistor

Some voltages seems wrong .. but not important. Yes this box have only one fan and the CPU temp is 44°. The 60° correspond to the RS300 chip but this seems to be broken (the bios show me the same values..). When overclocked and building the kernel, i managed to have 59° and a fan at 2300 RPM. (I tweaked the bios to start the fan at 55° instead of 65° default)

Additionnal

You can download my kernel config. I think this setting can be used on S62G4 too ..

My computer burn in hell !

My K7S5A motherboard (w/ a Athlon on) burn on fire last week. I don’t know why, when i come back home (after work), i found a blanc screen, try to reboot but nothing.. Damm

I looked a this closer yesterday.. and yes some chipset on the motherboard have burn .. So i need to buy another one :(

I get a lot of trouble with this computer. 2 video card with broken cooler.. and now a motherboard death. I wondering what to buy right now. I won’t buy another Athlon since i get a couple of issues w/ the heatsink and temperature.

I know a lot of python guru works on MacOS right now, this kind of stuff is to expensive i think? I’m wondering if i should buy another notebook (mine is a bit old to use it for everything..) or by a cool small P4. I read a couple of article about the ST62K. This seems to be kool because it only use 1 cooler, and have a decent video card. A new notebook can be kool to, but the one’s i know you need to choose between power (goot lcd size) and their weight (most do 4/5 Kg .. to bad for a notebook)

Python web developpement: the dilemma

There is a bunch of Python based web framework. So much that it’s a really hard choice to do. Most of them came w/ a special templating language, and a different approach.

Dilemma 1

I really think most of the frameworks, have nothing to do with templating. We should give up with that mixOmatic. A framework is a framework not a templating language. So while looking for a good framework, never looks at its templating system, since you should use the one you want. (not the one that come with the framework).

Dilemma 2

The second thing that run me in trouble is the approach. I find about 3 different way to handle requests, and still wondering what is the best choice

Thread approach

Webware has this kind of approach. It maintain a pool of servlets, and use apache as front-end to dispatch to webware server. This approach is really interesting since you can really tweak performance by maintaining the some cached stuff .. By the other side, you have all the drawbacks of this way to using:

  • A lot of python module aren’t thread safe. Even the SQLObject which is normally written in this way have trouble with thread. Phil lost part of the night to discover that SQLO + SQLite run give him a bunch of errors..
  • Really hard to deploy: Since the servlet pool doesn’t support advanced caching, every single servlet load stay loaded all the time. (I want to deploy a bunch of website .. something like 20 .. with low traffic that isn’t the right way)

Mod_Python approach

There is a lot of frameworks that use this way. The one i really enjoy is MP Servlets. The major feature is that it use Apache 2 thread behaviour, so you don’t have to use python threads. This sound really good, and you don’t have to launch a python server on the host. But the major drawback is that there is no way to maintain (or even limit) a pool of objects between request. (This is possible but you need to tweak the apache way to handle request to disable threading for a proceess… and this isn’t a good approach for virtual hosted website).

Twisted approach

Twisted try to fix the thread problem by using a single loop, and async request handling. With that you can:

  • enjoy the python world without thread nightmare
  • desging small dedicated servers

But once again this way have a major drawback has you will be unable to use stuff like SQLObject since Twisted require some specials database connection to avoid locking (remember single loop). And i don’t want to use the old fashiong sql way to build website. Another thing to remember about Twisted is that you need to use apache to proxy the request to the host, and i don’t really think that this way is really pretty for performance.

Conclusion ?

I don’t have a good conclusion. I know Zope can fix some of this problem, but Zope is a too hard to developp / maintain for me. Zope3 tend to be more simple for a lot of ways, but still under developpement, and need a lot of work to learn right now.

Update: Nobody seems to have a decent solution :) Really strange no ?

CocoRosie

Ho my god, i stopped listenning radio since a while. After three days ripping Le Noir on french radio, i discover a lot of things. Today i discover a "White Session" of CocoRosie and this is really wonderfull. I’m wondering how i miss that before :)

Hum, still have to work a lot since hollidays but this songs remind me, why i like hollidays .. I just don’t want to work :)

– Music enforce my mind in hollidays :)

Update: Check here to find additionnal photos and mp3 (kool :)

Sonic Youth is back too !

After a long (too long) silence Sonic Youth is back with a new album: Sonic Nurse. I haven’t buy it yet, but believe me, i heard 2 songs on radio tonight this is a true Sonic album :)

I guess everybody find what ‘Titanium Expose’ mean right now :)

http://jkx.larsen-b.com/photos/blog/sonic_nurse.jpg

I just want to be on the Lollapalooza tour! Somebody w/ 1 room to rent and 2 plane tickets ?

Convert Realaudio stream to wav / mp3 on linux

I really enjoy to listen radio. Most of the radio use Realaudio stream. On Un*x, you usually can use realplayer. Now i want to convert this stream to mp3 in order to listen it on my mp3 player.

Howto:

  • First down the .ram file
  • open it to find the rtsp url (something like rtsp://XXXX/stream.rm)
  • ask mplayer to encode it in wav
  • next transform it to mp3 (with lame)
mplayer -cache 10 -ao pcm -aofile stream.wav  rtsp://XXXX/stream.rm
lame stream.wav

I wrote a little script to do this directly look at realRip for more informations. To use it simply call “realRip.py stream.ram” or “realRip.py http://XXXX/stream.ram” (it will download the ram file and parse it..)

Choosing a webmail

On this dedicated host, i’m looking for a webmail. There is a couple of system right now:

  • IMP[1]
  • Squirrelmail[2]
  • IlohaMail[3]

Let’s give them a try. After a little fight w/ horde i discovered that IMP is really hard to install, and some people say it’s a cpu ogre. Squirrelmail is really easy to install, and works quit fine with courier-imap. The only trouble is that themes are really awfull, and pages load slowly ..

Last week i decided to test IlohaMail and it’s really what i’m looking for. Despite it doesn’t have advanced theming, the look&feel is fine, and pages are fast to load.
One feature i really like: ‘identities switching’

Everybody likes screenshot ? :)

http://jkx.larsen-b.com/photos/blog/ilohamail.sized.jpg

I’m not a RSS feed

While reading my awstats for this website, i discover that .. i’m a RSS feed and that’s all. I spend part of a week to write a nice CSS and other stuff to this blog, but the only thing that people read is the RSS channel. I guess this is a bot drawback.

In the previous version of this website, i only get a few access to the RSS feed, i guess that everybody use RSS readers right now. (or PyDS or other stuff) I usually use Bloglines now, this is pretty usefull and not to long to configure.

Another trick, is that Google have a lot of trouble to index this website. I works fine before, but now i run into trouble. And only Wifi section has a lot of hits.

Mozilla All in wonder

I use a couple of mozilla right now:

  • The one, I really enjoy is Mozex, which enable the use of external programs like mutt or, emacs for mail.. text editing and a lot of other.
  • For CSS/HTML debugging i use another one which is really kool too.

But i guess the ultimate is QuickManager. This beautifull extension allow the user to browse the mozilla extension database, and install extension with a single click. (same can be used for themes)

So now, the first thing to do install QuickManager :)