Desktops, etc.

Man, it’s been awhile since I blogged. I meant to keep putting up a monthly Xfce desktop, share some tips, talk about the latest Gentoo work, etc. And then real life got in the way.

Laptop

I killed yet another piece of hardware when updating my Thinkpad R61i on Friday. I’ve been sick this whole week, so I had some free time. The laptop hadn’t been updated since early February, so there were 176 packages, including the big move to GCC 4.3, which necessitated a system rebuild. Unfortunately, I left the battery in while the system was on AC power for the compiling work. I guess the heat must have built up too much, because the battery got fried. Got the dreaded “battery light flashes amber rapidly” error. So now I only have the extended-life battery, which is heavier and bulkier.

Add that to the list of hardware that compiling Gentoo has killed over the years. The list includes another battery, an external power brick, an internal PSU, two motherboards, two RAM sticks, one RAM slot, two hard drives, and a fan. I’m really on a roll, here.

I still can’t find a replacement battery for less than $90, even on eBay, so I may hold off. What I did do was order two more gigs of RAM, to bring the total up to 4GB. Only cost $40 at Amazon, free shipping. Why the RAM? While updating, I ran into the dreaded OOM-killer! The GCC 4.3 compile uses more than the 2GB available and it aborted the merge. This was with nothing else running, too. So be warned: if GCC dies when you move to 4.3, back off on your MAKEOPTS. I had to adjust mine from -j3 to -j2 while compiling GCC and glibc.

Also, while I was updating my whole system, I decided to move the rest of my X/kernel stack to ~arch, as I wanted the new Intel KMS/GEM/UXA hotness. This necessitated using ~arch xf86-video-intel and Mesa, as well as ~arch gentoo-sources, as 2.6.29 has some needed code not present in 2.6.28. I discovered that while this part of the graphical stack was just fine for KMS and fast graphical login, xorg-server-1.5.3 resulted in hard lockups as soon as I opened any windows. I had to grab xorg-server-1.6, libXfont, and randrproto from the X11 overlay in order to get a usable environment. It works great! No more lockups.

So, how much of an improvement is the new stack over what was available in February? I’ll let the following numbers speak for themselves. These are the median-high numbers recorded. For the old stack, the numbers varied from 48FPS to 59FPS. For the new stack, from 489FPS to 504FPS. Sync to vblank and vsync have never been enabled.

xorg-server-1.5.3-r1, libdrm-2.4.4, xf86-video-intel-2.6.1, mesa-7.3, gentoo-sources-2.6.27-r8

$ glxgears 
Failed to initialize GEM.  Falling back to classic.
292 frames in 5.0 seconds = 58.272 FPS

xorg-server-1.6, libdrm-2.4.6, xf86-video-intel-2.6.3-r1, mesa-7.4, gentoo-sources-2.6.29-r1

$ glxgears 
2516 frames in 5.0 seconds = 503.174 FPS

Now, the usual caveat about glxgears not being a good benchmarking tool applies here. However, it is useful for relative comparison from one version to the next. And as you can see, it’s an order of magnitude better. I notice that stuff is drawn much smoother; there’s less flickering especially when shifting Terminal windows around. And I haven’t hardly begun to tweak my system for best UXA performance. KMS is nice and smooth; it happens pretty quick in the boot process. No more flickering, just fast loading of SLiM and then Xfce.

My xorg.conf is pretty minimal; the only changes I’ve specified for the Intel driver section are these:

Option	    "FramebufferCompression" "false"
Option	    "AccelMethod" "UXA"
Option      "Tiling" "false"
Option      "EnablePageFlip" "true"

There are probably some other things I should add for maximum performance, so I’ll have to spend several more days hunting for ‘em. But out-of-the-box, I’m extremely impressed with the current X stack.

Now all I need is smooth full-screen Flash video performance . . .

Xfce 4.6

