24 February 2009

Comparison of KDE4 Graphics Performance on nVidia 8600GT and ATI HD3450

Five months ago I wrote a post about inadequate graphics performance of KDE4 and Qt4 applications on nVidia cards using the proprietary nVidia driver.

I was unhappy with the nVidia 8600GT performance and bought el cheapo ATI HD3450 card and was happy with how well it worked with KDE. But after I posted my KDE4 review I got several comments from people saying that nVidia fixed their driver. So I became curious and took my old 8600GT and tried it.

In short, the performance was indeed improved. But... I felt something is still wrong. In particular, text rendering was not fast enough. Konsole suffered from this the most. The problem was also visible in Kate (see my bugreport with callgrind profile if you're curious).

I decided to isolate the problematic code and try it with different drivers and cards to see what's going on. I wrote a simple program which renders one long line (16000 chars) on the screen several times and compared the rendering time (see the code).


I ran it on my desktop with ATI and nVidia cards and also on my EeePC. I have Qt 4.5 on the desktop and was able to try the new "Raster" graphics system in Qt which basically does all the drawing bypassing X11. Rumors are the "raster" system is faster.

Here are the numbers I got (smaller is better):
DriverX11Raster
ATI Radeon HD3450
fglrx 9.1 (proprieraty)918117
radeonhd768112
nVidia GeForce 8600GT
nvidia 180.29 (proprietary)1571113
nv895114
nouveau1699111
Integrated Intel GMA 950 on Asus EeePC
intel1029N/A


Immediate conclusions from that comparison are:
  • New raster graphics system from Qt 4.5 is 10x faster then usual Qt rendering code
  • Proprietary nVidia driver is still 1.5x slower than opensource 'nv' driver or any ATI driver
  • EeePC is so cool because Qt4/KDE4 renders text on it as fast as it does on more powerful graphics cards


Looking at these tests you might conclude that opensource nv and radeonhd drivers are the best. Yes, but only at rendering text. On my home computer I also want video and I wasn't able to use XV with any of the opensource drivers. With older cards XV may work, with mine it did not. Playing video through X11 was simply too slow so at this moment I'm forced to use proprietary driver. And exactly as five months ago, I choose ATI just because it's still faster.

I'm really looking forward distributions compiling Qt itself or Qt-based programs with Raster graphics system by default. Yes, it will make Qt/KDE applications slower on remote X sessions, but I'm ready to pay that penalty for the impressive 10x speedup in regular usage. For people who often use remove X, distributions may provide replacement Qt binaries compiled with X11 graphics system or provide a system-wide configuration.



ATI fglrx driver warnings and hints: Remember that video and 3d won't work with Composite. Also, X11 may freeze on shutdown. To avoid freezes, try these solutions one by one:
  • do not use 'evdev' driver for keyboard and mouse, use 'kbd' and 'mouse' drivers instead
  • stop atieventsd daemon
  • add 'Option "Composite" "off"' to xorg.conf to turn off Composite completely

18 February 2009

KDE 4.2 on EeePC Mini Review

I was going to continue my series of KDE 4.2 reviews, but two weeks ago I've installed KDE 4.2 on my EeePC and couldn't wait any longer to share my experience with that.

I've been a happy owner of an EeePC 901 with 20G flash drive, 1G RAM and Linux preinstalled since September 2008. All I can say is that it's a best laptop I ever had. I knew EeePC will be useful for me, but I didn't know it will be THAT useful. I take it with me to the university for lectures and labs, I use it to surf the internet, work and make skype calls when I'm not at home. And yeah, I even take it with me when I go out with my friends :)

My 901 came with Xandros and heavily customized KDE3. It was certainly ok, but I wanted the real operating system and after a short research on the available options, I installed Ubuntu Eee which really was Ubuntu 8.04 customized for EeePC. The current version of this distribution is called "Easy Peasy" 1.0 and contains packages from Ubuntu 8.10 Intrepid.

Being Ubuntu, it of course came with GNOME and I was fine with that for 6 months until KDE 4.2 was released. I can certainly recommend installing Easy Peasy as everything worked out of the box - suspend to RAM, wifi, bluetooth and so on. The only thing that didn't work out of the box was my 3G Sony Ericsson MD300 modem. It was recognized as USB flash drive, so I had to install this udev rule and use this wvdial configuration to make it work as a modem.

When KDE 4.2 came out, I realized that I simply have to install the best Linux desktop (which is KDE 4.2) onto the best laptop (which is EeePC) :) I've added

deb http://ppa.launchpad.net/kubuntu-experimental/ubuntu intrepid main

to /etc/apt/sources.list and ran

apt-get update && apt-get install kubuntu-desktop


This almost worked. Almost because my EeePC has 4G drive with the system partition and it had too little space to handle the update. I had a choice either to remove OpenOffice and GIMP or just uninstall GNOME before installing KDE. I chose the later and everything ran fine. After X restart I got the shiny new KDE 4.2 desktop:


Hardware continued to work flawlessly with KDE 4.2 which was not a surprise because the underlying system was still good old Intrepid. But you may rather want to hear how KDE 4.2 worked with the hardware ;) In short, KDE 4.2 flied!

Before installation I was worried about memory consumption, so I measured it right after installation. This is what "free" command shows when running only KDE desktop and Konsole:

total used free shared buffers cached
Mem: 1001 468 533 0 12 178
-/+ buffers/cache: 276 724
Swap: 1246 0 1246

As you can see, the whole KDE desktop + Konsole application takes only 280 Megabytes RAM! I think this is outstanding result for a modern desktop released in 2009.

Even if you think 280M is too much, there's something you can do. Kubuntu has four autostarted programs written in Python - the printer applet, update notifier, bluetooth daemon and guidance (the power saver application). Those take roughly 95M in RAM. You can use the KPowerSave from KDE3, turn off update notifications and save more memory. If you do that, then the most recent Linux operating system with KDE 4.2 desktop will take exactly as much RAM as 7 year old Windows XP - roughly 180-200M.

Integrated Intel graphics doesn't cause any troubles as well. More, I turned on Desktop Effects and, surprise! They worked. You may know from my previous posts that my definition of "works" is pretty severe: I like when UI doesn't disturb me. Desktop Effects aren't as smooth as for example animations on MacOS on MacBook's, but they don't disturb either. I can work with them. More, with "intel" driver and compositing enabled, Firefox doesn't show the scrolling problem that forces me to avoid effects on my desktop computer with either ATI or NVidia cards.

In general, the performance of KDE applications is comparable to the regular computer (unless the application does CPU intensive work of course). Because the 901 model has SSD, the startup time of both operating system and individual applications is impressive. For example, I have a feeling that Dolphin starts faster on EeePC than on my desktop computer :)

In short, the KDE experience on EeePC is definitely enjoyable. Here are several little things I discovered that will make your experience even better:
  • set up your Panel to "Windows Can Cover" mode - 600px of vertical space on the screen is too small to waste it with the panel;
  • use Quartz or BII window decoration which have tiny window border sizes and narrow window title bars, they won't look as good as Oxygen, but you will not waste the precious 600px for window decorations;
  • remove KNetworkManager and install GNOME Network Manager Applet, it turned to be more stable for me (especially when using WPA encryption);
  • if you use KDM, make sure to fix the background for your 1024x600 screen resolution, get the fix here or see the whole discussion here.


I highly recommend EeePC and highly encourage you to install KDE 4.2 onto it. With the newest KDE desktop on board EeePC becomes the laptop you can impress people with. Take it with you anywhere you go and show off KDE, Plasma and Desktop Effects to people. I don't know a better way to attract more users to KDE and Linux at this time!