bloovis.com

06/07/2010 (4:15 pm)

Enabling fingerprint reader in Linux Mint 9 / Ubuntu 10.04

Filed under: linux, linux mint, thinkpad, ubuntu ::

It looks like the upgrade to the latest Ubuntu is going to keep me busy solving problems for a while.

Today’s second problem has to do with the fingerprint reader in the ThinkPad X41. There’s a good source of information here, but there wasn’t a definitive set of instructions for Ubuntu 10.04 that actually worked. Most of the uproar about the fingerprint reader in Ubuntu 10.04 has to do with a bug where the Enter key has to be pressed after swiping your finger. I couldn’t even get to that point; the trouble was getting logins to prompt for a finger swipe.

As per the instructions at ThinkWiki, I installed and configured the required packages from the standard repository (no PPAs):

sudo apt-get install thinkfinger-tools libpam-thinkfinger
sudo /usr/lib/pam-thinkfinger/pam-thinkfinger-enable

Then I was able to use tf-tool --acquire and tf-tool --verify to show that the fingerprint device worked. But I was not able to use tf-tool --add-user USERNAME to create a fingerprint file for use by the authentication system; this build of tf-tool did not support that option. So I had to set things up manually, by acquiring the fingerprint file and placing it in the proper directory, with the proper name, and with the proper permissions:

sudo su    # login as root
cd /etc/pam_thinkfinger
tf-tool --acquire USERNAME.bir
chown USERNAME:root USERNAME.bir
chmod 400 USERNAME.bir

In all of these commands, substitute your ordinary user name for USERNAME. After this is done, authentication prompts, either in a terminal (e.g., with sudo) or in X (e.g., the login screen), should ask for either a password or a finger swipe. Due the known aforementioned bug, it may also be necessary to hit Enter after the swipe.

05/29/2010 (11:50 am)

Fixing HP printer plugin problem in Linux Mint 9 / Ubuntu 10.04

Filed under: linux, linux mint, thinkpad, ubuntu ::

I upgraded one of my ThinkPads from Linux Mint 7 to Linux Mint 9 today, and discovered that I was no longer able to use my HP P1006 printer. The HP printer tool (hp-toolbox) detected the printer correctly, downloaded the appropriate plugin, but then couldn’t install the plugin. Running the tool from the command line didn’t give any extra information. This is a known bug in Ubuntu 10.04.

The solution is to download and build the HP printer package (known as hplip) from source. The complete instructions are here. I had to install the following extra packages before the configure and make steps would succeed: libjpeg-dev, libsnmp-dev, libcups2-dev, libusb-dev, python-dev, libsane-dev, and libcupsimage2-dev.

05/02/2009 (2:06 am)

Fixing microphone input on ThinkPad R61 in Ubuntu / Linux Mint

Filed under: linux mint, thinkpad, ubuntu ::

Yesterday I tried using the internal microphone on the ThinkPad R61 for the first time, in an attempt to make a Skype call. Skype kept saying there was an error in the sound configuration. After the usual Google searching and flailing about, I made the following changes to my system to fix the problem. It’s not clear whether all of these changes are necessary, but using them all certainly doesn’t hurt.

  • In Skype’s Options / Sound Devices, change “Sound In” to the raw hardware device; mine was “HDA Intel (hw:Intel:0)”, but it will take some experimentation and some test calls to figure out the correct setting. Do NOT set it to “pulse”; there is a known bug in Ubuntu’s implementation of PulseAudio that causes delays of many seconds on microphone input.
  • Also in Skype’s Options / Sound Devices, set both “Sound Out” and “Ringing” to “pulse”.
  • Also in Skype’s Options / Sound Devices, it may be necessary to uncheck “Allow Skype to automatically adjust my mixer levels”.
  • Right click on the task bar’s volume control (the speaker icon), and select Open Volume Control. Hit the Preferences button, and add the following two controls: Capture (Recording) and Input Source (Options). Then in the Volume Control dialog, in the Recording tab, bring up the Capture level to near full, and in the Options tab, set the Input Source to Internal Mic.
  • Using sudo, edit the file /etc/modprobe.d/alsa-base and append the line:
    options snd-hda-intel model=thinkpad

I didn’t find an easy way to reload the sound modules after the last change, so I had to reboot the system for it to take effect.

Note: these instructions apply to Linux Mint 6, and, presumably, Ubuntu 8.10. I can’t guarantee they’ll work on other versions of Linux or other machines.

10/19/2008 (6:54 am)