The other thing I put on the laptop was Xfce 4.6.1. Decided that as long as my core graphics stack is part ~arch, it wouldn’t hurt to try out the latest and greatest Xfce hotness. Now that some outstanding bugs were fixed from 4.6.0 (including a remote security bug, and an icons issue), I thought it’d be worth it. It’s pretty slick. The desktop environment is initialized a bit faster than even a fully tweaked 4.4.3.

About the only outstanding issue I have with it is that there is no graphical menu editor. At first, I couldn’t get a satisfactory menu even editing the XML file by hand; it was just too different from the old one. So my menu was cluttered with useless toplevel entries, such as Web Browser, File Manager, and so on. Fortunately, Mike pointed me to the solution, so now all offending stuff has been cleared out. Right now my menu works just fine, so I only really need a graphical menu editor for convenience’s sake.

I really like 4.6 a lot. The artwork packaged with it is outstanding; I’m using one of the stock backgrounds because it’s just that sexy.

Xfce 4.6 is a smash hit, so well done, guys. Very well done. And there’s even more good stuff planned for the future. There’s a great interview on Planet Xfce with one of the core developers. He discusses some of the exciting stuff coming down the pipe for Thunar, so make sure to read it.

Gentoo

I’ve been rather quiet on the Gentoo front for the last three months, because life in the outside world has a way of unexpectedly intruding on me. I’ve been on devaway since February while I try to get stuff into some semblance of order. Sadly, however, I’ve had to do much more documentation work than I originally scheduled, which keeps cutting into my plans for other areas. I’ve made a bunch of bugfixes and commits over the last couple of weeks especially. One of the most visible changes is in the Get Gentoo page, putting the automated weekly builds at the top. The handbooks will be updated, too, but they require a tremendous overhaul, so I’ll need all the resources of my fellow GDP members to accomplish that. If I can get ‘em, that is.

One of the other things I like to do is find some interesting little-known application, determine its usefulness, then hack up an ebuild for it. It’s really good practice, actually.

Out of all the applications I’ve written and updated ebuilds for, the only one that’s got me stumped is WordGrinder. I’ve been in contact with WordGrinder’s upstream author, who’s a really helpful guy, but I still can’t get the ebuild working. While compiling and installing by hand works great, something happens during the compile phase as run by Portage where it violates the sandbox, killing the merge.

Plus, given the pmfile used by the package, it doesn’t really respect a user’s CFLAGS/CHOST and related configuration. That has to be altered somehow, so I’ve been trying to work out a similar solution to the one used by our dev-lang/lua ebuilds. No real luck there, but it’s not my first priority. What I really want to do is have the merge workin’ with Portage. So it’s an interesting, informative, occasionally frustrating learning process.

Anyway, take a look at all the stuff in there. I recently reorganized the ebuilds by category/package, instead of dumping everything into a single directory. Some of these have since moved into Portage sometime after I wrote the ebuild for ‘em, and some (like Songbird and WordGrinder) are works in progress. I’ve run into quite a few nifty apps; places like GnomeFiles are excellent resources. Most of the stuff in here I discovered on GnomeFiles, and a lot of the packages on the website are simple enough that it’s just a few minutes’ work to hack up an ebuild.

