Upgrading Kubuntu-9.04 from PPA – KDE 4, Xorg, Wine, OpenOffice 3…

I have upgraded all my systems to KDE 4.3.1 very successfully, and it is gorgeous.  While still slower than LXDE (this will likely always be the case), it is much better than the 4.2 that shipped with Jaunty.  I have also upgraded to OpenOffice 3.1.1, the latest stable Wine, and I have updated Xorg as well – all from the PPA (Personal Packages Archive) site.  Here is how, and from where:

To use these, click on each link, then:

  1. Select your sources.list version and copy the two deb lines to your /etc/apt/sources.list file
  2. Import the key with this command – sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 12345678 (replace 12345678 with the appropriate import key listed above)
  3. Update with sudo apt-get update
  4. Upgrade with sudo apt-get dist-upgrade

Hope this helps, but YMMV.  This is only a “howto if you want”, not a “recommendation that you do”.  If things blow up, well, that’s the risk you take.  I find it encouraging, however, that across four different Kubuntu 9.04 systems, I have not had any problems from these upgrades, and found that many fixes and improvements had taken place.

Ultimately, this article is really to help me for future upgrades.  But if you get something good from here, that’s cool too.

Kubuntu 9.04 64-Bit, Kernel, and NVIDIA…

I went ahead and decided to upgrade my kernel, and to go to the latest NVIDIA driver (180.51).  I downloaded the kernel and the nvidia driver file, built the kernel, and removed the nvidia restricted driver.  This is on a 64-bit build of Kubuntu 9.04.

However, I was not done.

When I tried to install the kernel image file, I kept getting dkms errors relating to nvidia-common.  I eventually removed the nvidia packages using “apt-get remove --purge nvidia*” (as root), but this still would not allow me to install the kernel. Also my xorg.conf file was empty.

I fixed xorg by typing “dpkg-reconfigure xserver-xorg” and adding in the line “Driver "vesa" ” to the “Device” section, so I would have something when I rebooted.

Only when I removed dkms (“apt-get remove dkms“), was I able to install kernel  I use lilo since I run RAID-10, but did not have to update the /etc/lilo.conf file.  Upon reboot, I stopped X with “/etc/init.d/kdm stop“.

I next installed the NVidia driver first (and chose to install the 32-bit compatibility files as well). After that, I ran “nvidia-xconfig” and my xorg file was ready.  When testing with the “X” command, it just pulled up a blank screen, but I took a chance and started KDM (“/etc/init.d/kdm start“).

Everything came up fine.  Typing “glxgears” in a terminal showed decent enough acceleration (about 3000 fps).

So far, no other ill effects. And no firmware issues.

Dual-boot Laptop – Vista and Kubuntu 9.04…

I started last night.  First, I decided to use the 32-bit LiveCD installer.  I booted off the CD after shutting down Microsoft Windows Vista Home Premium, and soon was at the GUI (I chose the first option; to test before installing).  Once there, i opened up a konsole session, ran “sudo -i” to get root, and installed gparted – “apt get install gparted”.  After it installed (to RAM of course), I ran it to see what I could do.


I could not resize the 140 GB partition Windows called a “C drive”, because I forgot to defragment it first.  Crap.  So I booted back into Windows, Safe Mode.  I found the defrag tool under the System Accessories, but it would not run.  I tried from the command prompt as well.  I rebooted, into SAFE Mode With Console, and it still wouldn’t work.  I finally just rebooted into Vista normally – then it worked.  It gave no status other than a flickering hard drive light and a spinning cue that meant it was not finished.  Eventually, it did finish.  It claimed to have been doing it on a schedule, and the last defrag was back on the 5th of May, yet it took over two hours to complete.  Guess what?  It made all the difference in the world.  I suspect it wasn’t really defragmenting after all.

Once I rebooted into Kubuntu Live CD and reran gparted, I was able to resize it.  The first attempt failed – I cut it too close to the bare minimum space i could shrink the drive.  I decided to split it 50-50, giving about 70 GB for each side, and then it worked.  This took another hour, but I had 70 GB or free space.  I went into cfdisk and manually made a 10 GB bootable partition for root, a 3 GB for /var, a 2 GB for /tmp, a 2 GB for swap, and the rest for /home.  i then rebooted into Windows.

Windows behaved as expected, like it had been punched int the mouth, but didn’t know by whom.  It rescan itself, determined that everything was still ok, and rebooted again.  This reboot came up fine.  Satisfied I had not broken Vista, I rebooted a final time back into the Live CD.

