Monday, July 7, 2008

Controlling the fan speed of a Lenovo X300 under Linux

The Lenovo X300 has a really annoying fan running with high speeds already at low (40C) CPU temperatures. The lm-sensors package comes with a fancontrol daemon which does user space fan regulation. Just put this in your /etc/fancontrol

INTERVAL=10
FCTEMPS=hwmon0/device/pwm1=hwmon0/device/temp1_input
FCFANS= hwmon0/device/pwm1=hwmon0/device/fan1_input
MINTEMP=hwmon0/device/pwm1=50
MAXTEMP=hwmon0/device/pwm1=70
MINSTART=hwmon0/device/pwm1=32
MINSTOP=hwmon0/device/pwm1=32
MAXPWM=hwmon0/device/pwm1=64

This will give you 1800 rpm for CPU temperatures > 50C and 5500 rpm (the next level) for temperatures higher 70C. As the fan is barely noticeable at 1800 and 70C is only reached by running two processes with 100% CPU load for more then 5 minutes (even at 30C ambient temperature) this will give you a nearly totally silent laptop :-). A pwm value of 255 sounds like a jet starting (8000 rpm)...

Thursday, June 19, 2008

How to fix "A disk read error occurred" when using a Windows XP image in Virtualbox

If you encounter the error "A disk read error occured" when trying
to boot Windows XP off a raw disk image using Virtualbox (either directly by using
the write-through support or indirectly by booting a 1:1 copy) most
probably the BIOS of the original system reported an odd drive geometry
(C/H/S - Cylinders/Heads/Sectors).

To fix this boot the _physical_ system,
go to the grub command line, type 'c' to invoke the command prompt and then execute the command 'geometry (hd0)'. Write down the cylinders, heads and
sectors values reported. Back in your host system, open the .vmdk file using a normal text editor, scroll down to the end of the file and adjust the following lines

ddb.geometry.biosCylinders="1023"
ddb.geometry.biosHeads="240"
ddb.geometry.biosSectors="63"
.
(1023/240/63 are the values reported by the Lenovo X300 Notebook BIOS).

Now try to boot Windows in the virtualized environment. In my case it
worked right on the first try. There may also be a Windows tool to get
the original drive geometry.

The short explanation is, that the boot loader from Windows seems to have
hard coded values for the drive geometry

Saturday, April 19, 2008

Patrick und Tatjana heiraten

Just to get google to index the site. Two of my friends are getting married: Patrick und Tatja heiraten .de.

Wednesday, April 9, 2008

How to truncate a file the UNIX way

Astonishingly a search for 'truncate unix utility' doesn't turn up anything useful
apart from hundreds of references to the ftruncate man page.
This is how I did it:

dd of=destfile bs=1 seek=newsize count=1 </dev/null

where newsize can be 1k, 400G, whatever and destfile is obviously the
destination filename.

Wednesday, February 13, 2008

Imprint, places I lived

Jan Dittmer
Rankestrasse 17
38102 Braunschweig
jdi@l4x.org
+49 - 531 - 3884123
+49 - 179 - 4570689

Address history

  • Current address 2006-07-14 -

    Rankestrasse 17, 38102 Braunschweig

  • 2005-10-01 - 2006-07-14

    Gliesmaroder Strasse 75, 38106 Braunschweig

  • 2004-09-15 - 2005-09-30

    Eichholz 19, 20459 Hamburg

  • 2000-10-01 - 2004-09-15

    Schuettstrasse 3, 21073 Hamburg

  • 1984-10-01 - 2000-09-30

    Carl-Goerdeler-Ring 9, 38518 Gifhorn

  • 1980-01-04 - 1984-09-30

    Gartenweg 1a, 3170 Gifhorn

Click on the addresses to reveal their location.


Friday, February 8, 2008

First Post

Hi, my name is Jan Dittmer. I'm currently moving services from my private DSL homed server to public services. To have everything in one place, I decided to move everything under the google hood.

So just to note why I want to do this, my current setup consists of a home server on a DSL line with 1 mbit/s upload capability and a static ip. The server (mail.trixing.net) currently hosts publicly:
  • blog/web (l4x.org)
  • mail (@trixing.{de,net,org,com,eu}, @l4x.org, @ppp0.net, @jandittmer.de, @familiedittmer.de)
  • web (trixing.de)
  • Linux Kernel Compile Tests (l4x.org/k), currently dynamically generated
  • gallery (l4x.org/pics/)
  • scm repositories (l4x.org/svn/, svn.l4x.org, git.l4x.org)
  • showip project page
Privately:
  • vdr tv server (l4x.org/tv/)
  • munin service monitor (l4x.org/munin/)
  • dsl connection (l4x.org/dsl/), reverse proxy
  • postgres server
Problems:
  • if the server or link goes down, while I've shared co-located backup-mx, I may lose mail
  • requires time for maintenance
  • spam filtering sucks
  • my web design skills suck
  • I used to do it as a hobby while I was on the university but now with child, family and a real job I want to use my spare time more efficiently
  • gallery and blog are semi-finished programs, just posting barely works, especially the gallery is not wife friendly, posting to the blog sucks
  • gallery requires bandwidth
So I'd like to move:
  • mail (Google Apps), done 2008-02-10
  • blog (including static pages), blogger.com, blog.l4x.org, move posts individually
  • gallery, Picasa, move what makes sense
  • static result pages of kernel compile tests, Google Code? The archive is huge!
  • ShowIP, google code, done 2008-02-12, http://code.google.com/p/firefox-showip/
  • trixing.de (2 static pages, still undecided where these go, probably blogger too)
Leaving:
  • Linux Kernel Compile Tests
  • git/svn web interface and server
  • all the private services