Saturday, August 18, 2012

Desktop Reinstallation Struggle

For many years, I struggled to stay with KDE 3.5 in my primary desktop computer, as I found it much more stable than the KDE 4, which had serious issues every time I tried it. Kubuntu 8 was the last system version to come with KDE 3.5, so I was stuck with it. After a hard drive failure some two years ago, I finally installed a newer Kubuntu, and also went for 64-bit to get a bit more memory. My life has been struggle since then.

Issues, issues

Often after some upgrades, the machine has worked well for a day or two, and then become sluggish as hell, with random jams that can last from 5 to 30 seconds. Some applications cause especially much problems. One is Thunderbird, for some odd reason. Another is Digikam, for which the reason is that it doesn't really scale up very well and hogs memory (2.5 GB currently).

Also, successive system upgrades from Kubuntu 9 to 12 had also broken something. One of the most problematic background processes was "semantic Nepomuk Desktop". Do not even ask me what that is, but it is currently an integrated part of KDE. It can be disabled, but doing so causes a lot of annoying alerts that it should not be disabled, even though those alerts are only relevant if you use KMail, which I don't.

I've been struggling to identify the underlying problem. I've suspected an interrupt in DMAs, interrupts, or some other resources. However, the most probable cause is the Nvidia GeForce 8800 GT, which was the source of most problems with this installation as well.

I wholeheartedly agree with Linus's opinion about Nvidia. While they do offer a proprietary driver for Linux, it is riddled with problems and they refuse to give out specs for making a possibly better driver.


Linus delicately expressing his opinion about Nvidia

For the most time in these two years of struggle, the system has worked reasonably well for a few days, before the memory has fragmented, etc. So, after the two years, I finally bought another 4 GB of memory this week, hoping that it would make the problems easier. It didn't at all. So, I finally decided to reinstall everything, even as annoying that is.

Installing the Pangolin

Running the installation for Kubuntu 12.04 LTS (nicknamed Precise Pangolin) was really easy and simple. I have it on two other machines as well, my work computer and my netbook. The only slightly worrying step was not formatting the drive. I took full backups to an external drive (took almost a day), then started the Live Kubuntu, mounted the drive from console, and moved everything under root to an "old" directory. Then, did not allow the installation to partition and format the drive, but assigned the root mount point for the partition. Well, I've done that probably dozens of times, but you can never be too careful with that.

Nvidia Problems

However, after the installation, the computer didn't work at all. Simply clicking anything with the mouse didn't work. The reason was apparently that compositing was not enabled. The quick (and unobvious) fix to be able to use the system at all was to disable the 3D effects mode with Alt+Shift+F12. Also, all fonts were so tiny that I couldn't read them. The reason was probably with my monitor (a 42" TV actually), which detects the signal so slow that the system can't detect it, and then calculates the DPI resolution with some insane defaults.

So, to edit xorg.conf. Actually, it wasn't really initialized at all, but running nvidia-xconfig in console reinitialized it with a bit more sane values. Then, make the following monitor settings to get the DPI resolution sane:

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Philips FTV"
    HorizSync       15.0 - 70.0
    VertRefresh     48.0 - 62.0
    Option         "DPMS"
    Option         "UseEdidDpi" "False"
    Option         "DPI" "120 x 120"
EndSection

Those aren't really the correct DPI values for the TV, which would be about 47 DPI, but something that makes it readable from 1,5 meters.

Then, the compositing:

Section "Extensions"
    Option         "Composite" "Enable"
EndSection

The biggest issue was the nvidia 290.40 display driver, which was essentially broken, so that the user interface became unbearably slow. Simply switching between windows would take some 15 seconds. The driver had broken at about version 290.33 or so, and while many versions had made some fixes for some cards, they didn't work for me. After struggling for hours, the finally working solution was to install the latest driver from an alternative repository:

sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current

This installed the 304.37 driver version from the 304.37-0ubuntu1~precise~xup1 package, which actually worked.

So, for the first time in two years, everything seems to work pretty well. For now.

The Rest of It

