Ubuntu Linux and the Canon MP492 printer

I bought a shiny new combination scanner/printer/copier last weekend. It’s the Canon MP492 and I expected it would work just fine in Linux. I mean, it’s just a printer, right?

Nope. The printer was detected as a Canon MP490 but unfortunately the CUPS system used by Ubuntu Linux didn’t support that particular version. It supported the 520 and others but no sign of my new purchase. To be honest, I was dumb founded. I even configured it on my Macbook and thought about sharing it over the network but the Macbook is on the wireless network while everything else is wired, and I didn’t feel like making things more complicated.

So I went searching again and eventually found this helpful thread (it didn’t show up on my first searches, Google refresh?). Drivers are available for the printer here on the Canon Thailand website. Thankfully the instructions were all in English, and the .deb package installed and configured correctly. Drivers for the scanner are listed on that forum post too but I don’t have an immediate need for that so I didn’t test them out.


The printer itself is an average photocopying machine that does the job. Here’s the back cover of the December 1954 issue of the National Geographic. The copy is pretty good except for banding on big blocks of colour like that in the Coca Cola logo.


Reasons to upgrade your Ubuntu is down unfortunately. The release of Ubuntu 9.10, Karmic Koala the latest version of Ubuntu Linux, is obviously driving a heck of a lot of traffic to the site. (I wonder if they use the equivalent of wp-super-cache?)

Anyway, I’ll be upgrading tomorrow probably and once I do I’ll be checking out some of the applications mentioned on this page. Everything from an alternative media player, the (as yet unreleased) Gnome 3.0, audio/video editing, a photo manager to the pretty sweet Electric Sheep screensaver are listed here.

Many of the apps are available for Ubuntu 9.04 but others require building manually. I’ll be busy over the weekend 🙂

Here’s a few of the eye catching screenshots from that page, just to whet your appetite!


Ubuntu? Laptop? Intel Graphics? Speed Boost!

If you’re using the latest version of Ubuntu, Jaunty Jackalope, or version 9.04 and you use a laptop with an Intel graphics chip like I do in my Dell D630 you may have gotten used to to the God awful video performance since you upgraded from the previous release.

I had. I had forgotten that windows aren’t supposed to tear when you drag them, and that yes, the underpowered chipset in my laptop can sort of handle the special effects in Compiz. What changed? The new drivers in 9.04 did. Intel are apparently reshaping how their drivers work but while they do it performance has taken a back seat and is cheerfully swilling on beer while the computer does the heavy lifting up front. (errr)

Anyway, simple way to fix it? Revert to the driver in the previous version of Ubuntu! It’s horribly easy to do. Just follow this guide, update your apt sources, install the old driver and restart X. I did and now I have fancy windows bouncing here, there and everywhere! In fact, my wife used her online O2 account to send a few texts and the confirmation popup window hopped around the screen all on it’s own! Oh how we laughed!

Oh, and for anyone who uses a browser, there’s a really simple way to get a CPU upgrade for free. Download Chrome or Chromium (or for Ubuntu .debs) and give it a whirl. After using Firefox for many years it’s like a breath of fresh air, fast moving air that is as it zips along! OK, it’s not completely bug free. The latest builds have a problem with the “default browser” setting (grab a build from around Sep 4 but the fix will be available soon) but it’s the main browser on my Linux desktop and I love the thing!


Upgraded my Dell D630 to 4GB RAM

That was quick:

  • Order placed with Crucial yesterday afternoon around 1.30pm for 2 sticks of 2GB RAM.
  • UPS guy called this morning at 11.30am with RAM.
  • Dell D630 laptop upgraded to 4GB RAM with the help of this tutorial. Only took about 20 minutes, although unscrewing and removing the keyboard was a bit nerve wrecking.
  • Rebooted and found that Linux only found 3.5GB of the RAM but fixing that is simple:

    # apt-get install linux-headers-server linux-image-server linux-server

  • Reboot and I see 4GB RAM. Should make running Firefox and Bibble Pro 5 a lot less painful. Both memory hogs.

4GB of DDR2 RAM only cost me about 50 Euro. I’m sure I have a receipt for 8MB of SDRAM I bought years ago. Cost me 100 quid then. So, 4GB of RAM back then would have cost a small fortune.



Edit: the server kernel has terrible video performance (unsurprisingly), I’ve gone back to the desktop kernel and will recompile it when that 500MB of RAM becomes a real necessity (or I move to a 64 bit version of Ubuntu).


Run a program on one CPU core in Linux

