Karmic 9.10 Install Problems with SATA Drives

Middle of the night, trying to re-install Ubuntu on a crashed machine. Worse of luck.

Turns out, I am attempting to install Karmic 9.10 on a platform with a newly formatted SATA drive. Here are the symptoms:
1. Boot up using Desktop i386 Live CD
2. Select installing Ubuntu
3. Go through installer dialogs: language, time, keyboard. Those are fine
4. Select partition dialog fails to show any drives

Booting into live desktop and using GParted shows the drive just fine. So what is going on?

Reference: http://ubuntuforums.org/showthread.php?t=1304772

Turns out, there is interactions between dmraid and SATA drives. Quick solution:
1. Boot into live desktop
2. Start Synaptic Package Manager
3. Search for “dmraid”
4. Uninstall all “dmraid” related packages
5. Proceed with install

Fix hangs at 4 second intervals in Mozilla Firefox 3.5

This note relates to Mozilla Firefox 3.5.7 running on Ubuntu Karmic (9.10).

The problem is that Firefox appears to be freezing for a quick moment, every 4 to 5 seconds. This is annoying when editing text and watching a video on YouTube.

I came across this helpful post: http://support.mozilla.com/en-US/forum/1/524464

My approach to the fix is to give up on session restore, altogether. I do not like it, anyway. The post above might help you with tweaking better values if you wish to retain this feature.

1. Open firefox to this page: about:config
2. In the filter box, type: browser.sessionstore
3. Double click on “browser.sessionstore.interval” and enter a larger value of your choice (I used 100000, but the next step might make this irrelevant)
4. Double click on “browser.sessionstore.resume_from_crash”, resetting the value (i.e. make it “false”)

This fixed the annoying behaviour. I hope it works for you.

Wifi Killswitch does not enable Wifi

Over the past couple of days, I have seen a situation where I boot my laptop (Ubuntu Karmic) and the Network Manager applet insists that the wireless is disabled. Rebooting does not help. Examining the syslog showed that the OS found 2 kill switches and one of them was disabling the wireless. Examining the state showed that each kill switch state was affected by the single physical kill switch, but their states were the opposite of each other. So regardless of which position the kill switch is in, one of the kill switch devices would disable the wireless.

I turned the kill switch off and reboot the computer. When it came up, the kill switch drivers were now synchronized and turning the kill switch on caused the Network Manager to start looking for Wireless connections. Listing the kill switch states shows they are again synchronized.

This post at LinuxTrap shows that others are experiencing a similar condition.

VGA and S-Video output on an Inspiron 1720 in Ubuntu

Note these instructions are for Ubuntu 9.10 (Karmic).

In prior versions of Ubuntu, I have had some problems getting the VGA and S-Video outputs on my Inspiron 1720 working, so today I tackled this problem. In Karmic, this process is quite straightforward. Once you connect your video cable to the laptop, whether it is S-Video to a television or VGA to a monitor, you can cycle through various video distribution modes using the Fn-F8 keys. This is marked as “CRT/LCD” on the F8 key. Here is the cycle that I found using S-Video output.

1. LCD on at full resolution ; TV off
2. LCD off ; TV on at 848×480
3. LCD on at full resolution ; TV on and to right of LCD, 848×480 ; desktop shared across both screens
4. LCD on, 1024×768 ; TV on, 1024×768 ; mirrored desktop

You can change the parameters of each of these cycles by running the Display Preferences applet (System->Preferences->Display). This applet has a spacial depiction of  both displays and you may drag a display to be in a specific location with respect to the other display. For example, if in 3 above, you wanted the TV to appear logically above the CRT, you would drag the TV rectangle (labeled “unknown” for me) above the rectangle labeled “Laptop 17”.

Mode 3 shares the desktop over the 2 screens so that you can move the mouse cursor from one screen to the other screen, effectively extending your desktop. If you use an image as your desktop background, you may get the background color showing around the edges of the image as the image is centered in the extended display resolution.

Mode 4 shows the same content on the laptop LCD panel as on the connected screen. Note that in this mode for a connected television, the video quality is less crisp than in mode 3 due to the scaling of the 1024×768 resolution to something the television can handle.

If you connect a VGA cable to a monitor, a similar cycle is used, but the VGA resolutions used will be different.

Out of curiosity, I connected both a VGA monitor and S-Video to the TV, but preference seems to be given to the VGA monitor such that the TV never gets a signal.

Foxit, a better PDF reader for Linux

Today I got fed up with the overall poor search performance and poor rendering of Evince on 64 bit Ubuntu and looked around for an alternative. I use Foxit on my Windows machine and am generally very happy with it, having only had problems with it with government security clearance documents. A quick search shows that there is indeed a Linux version of Foxit.

Note that Foxit is a 32 bit executable so if you are running a 64 bit version of Linux, you will need to install ia32-libs from your repository.

Since a new version is supposed to be available within a couple of months, we may as make the upgrade path easier. I chose to download it to a local directory and then after uncompressing, moving it to /usr/local/foxit1.1

We now have a link to the directory at /usr/local/foxit which we can change to the 1.2 version when it becomes available.

Now lets add it into the Gnome menu. Click on System->Preferences->Main Menu. Select Accessories then click new Item. Fill in the form, pointing to FoxitReader.

Create Launcher for Foxit

Click OK and now Foxit shows up in your Accessories list.

Now, lets change the file associations for PDF files so that if you click on a PDF from the File Browser that it opens Foxit. From the File Browser, find a PDF file and then right click and select Properties and click the Open With tab.

Adding Foxit as a PDF Handler