Reviving an old ThinkPad with TinyMe 2008

Filed under: linux, pclinuxos, software, thinkpad ::

I bought my first ThinkPad nine years ago, and now have five of them. Two of them (an A30p and a T40) are hopelessly broken, with system boards that either won’t power up or won’t stay powered up. The others are working pretty well, including the oldest one, a model called the 380Z, which despite the name, has no relation to Datsun sports cars.

The 380Z served me well for a couple of years. It was running Mandrake Linux practically from day one, and was a reliable, non-sleek tank. Recently I thought it might be fun to update it to a more recent Linux. But its specs are quite modest by today’s standards. Its power is about 1/10th that of a modern laptop in just about every area: 96 MB of RAM, a 233 MHz Pentium II processor, and a 4 GB hard disk. Nothing could be done about the RAM, and that’s the biggest problem, because most Linux GUIs these days (KDE being my favorite) require about 256 MB at a minimum if you want some memory left over for running a browser. The hard disk problem solved itself: when I powered the machine on yesterday for the first time in a year, the disk made terrible clunking and seeking noises and the BIOS reported it as dead. So I swapped in an 80 GB disk from the dead T40.

Now at least the machine could boot and presumably take a new OS installation. But what to install? I am a fan of PCLinuxOS, but it’s a bit on the heavy side for such a lightweight machine. So I tried a cut-down version of this OS called TinyMe 2008. This distro replaces the lovely but somewhat porky KDE GUI with a lightweight GUI based on various minimalist components (Openbox, LXPanel, Nitrogen, and iDesk).

I ran into a serious problem during installation having to do with the limited RAM on the 380Z. If a swap partition was not already available on the hard disk, then the live CD installer would eventually crash, apparently due to running out of RAM. My solution was to create a swap partition manually, enable it, and patch the installer so that it wouldn’t die when attempting to mount or unmount the swap partition.

The first step was to create the swap partition. This was accomplished by running the installer, and telling it to use the entire disk. The installer created three partitions, one of which was a swap, and then asked me to reboot the system. I did that, and when the login screen came up, I switched to a text console using Ctrl-Alt-F1, and logged in as root. I formatted and enabled the swap partition using mkswap /dev/hda5 and swapon -a. Then I switched back to the login screen using Ctrl-Alt-F7.

After logging in as root in the GUI, I launched a terminal (called Sakura) and edited two of the installer Perl scripts so that it wouldn’t die trying to mount or unmount the swap partition.

  • /usr/lib/libDrakX/fs/mount.pm: I edited the two lines containing syscall_('swapon',...) and syscall_('swapoff',...), changing the die calls to print.
  • /usr/lib/libDrakX/draklive-install: I commented out the line containing fs::mount::swapoff by prefixing it with a # character.

After these changes, the installer completed successfully without aborting or crashing the system. The resulting installation is a minimal Linux system that uses Opera as its web browser. This is certainly a decent alternative to Firefox, but I do miss the AdBlock Plus extension that makes browsing commercial, ad-laden sites more pleasant. The Orinoco-based wifi card (a Dell TrueMobile 1150 PCMCIA card) is supported and works perfectly with WEP (but probably won’t work with WPA, if past experience can be trusted).

The main post-installation problem was that sound didn’t work. The 380Z has an old Plug-And-Play Crystal Sound 423x device that pre-dates PCI. After a day of Google searching and experimentation, I determined that the ALSA driver (snd-cs4232) would not work, and that I needed to use the older OSS driver (cs4232). I edited /etc/modprobe.d/sound to look like this:

alias snd-card-0 cs4232
alias sound-slot-0 cs4232
options cs4232 io=530 irq=5 dma=0 dma2=0

I verified these settings by running the ThinkPad’s DOS-based configuration utility, PS2.EXE. I also found it necessary to run aumix after booting to bring up the speaker and PCM levels to audibility.

Another problem with the installation is that graphics acceleration was not enabled; this was very apparent when scrolling or moving windows. The solution was to run the PCLinuxOS Control Center, select “Hardware” and “Set up the graphical server”, and change the resolution bit depth from 24 bits to 16 bits. This is apparently required to work around a limitation of the NeoMagic graphics chip in the 380Z.

09/14/2008 (10:16 am)

Using a Treo 700P as a USB modem on SLED

Filed under: linux, suse, thinkpad, treo ::

