?HOWTO: Enable the SATA CD-ROM Drive in the Dell Latitude D620

After a few weeks using the auxiliary battery instead of the CD-ROM drive, I needed to read a DVD. Surprise! It didn’t work. Reboot. Still no luck.
dmesg didn’t show anything about IDE, and /proc/ide was empty. It was like the CD-ROM didn’t exists at all.
The explanation might be that the CD-ROM is a SATA drive, not PATA. Graham William’s GNU/Linux Desktop Survival Guide holds the key to enable the drive. In short:

# echo "libata atapi_enabled=1" >> /etc/mkinitrd/modules
# cp /boot/initrd.img-`uname -r` /boot/initrd.img-`uname -r`.bak
# mkinitrd -o /boot/initrd.img-`uname -r`
# reboot

Voilá.
(Part of the ongoing Debian GNU/Linux on Dell D620 saga.
[tags]Dell, D620, SATA, cdrom[/tags]

?HOWTO: Run VMware Player under Debian GNU/Linux

VMware PlayerVMware has made available VMware Player for free for a few months now. I had been having problems making it run under the latest kernels in Debian GNU/Linux until I found out about the Czech University vmware-any-any patch. Of course, this is unsupported, so YMMV.

A typical installation run would go like this:

$ cd /tmp
$ wget http://download3.vmware.com/software/vmplayer/VMware-player-1.0.2-29634.tar.gz
$ tar -zxvf VMware-player-1.0.2-29634.tar.gz
$ cd vmware-player-distrib
$ sudo ./vmware-install.pl

Answer the questions about installation directories, initscript dirs and such, but *do not configure VMware yet*. I repeat: do not configure VMware yet.

Now we’ll patch the source with vmware-any-any

$ cd /tmp
$ wget http://ftp.cvut.cz/vmware/vmware-any-any-update104.tar.gz
$ tar -zxvf vmware-any-any-update104.tar.gz
$ cd vmware-any-any-update104
$ sudo ./runme.pl

This will patch the vmware-config.pl script, the kernel modules source code and the VMware binary itself if necessary. Now you may run vmware-config.pl when prompted. Please note that for this you must install the linux-tree-2.6.xx package for your current kernel version, and the source must be unpacked under /usr/src/linux. This is supposed to work fine when you have installed just the kernel headers instead, but I always go for the full kernel because -as you may have noticed- I compile a bunch of stuff into my kernel anyway.
After module compilation vmware-config.pl will prompt for network configuration and prompt to enable the Google searchbar (!). The last lines in the configuration should be something like this:

The configuration of VMware Player 1.0.2 build-29634 for Linux for this running
kernel completed successfully.

You can now run VMware Player by invoking the following command:
"/opt/vmware-player-1.0.2-29634/vmplayer".

Enjoy,

--the VMware team

Now you may head back to VMWare’s site to download a pre-configured appliance to run in your brand-new VMware player installation. Or go to EasyVMX to build your very own virtual machine. In any case, remember to drop a line to thank VMware for releasing this kick-ass product for free!

[tags]VMware, virtualization, debian, linux[/tags]

xorg.conf configuration for nVidia TwinView on the Dell D620

I managed to get TwinView working on the Dell Latitude D620 under Debian GNU/Linux and I’ve been using it for a few weeks now without any problem whatsoever.

The key section in /etc/X11/xorg.conf is this:

Section "Device"
        Identifier      "Generic Video Card"
        Driver          "nvidia"
        BusID           "PCI:1:0:0"
        Option "TwinView"
        Option "MetaModes"                "1280x1024, 1440x900; NULL, 1440x900"
EndSection

Section "Monitor"
        Identifier      "Generic Monitor"
        Option          "DPMS"
        HorizSync       28-72
        VertRefresh     43-60
EndSection

Section "Monitor"
        Identifier      "External Monitor"
        Option          "DPMS"
        HorizSync       28-72
        VertRefresh     43-60
EndSection

I’m using an external 1280×1024 LCD, and I use the KDE control center (Peripherals/Display) to switch between metamodes. The nice thing is that whenever the X server starts and it doesn’t sense the external display it automagically defaults to using only the built-in display. Moreover, TwinView handles gracefully the “hole” below the 1440×900 display. Now what I’d really like to do is to specify that the primary monitor is the built-in display instead of the external LCD, but that can wait a bit longer.

Of course, you can download the complete xorg.conf I’m using, with my finely-tuned (right) TrackPoint and TouchPad configuration.

[tags]nVidia, TwinView, Dell, D620, Debian, GNU, Linux, Xorg[/tags]

?HOWTO:Get over subversion’s DB_VERSION_MISMATCH error

After running several updates on a particular server during the weekend, this morning I got a report that svn was down. a quick insection of libapache2-svn error log turned out this error message:

[Mon Aug 21 12:24:18 2006] [error] [client 172.26.0.73] (20014)Error string not specified yet: Berkeley DB error for filesystem /var/lib/svn/db while opening environment:\nDB_VERSION_MISMATCH: Database environment version mismatch
[Mon Aug 21 12:24:18 2006] [error] [client 172.26.0.73] Could not fetch resource information.  [500, #0]
[Mon Aug 21 12:24:18 2006] [error] [client 172.26.0.73] Could not open the requested SVN filesystem  [500, #160029]
[Mon Aug 21 12:24:18 2006] [error] [client 172.26.0.73] Could not open the requested SVN filesystem  [500, #160029]

After googling it I found out that this has been reported as Debian Bug#342508, which promptly refers you to read /usr/share/doc/subversion/README.db4.3.gz. The recipe works just fine, and I reproduce it here for completeness:

# cd /var/lib
# mv svn svn-maint
# cd svn-maint/db
# db4.2_checkpoint -1
# db4.2_recover
# db4.2_archive
# svnlook youngest ..
# db4.3_archive -d
# cd /var/lib
# chown -R www-data.www-data svn-maint
# mv svn-maint svn

In the same document there’s a note that recommends to migrate the repository from DBD to FSFS. Since I’ve seen some serious trouble with OpenLDAP’s Berkeley DB backend before and the SVN database is over 1GB right now, I’ll schedule a mainteinance window for this migration ASAP.

[tags]Subversion, Debian, BerkeleyDB[/tags]

Hello, Dell!

Dell Latitude D620 As i wrote before, given my (mis)adventures with IBM/Lenovo I decided to change my allegiances and switch to another brand. So during the research phase I took some time to go to the Dell Expo and get to know their laptops firsthand.
One of the questions I had was about the keyboard: after so many years of working with Thinkpads I have become addicted to the TrackPoint, and I was sure that I had seen photos of Dell laptops with such device, so whatever laptop I decided for really had to have it.
I quickly found out that the laptops in the business line -the Latitudes- are the only models to sport such contraption under the Dell-esque name of “Track Stick”. As a matter of fact, besides the Thinkpads they are the only notebooks *anywhere* that still have it, so either they were found unusable by a significant amount of people or IBM tried to milk its patents just a bit too much. Personally, I believe the Trackpoint is the invention of the century right next to the Twiddler (and lately, even _on_ the Twiddler2) but then again some people believe I am somewhat eccentric when it comes to input devices.
So there I was with the entire Latitude line before me to consider. The D420 is very nice and would make a killer travel notebook, but its specs are somewhat conservative for my needs. And the D820 has a nice screen but is way too heavy. So I settled for the D620. I received it last week and I am documenting how to make it work with Debian GNU/Linux.
So here is my hands-on review of the Dell Latitude D620:
Pros:

  • Lightweight: About 4kg with the extra battery.
  • Has a TrackPoint (great for mouse navigation) and a Touchpad (great for erratical mouse movement while typing but useful for scrolling) that fortunately can be switched off.
  • Decent battery life even with a 6-cell.
  • Nice full-sized keyboard with fair displacement, good tactile feedback and a satisfactory click. I could almost forgive Dell for the inclusion of a Windows key instead of a realistically-sized space bar.
  • Mostly supported out-of-the box in Kernel 2.6.16; so far, full support for the devices I’ve tried has involved just a bit of recompilation
  • Nice screen with fair brightness and I haven’t detected any dead pixels so far.
  • Gets kind of hot, but not too much.
  • Real dock connector barring the need to resort to a cheesy USB port replicator
  • Somewhat dull gray-and-black color scheme, but it’s not pre ugly (for a business laptop).
  • Built-in smartcard reader (shows up as an USB device).
  • Built-in fingerprint reader with startup protection right after POST.
  • Did I mention that it has a Trackpoint?
  • Built-in WiFi and Bluetooth.
  • Built-in Wireless broadband with US-centered overpriced carriers (No idea if any of the hardware options would work with some Mexican overpriced carrier, but there is an intriguing SIM slot under the battery anyway).
  • Built-in accelerometer that might be readable under Linux. This might end my MacBook-lightsaber envy.
  • Full Type-II PCMCIA slot instead of ExpressCard, so I can wardrive while I work.
  • Four USB ports.
  • Light sensor for automatic brightness adjustment.
  • Windows Vista capable (*Heh!* Like I care…)
  • Up to 4GB of RAM, if you dare sell your firstborn, your kidney, or your firstborn’s kidney to pay for it.
  • A real parallel and -check this out- DB9 serial port.
  • The inclusion of a TrackPoint is a stroke of genius.

Cons:

  • It really could use a keyboard light (Why do manufacturers still refuse to include them by default? That’d be… what? US$0.05 for a white LED and a switch when bought in bulk? But nooooo…).
  • Both the trackpoint and the touchpad have only two buttons (Unix types may note that there’s one button missing).
  • The 9-cell battery protrudes 1.5in from the front of the laptop instead of going on the back like in IBMs, so it kind of gets in the way and looks very much like an aftertought.
  • Those videos of exploding Dells still give me nightmares.
  • Sorry… no built-in webcam, nor multi-format memory card reader, nor JVC or Bose speakers, nor translucent white lid. This is a business laptop, remember?
  • No Firewire. In this era of Firewire-800 external hard disks that is a serious oversight.
  • The system beep is loud and annoying. Scare-the-cat annoying. Wake-your-neighbours annoying. Get-hit-by-your-wife annoying.
  • No built-in SVideo nor DVI, thought there’s both on the port replicator. Not much of a problem for presentations, but you really need the port replicator to use a decent LCD screen.
  • The Dell USB keyboard is kind of awkward. I keep falling off the left edge, and I have trouble finding the ridges in the F & J keys for touch typing.
  • Sparse to non-existent printed documentation. There’s no manual to ignore. You can get them online if you want them badly. The Service Manual looks interesting, tough.

BTW if anyone from Dell is reading this: please update the configurator for LatinAmerica. You cant’ save your cart. You can’t email it. You can’t even *bookmark* stuff for later perusal. The LA site is primitive, counterintuitive and sometimes even downright annoying. Basically, it got stuck in the 90s.
On the other hand, Dell service was good. Thanks and kudos to both Ivan Castillo -who walked me through Dell’s product line during the Expo- and to Jesus Naranjo -who took my order and was very patient with my obsesive-compulsive hardware demands. One week into it I still haven’t had need to deal with their tech support personnel (Fate has carried on like that for a bit longer) and I hope it stays that way. If they are 50% like their sales people then I have nothing to fear, and altough I have heard some horror stories about them I’m willing to give them the benefit of the doubt for the time being.
In short: Dude, I got a Dell!
[tags]Dell, D620, Review, TrackPoint, Customer Service[/tags]

μHOWTO: Install perl libraries in bulk

When you have to install packages that live out of dpkg, don’t you hate to install their dependencies by hand? I do.
Even though this is exactly what CPAN.pm does, there is a Debian way: If you have another machine with the correct dependencies already installed, you can use dpkg to copy those over.
For instance, this one-liner requests installation of the same Perl libraries that live in another machine:

$ ssh original.machine.com 'dpkg --get-selections'|grep '^lib.*perl'|grep 'install$'|dpkg --set-selections
$ sudo aptitude -f install

You may replace the first regexp to whatever your want (e.g. “^libapache-mod” for perl modules, “^lib.*java” for Java libraries and so on).
Gotta love Debian.
[tags]Debian, Perl, linux, apt, sysadmin[/tags]