Modern computers use CPUs with multiple cores for performance reasons. Software can take advantage of that and use both cores to run separate threads but sometimes it’s useful if you can force a process to use one core rather than both.

In Linux that’s easy to do. If you’re using Ubuntu or Debian grab the schedutils package:

sudo apititude install schedutils

That will install a program called “taskset” which is a tool to “retrieve or set a process’s CPU affinity”. It’s really easy to use too.

I wanted to force Bibblelabs on to one core while importing photos.

# ps auxw|grep bibble
donncha 19482 78.7 33.1 1090388 681220 ? RNl 09:56 77:28 ./bibblepro
# taskset -p 19482
pid 19482’s current affinity mask: 3
# taskset -p 01 19482
pid 19482’s current affinity mask: 3
pid 19482’s new affinity mask: 1

The app is still heavy on the system, and “System Monitor” doesn’t suddenly show 0% usage on one CPU because I’m also running Firefox, Xchat, X, Gnome Terminal but I’d almost swear the browser window refreshes faster.

PS. Thanks to whoever told me about this on Twitter a while back. It had slipped my mind and I had to search for it again. Blogging it to remember it!


Ubuntu Linux: Is your external usb drive slow?

I don’t know when this happened but my external USB drives were running really slow. Reading RAW images off them took ages, backups took forever, and moving files back and forth was plain slow.

I use two Seagate FreeAgent external drives. They’re both USB 2 devices so should sustain more than the maximum 1MB/s I was seeing. I decided to go looking. First stop was /var/log/syslog where I found the following:

usb 2- new full speed USB device using uhci_hcd and address 13
usb 2- not running at top speed; connect to a high speed hub

To cut a long story short, after a few searches I found bug 66115 where the same problem is described. Unfortunately the ticket has since been closed but the work around discovered by Jean Pierre Rupp works for me too. I haven’t modified any files in /etc/ but unloading ehci_hcd and uhci_hcd and reloading in the correct order worked for me:

rmmod ehci_hcd
rmmod uhci_hcd
modprobe ehci_hcd
modprobe uhci_hcd

Now I get a very respectable 15-20MB/s when using rsync to transfer files from my internal drive and reads are super fast:

hdparm -tT /dev/sdi1

Timing cached reads: 3964 MB in 2.00 seconds = 1985.16 MB/sec
Timing buffered disk reads: 82 MB in 3.03 seconds = 27.08 MB/sec

Next on the TODO list is making sure the modules are loaded in the correct order on reboot. Time to dive into /etc


Control Ubuntu and Mac OS X from one computer

I just installed Synergy on my Ubuntu and Mac OS X laptops and now I can control both from one keyboard and mouse. It works fairly well, although I do wonder:

  1. What are the special Mac keys mapped to on my beige PC keyboard?
  2. I’ll have to stretch if I move my Macbook away from my desk. (joking)

It’s easy enough to install, on Ubuntu the Linux version is already in the repositories, so the following will install a simple gui tool to configure and run a server.

aptitude install quicksynergy

That will install Synergy as well.
Run “quicksynergy” from a terminal, go to the “Use” tab and give it the IP address of your machine. Then enter the hostname of your second (or third or fourth..) computer in whichever direction you want. My Macbook is on the left.

Before clicking “Execute”, I downloaded the Mac OS X version of Synergy, untarred it and after reading the documentation, fired up the client with:

./synergyc -f

Moments later, the following message popped up on my Ubuntu terminal,

NOTE: CServer.cpp,278: client “donncha-o-caoimhs-macbook.local” has connected

Now I can move the mouse cursor off the left side of my Ubuntu screen and it starts moving on my Macbook!

I don’t think I’ll use it full time as I’d strain my back or neck typing on a keyboard in front of me and twisting my neck to see my Macbook but it’s a nice tool to have. Over WiFi moving the mouse cursor stuttered a small bit, so it’s unlikely you’ll want to do intricate pixel work with it.
I’ll have to try a day’s work with it to judge it properly.


Fixing Ubuntu 8.10