During my frequent trips to Vermont over the last four years, I’ve discovered that most airports do not offer free WiFi access (Burlington VT and JetBlue at JFK are notable exceptions). In preparation for an upcoming trip to Vermont and the need to do some telecommuting en route, I figured out how to use my Sprint Treo 700p as an EVDO modem on SLED (SUSE Linux Enterprise Desktop) SP2 on a ThinkPad R61. I was aided in this by a couple of blog postings: Treo 700p Tether with Linux and Dialup Networking via Treo 700p and Ubuntu. Rather than list only the things I did differently, here is a complete procedure.

Installation:

As an ordinary user on Linux:

  • Create the directory usbmodem somewhere (e.g. in ~/tmp or ~/Desktop). Make it the current directory.
  • Download the USB Modem zip file. If you purchased the official version, it’ll have a name like usbmodem_retail_1_60.zip .
  • Unpack the zipfile using unzip usbmodem_retail_1_60.zip
  • Install USBModem.prc on the Treo; you’ll find this file in the current directory. I did this by uploading the file to my web site, and then selecting it in the Treo’s web browser.

As the root user on Linux:

  • From the usbmodem directory created earlier, run this command:
    cp drivers/linux/ppp-script-evdo-template /etc/ppp/peers/ppp-script-treo
  • Edit /etc/ppp/peers/ppp-script-treo. Change the “connect” line to:
    connect '/usr/sbin/chat -s -v "" AT OK ATD#777 CONNECT'
    Change the “user” line to:
    user USERNAME
    where USERNAME is your Treo’s user name, as determined from the main phone app, Options / Phone Info, UserName.
  • Edit /etc/ppp/pap-secrets, and add this line:
    USERNAME@sprintpcs.com *
    where USERNAME is the phone’s user name as determined in the previous step, and where there is a single tab between USERNAME@sprintpcs.com and the asterisk, not spaces.

Making a Connection:

  • Turn on the Treo, and connect it to the Linux machine with the USB sync cable.
  • Wait a few seconds and verify that the visor kernel module has been loaded with lsmod | egrep visor.
  • On the Treo, start the USB Modem program and press the “Enable Modem Mode” button.
  • Back on Linux, perform the following steps as root.
  • Bring down all other networks using ifdown eth0 or ifdown eth1 as necessary.
  • Verify that the USB modem driver and device are present using ls -l /dev/ttyACM0
  • Connect to the EVDO network using:
    pppd /dev/ttyACM0 call ppp-script-treo
    You should see messages about the connection being established. If you see a message about default route not being overridden, you forgot to bring down all your existing net connections earlier.
  • Verify the connection using route -n. You should see two entries for ppp0. To make really sure the connection is working, try ping -c3 www.google.com
  • End the connection by pressing the “Disable Modem Mode” button in the USB Modem program on the Treo. This should automatically bring down the ppp0 connection on Linux.

It should be possible to use KPPP (the KDE dialup connection application) instead of the various command line tools described above, but I have not tried this.

The irony in all this is we can finally do something with our cell phones that we were doing with Ricochet 13 years ago.

09/10/2008 (7:23 pm)

SLED SP2

Filed under: linux, software, suse, thinkpad ::

Today I updated my ThinkPad R61, which came with SUSE Linux Enterprise Desktop (SLED) SP1, to SP2. I did this entirely online, using this Novell document as a guide. In particular, section 9.2.3, “Updating to a Service Pack” and “Starting with YaST Online Update” described the process I used.

There were a few gotchas with the documentation. Some of the package names didn’t match what I saw on my system. But more seriously, I needed to run the Yast2 Novell Customer Center Configuration tool before anything would work. Registering one’s installation is apparently the only way to add the service pack repositories to Online Update. Otherwise, the process went smoothly, and the system appears to be running well after a reboot.

I noticed one small glitch after installing SP2: fonts in both KDE applications and Firefox looked very fuzzy. After some head-scratching, I fixed this by disabling subpixel hints in anti-aliased fonts. To do this, start the KDE Control Center (which SUSE calls “Personal Settings”), then select Appearance & Themes, then Fonts, then press the Configure button, then un-check “use subpixel hinting”.

04/05/2008 (11:58 am)

ThinkPad R61 and SLED

Filed under: linux, software, suse, thinkpad ::

Lenovo now sells some ThinkPads that come with SUSE Linux Enterprise Desktop 10 SP 1 instead of Windows. The cheapest of these is the R61. I have owned an R61 for about a month and it’s quite nice. SLED has been performing admirably, and pretty much everything Just Works, including video, sound, suspend to disk or RAM, DVD movies, and wireless. The Network Manager is especially nice, and it reliably detects and configures wireless connections, and automatically connects to networks it’s seen before. The wireless antenna in this laptop is very sensitive and picks up networks that other laptops miss.