10 thoughts on “Desktops, etc.

  1. The very best thing about xfce4.6 is in my opinion the option to use the desktop as in Windowmaker, where you minimize applications to. Fortunately this moves the application part of the menu back to the root level, because you do not need create shortcut and stuff on the desktop.

    This new feature is really worth to try, I love it :)

  2. Actually, the GCC compile used to be -j1 (for profiledbootstrap) but this was dropped by revision 1.371 of the toolchain eclass in Dec 2008, so this has nothing to do with 4.3 (though that may be more memory hungry by itself than 4.2 though, haven’t checked).

  3. glxgears is not really useful for relative comparison. It basically measures how much basic throughput you have – performance of glXSwapBuffers() – how fast render buffers can be pushed to the card. Not very useful in general, as in many real use cases the percentage of that time is small.
    Though 500 vs 58 fps does matter there, but are you sure you didn’t have proper vsync to blank before, so that it didn’t do work you wouldn’t see anyway (as a typical LCD is ~60fps)?
    http://dri.freedesktop.org/wiki/Benchmarks has proper benchmarking ways. Something seems wrong with the wiki at this moment, but google cache has it.

    Once you have something like the OpenArena benchmark set up (game installed, the test file and config set up) it is quite fast and easy to get a proper benchmarking result, so why not use it?

    Half of the options you tell to pass to xorg.conf are generally known to make things slower. Maybe you are workarounding some driver bugs? E.g, tiling is a good thing in general, framebuffer compression typically too iirc.

    Flash has the problem of not using Xv in general. Compare with saving the .flv and playing that back fullscreen with a conventional player (mplayer, totem, whatever with ffmpeg available). flv media can be saved with swfdec-gnome for example.

    If XFCE uses standard ways to manage the user menus, maybe alacarte can handle the graphical menu editing too?

  4. Hmmm… I’ve been with the same problem with my intel graphics card; whit the new kernel (2.6.29-gentoo-r1) and graphics now are better, but if you find a way to speed up more graphics or optimize them and you tell us the way, we will aprecciate it. Oops! excuse me for my bad english…

  5. @Jan:

    Indeed, the GCC 4.3 compile does take more resources. I checked bugzilla, and it turns out this is a known issue for both 4.2 and 4.2; lots of people have been hitting the “unable to make bootstrap-lean” error due to running out of RAM. The fix as suggested by vapier is to relax or even temporarily disable MAKEOPTS.

    @Leio:

    Yup, I’ve never specified sync to vblank on this machine. What you see is the real change from the old stack to the new one. In this case, glxgears, while limited, really does reflect the enormous improvement in the code.

    And yes, I am working around some driver bugs present in my xorg.conf options. Most notably, one has to disable tiling in order to fix a kernel bug. (http://git.kernel.org/?p=linux/kernel/git/anholt/drm-intel.git;a=commit;h=f544847fbaf099278343f875987a983f2b913134)

    Regarding Flash, unfortunately both swfdec and gnash have terrible performance in-browser, even slower than Adobe Flash. Plus they don’t work on all of my regular sites. And I need my daily crosswords. ;)

    Xfce’s libxfce4menu is being rewritten to be fd.o-compliant, so eventually it will be possible to use Alacarte or similar to edit it. However, that’s not yet finalized. (http://gezeiten.org/post/2009/02/Thoughts-on-libxfce4menu-for-Xfce-48)

  6. Wow, nice read. Being able to update to the latest package via the main repo or layman is lovely; which is one of many good things about Gentoo. I do hope that you do post monthly XFCE screenshots, because XFCE is just so beautiful and lightweight.

    Regarding your remark about playing flash videos in full screen… I run into some of the same problems that involve performance issues with any flash videos and my cpu likes to spike dramatically from playing them. Personally it seems to be a problem with the actual in browser program, but then again it is also a problem under, dare I say it, Windows.

  7. What I meant with vsync to blank was that it actually defaults to doing that in some situations, without you saying so.
    So are you sure it wasn’t simply enabling vsync to blank _by default_?

    As for swfdec, I meant it for just capturing the .flv for the purpose of trying to play it fullscreen in a media player like mplayer or totem for comparison. If you have other means of extracting the flv, then don’t need swfdec for that part. youtube-dl, etc.

  8. @Mart:

    I’m pretty sure it wasn’t doing that by default; I checked my old logs, and nothing in there indicates it did. Also, 58-59FPS was the best case framerate (most of the time it was running in the high 40s to low 50s), and my monitor is supposed to be running >=60Hz. I don’t think that the sync would let it run at anything less than the monitor’s refresh rate.

    I’ll look into those Flash solutions; I also browse sites like Hulu and Yahoo games for my crossword fix. I did some checking around, and it seems I’m not the only one to experience slow Flash playback even with the new X/kernel stack. Still, I’m pretty hopeful. Given all the progress that’s been made in the last two months for the Intel driver, I think the future looks pretty bright!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>