I suppose you could say I’m a long time Debian/Ubuntu Linux user, but the recent upgrade to 8.10 completely messed up my desktop machine.

  • Sound was broken in Flash. That’s happened before and doing an aptitude install flashplugin-nonfree-extrasound fixed that, but from time to time sound would break and I’d have to killall -9 pulseaudio;pulseaudio -D to get it working again.
  • My shiny new Xbox360 controller refused to work correctly in Ubuntu 8.10. Despite assurances on various Ubuntu sites that a fully updated system should now work, it didn’t. Moving the analogue stick moved the mouse pointer.
  • Editing a spreadsheet in Open Office proved impossible as whatever key or action I last took would repeat if I used the cursor keys. Hit “a” and “a” would appear in every cell when the cursor was moved. I used the mouse and TAB a lot while working on my last VAT return.
  • I wrote a DVD+RW just fine on Monday, but 3 days later when I tried to erase it, Gnomebaker complained it didn’t have permission to access /dev/sr0 (I think). I tried to mount another CD and Ubuntu complained it couldn’t read ISO9660 CDs.

I tried recreating my user account in case that helped. It didn’t. The only way to fix my broken Ubuntu 8.10 was to reinstall from scratch. After backing everything up onto one of my external drives the install couldn’t have been easier.

So, now? Any problems? ‘Fraid so.

  • I had to install flashplugin-nonfree-extrasound to get sound working in Firefox and Flash. Yay, Youtube is sounding sweet again! No lockups yet.
  • My joypad still didn’t work, despite the fact I had upgraded everything. Thankfully this bug report came to the rescue. If your Xbox360 controller refuses to work in Ubuntu, try this:

    $ xinput list
    See which device number the Xbox controller has…
    $ xinput set-int-prop THATDEVICENUMBER ‘Device Enabled’ 32 0

    I’ll probably have to add that to the Gnome Session so it’s permanent.

  • works fine thankfully. That was a showstopper bug. I even considered using Mac OS X for a moment.

Backuppc is reinstalled and configured. It now has nice RRD graphs! I’m also blown away by the folder sharing in Nautilus. This might have been available in 8.04 but I never noticed. Sharing folders via SMB has never been so easy!

I haven’t reinstalled everything I need yet, but I’m happy that my desktop is working again.


How to upgrade Ubuntu

upgrading ubuntu

I hit the Upgrade button and I presume it’s doing it’s thing. The Ubuntu 8.04 ‘Hardy Heron’ Release Notes have just popped up so it’s time to click the “Upgrade” button again. Tom has some great tips for post install configuration.

I’ll be happy if SDLMame, mplayer, UAE and Vice continue to work as normal after the upgrade. Finger’s crossed. It’s getting easier and easier to upgrade Linux distros these days!

Update! Ubuntu Hardy is now installed and it appears to be working fine. There was a problem with SDLMame unfortunately. This dialog appeared at the end of the upgrade:

ubuntu upgrade problem

I didn’t think that would be a problem to fix but then the same dialog appeared saying the “update-manager” had failed to upgrade! Oh no! Anyway, I clicked Close, thinking it was related to the SDLMame problem and then this shocker appeared:

could not upgrade!

Ah crap! It took over a day of downloading packages to get this far. Sheesh. I closed that dialog and then, nothing. The update manager closed too and I was left looking at a blank desktop. Thinking I had nothing to lose, I rebooted and to my joy up popped Ubuntu Hardy!

I reinstalled SDLMame which fixed the problems with that. Everything else works ok and I’m just wondering if I’m missing anything because the upgrade aborted? Who knows. It works. I’m happy.


HOWTO: Ubuntu desktop visual effects on Dell D630

The Dell Latitude D630 comes with a number of different video cards but if you use the Intel chipset you may be frustrated when trying to activate the visual effects eye candy of Compiz:

Ubuntu Visual Effects

Checking either of the lower two options brings up this alert saying, “Desktop effects could not be enabled”.

Ubuntu Visual Effects

I didn’t bother trying to fix it for ages and put it down to using Ubuntu on exotic hardware. Fortunately it’s simple to get working. I just needed to install the xGL server:

# aptitude install xserver-xgl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following NEW packages will be automatically installed:
  libglitz-glx1 libglitz1
The following NEW packages will be installed:
  libglitz-glx1 libglitz1 xserver-xgl
0 packages upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/1843kB of archives. After unpacking 4854kB will be used.
Do you want to continue? [Y/n/?]

Once I logged out (and rebooted, for some reason my external monitor doesn’t always “catch” when I restart X) and back in again xGL was loaded and I was able to enable desktop visual effects. Despite my misgivings about using an embedded graphics chip it actually works really well. Windows bounced around, bent out of shape and did lots of nice animation stuff.

Then I removed the whole lot by uninstalling the xserver-xgl package again. Why? Unfortunately it conflicts with other openGL apps. In a toss up between fancy desktop effects and decent SDLMame performance, SDLMame wins hands down. It’s nice to know the visual effects work though!