But SLED did need a little bit of tweaking to suit my tastes. First, by default SLED uses Gnome as its GUI, and while it looked fine, I’ve been using KDE for many years and wanted a familiar environment. I also wanted to migrate all of my mail (which is stored in KMail) to the new system. But installing KDE wasn’t completely trivial. In the Software Management part of Yast (the SUSE control panel) there didn’t seem to be a single master KDE package that would pull in everything I needed. So I ended up installing the following packages (as printed by rpm -qa | grep kde):

kdebase3-3.5.1-69.52
kdenetwork3-3.5.1-32.24
kdebindings3-3.5.1-19.2
kdemultimedia3-CD-3.5.1-20.15
kdebase3-beagle-3.5.1-69.52
kdenetwork3-InstantMessenger-3.5.1-32.24
kdelibs3-3.5.1-49.39
kdelibs3-doc-3.5.1-49.35
kdepim3-3.5.1-41.30
kdepim3-networkstatus-3.5.1-41.30
kdegraphics3-pdf-3.5.1-23.13.1
kdebase3-kdm-3.5.1-69.52
kdemultimedia3-sound-3.5.1-20.15
kdegraphics3-scan-3.5.1-23.13.1
kdemultimedia3-video-3.5.1-20.15
kdepim3-sync-3.5.1-41.30
kdegraphics3-kamera-3.5.1-23.13.1
kdegraphics3-postscript-3.5.1-23.13.1
kdebase3-session-3.5.1-69.52
NetworkManager-kde-0.1r588481-1.17
kdebindings3-ruby-3.5.1-19.2
kdebase3-ksysguardd-3.5.1-69.52
kdemultimedia3-mixer-3.5.1-20.15
kdelibs3-arts-3.5.1-49.35
sled-kde-user_en-10.1-0.11
kdemultimedia3-3.5.1-20.15
kdeutils3-laptop-3.5.1-25.14
kdeutils3-3.5.1-25.14

I didn’t have to select all of these packages manually; some were pulled in via dependencies.

Once KDE was installed, it still wasn’t presented as an option at the login screen. I had to edit /etc/sysconfig/displaymanager and change DISPLAYMANAGER to “kdm”. Then rebooting brought up the proper login screen.

Then I discovered that KMail wasn’t able to send mail via authenticated SMTP. After some frustrating Google searches, I discovered that I needed to install the following Cyrus packages (as printed by rpm -qa | grep cyrus):

cyrus-sasl-plain-2.1.21-18.4
cyrus-sasl-crammd5-2.1.21-18.4
cyrus-sasl-digestmd5-2.1.21-18.4
cyrus-sasl-gssapi-2.1.21-18.4
cyrus-sasl-2.1.21-18.4
cyrus-sasl-saslauthd-2.1.21-18.4
cyrus-sasl-otp-2.1.21-18

Finally, there was a strange problem running Yast from the KDE menus: nothing seemed to happen after I typed the root password, although running it manually from a terminal window logged in as root worked fine. It appears that running Yast via kdesu is not always reliable. To work around this, I created a desktop icon that runs gnomesu yast2, and that works every time. But strangely, now I can’t reproduce the problem with kdesu. So this problem still remains to be diagnosed.

02/27/2008 (6:33 am)

Replacing a ThinkPad A30p system board

Filed under: hardware, thinkpad ::

Last year my ThinkPad A30p started failing to charge its battery, after I’d left the machine on the shelf for a few months. I thought that maybe the battery had died from neglect, but a replacement battery purchased on eBay also had the same problem. So the system board (AKA motherboard) seemed to be at fault. But at least the machine worked when it was connected to AC power. Then a month or so later, it powered off spontaneously after 15 minutes of use, and after that it was completely dead.

I took the machine to a laptop repair shop in Santa Clara that advertises heavily on eBay. After a month and a half of waiting, I finally called them back. Apparently they had written down my phone number incorrectly and had left a message with the wrong phone number. They told me they couldn’t repair the system board or find a replacement, so there was no charge for service. I showed up at the shop a week later to pick up the machine. I was kept waiting in the rather dirty lobby for 40 minutes before a technician brought out the machine.