I went ahead and formatted everything with XFS except the swap partition:

  • mkfs.xfs -f -d agcount=1 -i attr=2 -l lazy-count=1,size=128m,version=2 /dev/sda3
  • mkfs.xfs -f -d agcount=1 -i attr=2 -l lazy-count=1,size=128m,version=2 /dev/sda5
  • mkfs.xfs -f -d agcount=1 -i attr=2 -l lazy-count=1,size=128m,version=2 /dev/sda6
  • etc…

I then made the swap partition and then installed, choosing to manually select my partitions and not to format them.   I went to bed, abd when I woke up and checked in the morning, it was done.  I had been unable to get wireless to work (no proprietary drivers needed, just would not work) on the Live CD, so I had connected it up via network cable.  Once I booted into the new system, I saw that it had a GRUB entry for Windows (it works).  After logging into KDE, I was able to set up a working wireless connection with no real drama.  I also modified my /etc/fstab to mount the XFS partitions with the following options:


I edited /etc/X11/xorg.conf and added in the section to reenable the CTRL-ALT-BACKSPACE zap for X:

Section "ServerFlags"
      Option          "DontZap"               "false"

I installed the medibuntu repositories, the kubuntu-restricted package, the sun-java6 package, the non-free flash package, the libdvdcss and libdvdread packages, lots of TTF fonts, the MSTTF core fonts, skype2, firefox, thunderbird, and the packages needed for a DoD smartcard.




Thunderbird setup with AKO

Kubuntu-restricted and Sun-JRE6

Xorg no-zap

Results:  It boots and shuts down much faster than Vista.  It is a Compaq lapto, Pentium Core-Duo, 1 GB RAM, uses the ath5k driver for wireless, has an integrated Intel graphics adapter (maybe 800 fps max on glxgears), and a 160 GB SATA drive.  It has sound, a mic, speakers, a DVD writer, some USB ports, and a network jack.  Overall, not too bad for what I need it to do.  But it is a little shaky and unstable from time to time, so I have shut off the compositing effects and unloaded some troublesome widgets (RSS news widget especially seemed flaky).  But the suspend and hibernate functions work great, and the webcam i bought (Logitech) worked right off the bat with skype.  So did my smartcaard reader.  I also installed the Acrobat Reader from the Adobe website – with it, I added the coolkey security device and am able to sign fillable PDF files with my card.  DVDs also play (region-free, of course).

So, these are my ramblings on the notebook.  I dual-booted because my wife insisted I keep Vista, just in case the Linux machine she is on dumps.  But she is getting more comfortable without Vista already – I can tell.

HOWTO – Vanilla Kernel on Gutsy Gibbon…

I just got back from vacation, and am a little tired. This did not stop me from rolling kernel, however – but it did play a part in writing these directions. Refer to the previous article, HOWTO – Vanilla Kernel on Gutsy Gibbon… and use the same steps for installing. The only thing I did different was unchecking the CPU frequency scaling in “make menuconfig” (I do not need it), and I did not append anything to the version, so my kernel is just Once it was installed, I made sure to switch to the “vesa” driver before rebooting.

So far, so good – after rebooting, I logged into just a console (no X server) and uninstalled, then reinstalled the NVidia 100.14.19 driver at the command line (I tested with “X”, then switched back to the “nvidia” driver in /etc/X11/xorg.conf). I also reran the vmware setup (runme.pl) from the vmware-any-any-update114 directory. After restarting the X server and logging back in, I was able to verify video acceleration, sound, and vmware all worked fine, for myself and other users.

Ubuntu, Nvidia, and Projectors – a HowTo Article…

Sorry, not mine, but I thought it looked pretty useful. Here is the link:

Getting a projector to work under Ubuntu Linux with Nvidia drivers

The Tech Explorer site has other articles you might find helpful as well, so dig around.

Have fun!

HOWTO – NVidia and the Kernel on Gusty Gibbon…

The next step for me after getting on a customized vanilla kernel was getting my NVidia 6600 working again (as opposed to the vesa driver). I had previously either used the Envy tool (Feisty) or the Restricted Modules (Gutsy), both using the stock Ubuntu kernels at the time. Neither worked on my new kernel. As a last resort, I ran Envy and uninstalled all evidence of my prior installation attempts, downloaded the current nvidia driver (100.14.19), ran chmod +x on the .run file to make it executable, and logged off to a console only.

I next (as root) ran kdm stop to kill Xorg, and then ran the .run script.

It worked like a charm. I then edit my xorg.conf file and uncommented the “nvidia” driver line and commented the “vesa” driver line. I always test after an install or upgrade by typing “X” (no quotes) – if things are good, a blank window environment with the cursor opens (kill it with CTRL-ALT-BACKSPACE).

You can also check if the nvidia module is loaded with lsmod | grep nv.

I rebooted again, just to be sure, and everything came up great. Once in KDE, I ran glxgears and got 7600 FPS – you don’t get that unless you are running an accelerated driver. There are other ways to confirm you are using the right driver – the NVidia logo will pop up when Xorg first starts unless you have it disabled in the xorg.conf file, as I do, and you can use glxinfo instead of glxgears.