The rest of the installation was very boring routine. KDE has a zillion settings with which I'm not satisfied and making it bearable always takes half a day, which is the reason I don't want to make installs very often. I did my netbook install just a month earlier, so most of the difficult-to-find settings were in almost fresh memory.

The required KDE configurations change a bit from time to time, as some defaults become better and some worse. Just to mention some:

  • Disable unnecessary desktop effects and configure others
  • Change desktop theme to a prettier one
  • Configure Task (window) Switcher to a vertical layout
  • Configure virtual desktops (I always use 8)
  • Configure desktop animations, etc.
  • Configure switching desktops with Win+Tab and Win+Ctrl+Tab (this actually has couple of bugs in KDE 4 which makes the configuration difficult)
  • Configure window behavior rules (force certain windows to always start in certain desktop)
  • Disable annoying confirmations for the KDEWallet
  • Configure other global shortcuts (minimize/maximize windows, etc)
  • Configure session control - restore manually saved session
  • Disable logout confirmation
  • Disable screensaver
  • Disable screen power saving from Power Management
  • Disable network settings in KDE and set them in /etc/network/interfaces
  • Configure printer
  • Configure screen resolution if not correct
  • Delete unnecessary default folders from home folder
  • Change the location of the Desktop folder
  • Set up Firefox as default browser in KDE and with update-alternatives
  • Set up Konsole configurations for root, Irc, and normal use
  • Set up panel
    • Change the terrible new Windows-style application launcher to traditional launcher (great that it's still there as an alternative)
    • Set up application launchers
    • Set up Konsole configuration launchers
    • Set up clock
    • Set up other panel layout
    • Enable auto-hiding
  • Set up desktop background photo
  • ...and other small tuning...

So, there it is (with my System desktop).

Addendum

2012-08-20: Some occasional jams still occur, typically freezing the keyboard for half a minute in one application, such as Firefox. But it's quite different, system loads stay quite low, but one core jumps to 100% when a jam occurs.

Friday, August 3, 2012

Enjoying the Finnish Archipelago

One of my activities this summer has been exploring the Turku archipelago with my kayak. The Finnish archipelago is the largest in the world by some measures. There are 179 584 counted islands in Finland, some of them in the lakes, but most of them in the sea. The largest archipelago area, the Archipelago Sea, is around Turku, where I live, with about 50 000 islands. Most of the islands are tiny, some just ten meters wide, but yet make great places to visit. The archipelago is also really tightly packed, and you could usually throw a rock to the neighbouring islands.

Not amazingly, many people here have a boat. So did my family when I was a child. We had a rather small motorboat, and my family and other kindred would all gather at the Maisaari island. My brother has a motorboat, and many of my friends have had one, or a sailboat. I kind of like sailboats, so I may get myself one some day.

The number of islands is so high that even though thousands of people go out there every summer weekend, everyone can always get their own island to stay in, if they like. Some of the islands are just small treeless rocks, but most have some forest.

Nevertheless, most of us who live here take the archipelago for granted, and rarely even think about it. So have I for most of my life. I kind of rediscovered it last year when I got into paddling. A kayak is really very useful for exploring the archipelago, as you can get everywhere with it. Many parts of the archipelago are unreachable by motorboats or sailboats, as they are too shallow and have too many underwater rocks, but with a kayak or canoe you can get everywhere. It is a bit slow and requires some effort, but on the plus side, it keeps you in shape. Not surprisingly, kayaking and canoeing have become really popular in Finland, and especially so in the Turku area.

I started kayaking mostly last year, and after some trips with rented kayaks, I got myself one. So far, most of my trips have been just daytrips or one-night trips, and one two-night trip for a weekend. But why stay longer, as you can always go next weekend as well.

At Ominainen, the most famous haunted island in Finland. They used to bury criminals and other nasty bastards here.

A private boat is by no way the only way to explore the archipelago. There are many "water buses" that go to some islands daily, and bigger ferries to the more remote islands. Most of these ferries, especially to the most remote islands, are actually totally free of charge. The ferries go also in the winter, pushing through ice. There's also an Archipelago Route, which you can go by car or bicycle, with free ferries between the islands.

Oh, Finland also has 187 888 lakes (larger than an acre). The number of lakes by the land area is also probably the highest or among the highest in the world.