I was puzzled by the long wait, but I figured it out later: apparently, the technician had to put the machine back together hastily to return it to me. A week later, when I took the machine apart to replace the system board with one I had bought on eBay, I discovered the following problems:

  • There were at least a dozen screws missing, including all the screws on the CPU fan assembly.
  • The removal lever on the floppy drive had been installed incorrectly, leaving the floppy drive jammed in place.
  • The “keyboard CRU”, an insulating support device that fits between the keyboard and system board, was missing.
  • One of the two wi-fi antenna wires coming from the LCD had been cut.
  • The PCMCIA assembly was not plugged all the way into its connector on the system board.

The moral of this sad tale: do all the work yourself. This turned out not to be as difficult as I had imagined. IBM’s service manuals, available online, are excellent, and have detailed drawings, instructions, and parts lists. Replacing the motherboard was tedious, because it involved removing just about every other component in the machine first, but it was a straightforward task. I spent three hours on the job because I had never done this kind of repair before. The hardest part was unjamming the floppy drive; I managed to get it out after removing the keyboard bezel, by lifting the drive up and distorting its enclosing Ultrabay cage slightly, while simultaneously pulling the drive out. When I reassembled the machine, I made sure the floppy drive’s removal lever was hooked up correctly.

My efforts were successful: the cheap ($30) system board I bought on eBay, which had been advertised as being in an unknown and non-guaranteed condition, works perfectly. Mepis Linux 6.5 (which I’d installed just before the machine died) booted with no problems. Even the wi-fi, about which I was worried because of the cut antenna cable, is fine (I’m typing this using the repaired machine on a wi-fi connection).

02/16/2008 (8:28 am)

ThinkPad Reliability

Filed under: hardware, linux, thinkpad ::

(Note: What follows is purely anecdotal, personal experience. Don’t draw any hard-and-fast conclusions.)

I own four IBM ThinkPads now:

  • 380Z: 233 MHz, 96 MB RAM, 4GB disk, 1024×768 screen. Purchased used in 1999.
  • A21m: 750 MHz, 512 MB RAM, 40GB disk, 1024×768 screen. Purchased new in 2001.
  • A30p: 1.2 GHz, 512 MB RAM, 60GB disk, incredible 1600×1200 screen. Purchased used in 2005.
  • T40: 1.6 GHz, 1GB RAM, 80GB disk, 1400×1050 screen. Castoff from son, received in 2006.

The two older machines have been very reliable. The only problem I’ve had with them was that the disk in the A21m got very noisy after a couple of years, and I replaced it to keep my sanity. The A21m still runs a relatively recent Linux (PCLinuxOS 2006) quite nicely, and I still use it to watch DVDs and as my emergency backup machine when the T40 is being flaky (see below). The 380Z is too old to run anything other than Damn Small Linux.

The two newer machines have been much more problematic.

After a year or so, the hard disk in the A30p started reporting errors when it warmed up; I replaced the disk and all was well. A few months later, the A30p would no longer charge its battery. A replacement battery didn’t help. A couple of months later the machine started powering off after 15 minutes of use, and soon afterwards refused to power on at all. A local laptop repair service was unable to fix the problem. Earlier this week I ordered a cheap replacement motherboard of unknown condition from an eBay store; I’ll report back when I’ve installed it.

The T40 is my daily use machine, but its hardware is frustratingly flaky. My son warned me that the machine crashed under Windows XP doing heavy video work, and that the Atheros wireless card was flaky. He was right, and the machine has the same problems on Linux. When watching DVDs or big Flash videos, the screen will go blank and the machine will lock up and refuse to reboot until it’s cooled down for a few minutes. The problem is worse when the machine is hot; I was able to get it crash by doing a kernel compile in a terminal window while scrolling in Firefox.

I poked about on the web and found discussions in which other T4x owners complained about exactly the same problem. It seems that the BGA mounting method used to solder the video chip to the motherboard is not reliable on these machines, and the chip contacts fail when the machine heats up or is flexed. Because the problem seems to be inherent in the design of the T4x series, I have decided not to go to the trouble of taking it in for repair or replacing the motherboard, which could be quite costly.

The Atheros wireless card in the T40 is unreliable as well. After some amount of time, it will drop the connection and I’ll have to restart it manually. It’s unpredictable but seems worse when it’s warm.

The T40 is a lovely machine. It’s fairly powerful and lightweight, and it runs Linux beautifully, but I need something that can be used as a desktop replacement machine for all purposes, not just a portable email device. If I can’t get the A30p with its wonderful display working again, I’ll start looking for a replacement for the T40. In the meantime, the good old A21m will provide service where the T40 falls down.