Click on Add, then dropdown Use a custom command and browse to where FoxitReader lives. Click Close.

Add Foxit

This adds FoxitReader into the Open With list. Select FoxitReader and click Close.

Associate

Now you should be able to click on any PDF in the File Browser and Foxit will be launched with the contents of the document.

Installing Wink on 64 bit Ubuntu

Wink is great tutorial building software for Linux and Windows. It used to be available in the Ubuntu repositories but is no longer included. Currently, the Linux variant of Wink is version 1.5 and the Windows variant is version 2.0. Even though they share the same build number, they are not the same.

Unfortunately, running the newer, Windows version under Wine is not an option that I can see because there isn’t a way to capture the input from native Linux windows.

Go to the download page and download the wink15.tar.gz tarball to a temporary directory. This makes cleanup easier, since it is actually a tarbomb, extracting to the current directory.

Unzip the tarball which creates an installer.sh script and an installdata tarball.

Now, run the installer script.

Oops. I am running a 64 bit version of Ubuntu and this is a 32 bit binary only. Lets check what is in the installdata.tar.gz tarbomb.

This creates an entire directory structure in place including the wink executable. Lets install some basic 32 bit libraries.

Now lets check whats missing.

The “libexpat.so.0 => not found” line tells us that libexpat.so.0 is missing. What is odd is that the executable also links against libexpat.so.1.

I could try and find a 32 bit version of libexpat.so.0, but it might be worth a try to fake it.

Ha, it runs! Initial tests shows that it captures fine and can save to HTML, PDF and Flash.

Copy the entire directory structure to a its final resting place.

Now you can either run it from the wink directory or set up some desktop links to it.

64bit Karmic and Eclipse GWT plugin

After upgrading to Ubuntu 9.10 from 9.04, the GWT plugin for Eclipse doesn’t work so well when trying to run an app in hosted mode.

** Unable to load Mozilla for hosted mode **
java.lang.UnsatisfiedLinkError: /home/igough/installs/eclipse-3.5/plugins/com.google.gwt.eclipse.sdkbundle.linux_1.7.1.v200909221731/gwt-linux-1.7.1/mozilla-1.7.12/libxpcom.so: libstdc++.so.5: cannot open shared object file: No such file or directory

Karmic does not have libstdc++.so.5 as part of the distribution but you can download the one from 9.04 from the Ubuntu repository. I am running 64 bit Ubuntu, and would normally download the 64 bit version of the library, but the GWT Eclipse plugin uses a 32 bit version of Mozilla for hosted mode. And its hosted mode that wants the Standard C++ library. So we must download and install the 32 bit version.

Download libstdc++5_3.3.6-17ubuntu1_i386.deb from the Ubuntu respository link above. Then install using:

Once you do this, hosted mode should work again.

Karmic Upgrade and Drive Fail warning

Today, I upgraded my laptop, currently running Ubuntu 9.04 to Ubuntu 9.10.

In general, 9.04 has seemed to have been an ill-behaved release with all sorts of problems handling the Intel GM965 chipset in my Inspiron 1720, in particular the X3100 graphics subsystem. It got so bad for JP that he moved his laptop over to a very pre-release version of Karmic a few months back.

One of the new features that runs on Karmic is that Palimsest Disk Utility 2.28 which you can find at System->Administration->Disk Utility. This utility monitors the SMART data from all drives in your system to let you know when the disks start getting flakey. When JP upgraded, the utility warned him that his disk was starting to go bad, with dire warnings about the disk failing at any moment. JP replaced the stock Fujitsu drive with a Seagate 500Gb drive and all has been well. When I did the Karmic upgrade, Palimsest gave me a disk failure warning too. I looked at the SMART data that the utility was reporting and marveled that the numbers that were being reported were so high. So then I ran Spinrite 6 against the drive. Spinrite did not detect any problems, but did show the same oddly high SMART numbers. So I ran smartctl

> sudo smartctl -a /dev/sda

Now this pointed out that the particular drive, a FUJITSU MHY2160BH is not in the smartctl’s database. Apparently, SMART isn’t as much a standard as it should be. Different vendors do different things with the SMART attributes. My suspicion is that if the particular drive is not in the database, the program cannot know how to interpret the raw numbers correctly. Palmisest and smartctl are show the same raw values for the SMART attributes.

Lets take a look at some of the raw numbers:

Wow, thats a lot of reallocated sectors. 8 trillion. On a 160Gb hard drive. I’m not buying it. But that number in hex is 07D0 0000 0000, an oddly round number. Maybe its not a 48 bit number in this case, but rather a 16 or 32 bit number and the real value is zero.

Lot of hours. I know the drive has not been powered on for 101 years, so this number is suspect too. Converting to hex gives 000D B1C2, but I cannot relate any portion of this number to reality. I would expect in the order of 16800 hours (0x41A0).

Ok, so now I don’t trust anything that Palimpsest is telling me. Maybe its wrong. Spinrite thinks the drive is fine and that is good enough for me. I only have the single drive in my laptop and have automatic daily backups and regularly run Spinrite on the drive. So if Palimpsest is not telling me anything useful, no sense in it taking up memory, so I have stopped it from starting when my laptop boots.

Install VirtualBox on Ubuntu

VirtualBox is by far the best virtual machine software for Ubuntu. Here is a simple recipe to install it on Karmic.

Temperature Display

To get a temperature display of your laptop.
> sudo apt-get install sensors-applet

Right click on the top dock area and select “Add to Panel…”
Scroll down to the Hardware section and click on Hardware Sensor Monitor.