Problem solved, on to the next one – VMWare.

HOWTO – Vanilla Kernel on Gutsy Gibbon…

Well, I finally went ahead and rolled a custom kernel on Kubuntu 7.10. I was having performance issues with VMware-Server 1.0.4, and researching pointed at the tickless kernel and SLUB options used in the Ubuntu 2.6.22-14 kernel. I used Sean’s Blog extensively and tried both the easy way and then the harder way. The easy way is just rolling back to the 2.6.20 Ubuntu kernel with the proper files from the Ubuntu archives. This worked, but I wanted more.

The harder way really wasn’t that hard at all. I followed his steps and got the 2.6.22-9 Ubuntu kernel installed fine. Then I decided to try a vanilla kernel from www.kernel.org. Here is a summary of the steps I took on a different computer:

  1. Download the latest full kernel ( at the time of this writing).
  2. sudo -i
  3. apt-get install build-essential kernel-package (I did not get the linux-source package, because that is what was downloaded in step 1.)
  4. cd /usr/src
  5. mv (path/to/)linux- ./
  6. tar xvfj linux-
  7. rm -f linux (if it exists)
  8. ln -s linux- linux
  9. cd linux
  10. cp /boot/config-2.6.22-14-generic .config (this step copies the current running kernel config into place for building the new kernel)
  11. make menuconfig (you need to have ncurses packages installed for this to work) – I prefer this to make xconfig, for no good reason
  12. MUST DOGeneral setup –> change from SLUB to SLAB – Choose SLAB allocator (SLAB).
  13. MUST DOProcessor type and features –> uncheck Tickless System (Dynamic Ticks). OPTIONAL performance settings I like – select the Processor family (mine is Opteron/Athlon64/Hammer/K8), set Preemption model to Preemptable kernel (Low Latency desktop), set Timer frequency (1000 Hz).
  14. OPTIONALKernel hacking –> check Use 4Kb for kernel stacks instead of 8Kb. This is a performance setting.
  15. OPTIONAL – Device Drivers –> Sound –> Advanced Linux Sound Architecture –> PCI Devices –> set Intel HD Audio to M (module) -this was in Sean’s Blog, and I did not get sound working until I set this. YMMV.
  16. Exit and save the new .config file – I also like to save a copy of this file under a descriptive name somewhere else as a backup (cp .config /home/gutsy-, for example)
  17. make-kpkg clean – refer to man make-kpkg to see what this does
  18. make-kpkg --append-to-version=-with-slab kernel_image --initrd binary (“-with-slab” is descriptive text only, so you can change it if you like, or leave it out entirely) – this step rolls up the old “make, make modules” steps into one, so it could take a while before it is finished, depending on how much horsepower your computer has
  19. cd .. (go up one directory to where the new files are after compiling is completed)
  20. dpkg -i linux-image-*.deb linux-headers-*.deb (installs the kernel and modules)
  21. ln -s /lib/firmware/2.6.22-14-generic /lib/firmware/ (to preclude any firmware issues that might pop up)
  22. update-initramfs -u

Now, you might want to sanity check before rebooting, so have a look at /boot/grub/menu.1st. You should see two entries for the new kernel there (one is a recovery entry). The default number to boot should be the non-recovery entry. The count starts with 0, so if you have two kernels installed, you will typically have five entries (last is memtest), so the count runs from 0 to 4. Your new kernel will likely be 2 in such case.

One more useful step before rebooting – you may want to set your video driver to vesa, otherwise you might just get a console login after rebooting instead of KDE, GNOME, etc. Most likely, you will have to reinstall your video driver (NVidia and ATI users), and it’s a heck of a lot easier to troubleshoot if you have console and GUI environments. To do this, just:

  1. sudo -i
  2. vi /etc/X11/xorg.conf
  3. In Section “Device”, add in the line Driver “vesa” and comment out (#) the previous driver line.
  4. In Section “Modules”, comment out the line that says Load”glx”.
  5. Write and quit (:wq), and you are set. Remember, this will get you basic, unaccelerated graphics, so you will want to restore your old driver after rebooting to the new kernel.

If you use VMWare, you will also have to reconfigure it to use the new kernel.
Upon verifying that your new kernel is in the grub boot menu and selected as the default, reboot. As long as you have not removed the old kernel, you can always boot back into it if the new kernel fails to boot for some reason (hit ESC when prompted at bootup to select a non-default kernel entry). If all is well, you should see the *buntu boot progress logo come up and shortly be in your chosen window session. I like that this process builds in the boot logo automagically – nice touch.

Have fun with your new vanilla customized kernel!