Kasperian Moving Parts

kinda like Batman, but with a wife and 3 kids

Thursday October 30, 2008
by Jason 'vanRijn' Kasper
9 Comments

KDE/Qt California People Sightings!!

I’m out in California this week (belated warning) again, WOOT! I got to spend another awesome weekend at the Google Summer of Code Mentor Summit. This year, Leo and I were the official KDE representatives, but Thiago, Simon, Ariya, and Olivier got to join in on the fun too. And then today and tomorrow are the Qt DevDays, where I finally got to meet blauzahl, greeneg, and hays, as well as catch up again with the Qt dudes and njaard. It’s a really, hectic, crazy week, trying to cram everything into it, and I’m tired as hell, but it’s been an awesome week thus far. Hopefully my body will hold off on the usual travelling sickness until I get home. =:/ Here’s some pics from the last few days…

KDE Gang at Qt DevDays

Me (vanRijn), blauzahl, hays, and greeneg.

KDE and Qt Gang at DevDays

Thiago, Olivier, Frans, Simon, Ariya, Alex (blauzahl), Harri Porten, Andreas Pakulat, greeneg, me (vanRijn), hays, and Charles (njaard).

Me and Leo

Me and Leo! Unfortunately, I was an idiot and this was the only shot I got of we two KDE GSOC mentors.

KDE and Qt Developers Meet Android

KDE threesome (Thiago, Jason, and Leo), plus the Qt foursome (Thiago, Ariya, Simon, and Olivier), meet the Android!! Oooooh, Aaaaaah! We’re not sure what the dog’s name is. =:/

Wednesday October 22, 2008
by Jason 'vanRijn' Kasper
14 Comments

Bringin’ Sexy (urxvt) Back

Let me tell you a (short) tale, my children. In the dark but awesome olden days, before KDE and GNOME were but glimmers in the eyes of their current communities, there existed a bunch of scrappy hackers who would take the best X applications out there and hack them into submission to their will. Why, I don’t have time to tell you of the years where olvwm reigned supreme, nor of the dark days when wm2 brazenly rotated window titles 90 degrees and put window titlebars on the side *gasp!* of the windows, nor of the exciting times when AfterStep was KING, nor the outright courage shown by rasterman who started hacking fvwm2 to do his bidding in exciting and gothic ways. No, sadly, I do not have time to even speak of the days when brave young nyztihke (hi Brad!) started creating his own Blackbox window manager, nor of the intrepid WindowMaker clan (WINGs, anyone?). But back in these ancient days of yore, the killer application wasn’t Thunderbird, Firefox, Evolution, nor even xdaliclock. No, my children. The killer application of these dark times was… *pregnant pause* the terminal emulator. (and, incidentally, mutt still kicks butt, but I digress…)

That’s right. For back in these dark days, even mentioning that you used a mouse could get you in a whole mess o’ trouble. And so this theming thing that you kids *Fluffy Bunny plasma theme? harumph!* take so much for granted now was focused mainly on customizing your X terminal emulator. And I’m not even talking about bash or zsh prompts. I’m talking about cramming your ~/.Xdefaults full of xrdb lines to tweak the snot out of your terminal emulator so that it was the coolest kid on the block. For the simpletons, there was the stodgy old xterm. But soon, along came rxvt, aterm, and the brazen Eterm. We didn’t have these fancy tabbed terminal emulators that you kids have now. We had 300 terminal windows stacked carefully and neatly on our 640×480 screens, and we LIKED it! *harumph again*

And so it is with feelings of nostalgia and inner-geekly warmth that I have started using rxvt (urxvt now) again as of late (try as I might, I can’t find aterm or Eterm OpenSUSE 11 rpms??). For reasons I will not go into here, having mostly to do with the nVidia card I have on my laptop I’m told, I’ve been using urxvt for the last week with really good results. It has been a week, almost exactly (`grep Time: /var/log/Xorg.0.log`), since I’ve restarted X, and I’m not seeing any slowdowns or desktop-switching-slowness. I really like Eterm–especially the font pseudo-shadowing–but I can’t seem to get it to do transparency in KDE4. urxvt, however, actually does ARGB visual transparent backgrounds!! `man 7 urxvt` tells the whole tale, but here is my ~/.Xdefaults that I’m quite happy with:

urxvt.background: rgba:0000/0000/0000/ccdd
urxvt.foreground: white
!urxvt.font: -artwiz-fkp-medium-r-normal–16-160-75-75-m-80-iso8859-1
!urxvt.boldfont: -artwiz-fkp-medium-r-normal–16-160-75-75-m-80-iso8859-1
urxvt.font: xft:Terminus:pixelsize=14
urxvt.scrollBar_right: 1
urxvt.scrollBar_floating: 1
urxvt.saveLines: 10000
urxvt.internalBorder: 5
urxvt.depth: 32
urxvt.scrollTtyOutput: 0
urxvt.scrollTtyKeypress: 1
urxvt.color12: rgba:6666/6666/ffff/ffff

Anyway, I’m quite happy with how urxvt is looking and acting with this setup in my KDE4 trunk desktop. And besides, there’s something about stacking 10 rxvt windows vertically and being able to see the last few lines of output from each simultaneously. =;) Oh, and here’s a screenshot showing an urxvt terminal with true ARGB transparent background:

screenshot-urxvt-sexiness

Sunday October 12, 2008
by Jason 'vanRijn' Kasper
22 Comments

Replace Laptop Video Card? Replace Laptop? Give Up Hope?

I just read Alexander Dymo (adymo)’s blog post “KDE4 performance on NVidia 8600GT: problem solved by bying ATI” and am quite sad because I’m pretty sure that it’s impossible to rip out the nVidia Quadro NVS 140M that’s crammed into the motherboard on my laptop and replace it with an ATI (or Intel?) chip. I know I blogged recently about how zippy KDE 4.2/trunk was after the latest nVidia driver update, but it only takes running for about a day solid until the performance on this laptop becomes unbearable again. And I’m not even using Firefox–thinking that Opera would fare better being Qt4 and all. Also making me sad is the fact that all 5 of the things Alexander mentioned as problems have plagued me for the last year and that they’re all still there. I didn’t realize that the system tray icon corruption problem only happened on nVidia cards. I thought it was a KDE4 bug. =:(

Nuts.

If I was made of money, I’d be sorely tempted now to go looking for a personal laptop to replace this frustrating hunk of Thinkpad with. New macbooks come out on Tuesday, no?

Wednesday October 8, 2008
by Jason 'vanRijn' Kasper
8 Comments

nVidia 177.80 Released!

vooba!

Holy crap. KDE 4.2 frickin’ flies! And contrary to my previous post, now if I set IPP=2, everything’s blazing fast and I’m actually able to resize konsole again! WooooooT!!!  YAY progress!!!

[[ UPDATE ]] : Added link to my previous post. I had already posted my xorg.conf settings and since then, the only thing I’ve changed was IPP=2 from IPP=1. HTH!

Friday October 3, 2008
by Jason 'vanRijn' Kasper
12 Comments

KDE 4.2 (trunk) Now Rocking On My Thinkpad T61!!!

My work laptop and main computing device is a Thinkpad T61 with an nVidia Corporation Quadro NVS 140M (rev a1) card. It’s been a frustrating last year in trying to run a KDE4 desktop as my main work and development environment because of the problems with the proprietary nVidia drivers that show up in KDE4. However, this little post is definitely more of a Huzzah!!! than a disgruntled grousing session. Lord knows we’ve had plenty of those. =:)

Thanks to the folks at nVidia who are diligently working on improving the problems in their drivers!!

Anyway, I’ve followed everything I could find on Lemma’s techbase pages and in the nVidia forums, but nothing has worked. Until now!

I’m running the latest beta from nVidia (177.78). I also discovered that for me, contrary to what everyone else seems to be saying, if I use InitialPixmapPlacement=2, performance is MUCH worse than if I use InitialPixmapPlacement=1. Using the benchmarking tools from the techbase page, I found that on the Penrose Tiling test, using Opera, the Canvas test would take up to 30 seconds for me if I did “nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1” before running it. However, if I did “nvidia-settings -a InitialPixmapPlacement=1 -a GlyphCache=1” instead, then the Canvas test only took around 2.5 seconds. WOW! So I added “nvidia-settings -a InitialPixmapPlacement=1 -a GlyphCache=1” to my X startup script and was very pleased to discover that KDE 4.2 now is VERY usable on my little laptop!!! Again, HUZZAH!!!

For completeness, then, here is the Screen section  from my xorg.conf:

Section “Screen”
Identifier “Screen0”
Device “Device0”
Monitor “Monitor0”
DefaultDepth 24
Option “RenderAccel” “True”
#Option “RandRRotation” “True”
Option “UseEdidFreqs” “False”
#Option “UseInt10Module” “True”
Option “TwinView” “1”
#Option “TwinViewOrientation” “Clone”
Option “TwinViewXineramaInfoOrder” “DFP-0”
#Option “UseCompositeWrapper” “True”
Option “AddARGBGLXVisuals” “True”
Option “DisableGLXRootClipping” “True”
Option “DamageEvents” “True”
Option “TripleBuffer” “True”
Option “UseEvents” “True”
#Option “DynamicTwinView” “True”
Option “FlatPanelProperties” “DFP: Scaling = Centered; CRT: Scaling = Centered, Dithering = Enabled”
Option “OnDemandVBlankInterrupts” “True”
Option “PixmapCacheSize” “2000000”
Option “AllowSHMPixmaps” “False”
Option “BackingStore” “True”
#Option “NvAGP” “3”
#Option “ConnectedMonitor” “DFP”
Option “metamodes” “CRT: 1680×1050 +0+0, DFP: 1680×1050 +0+0”

SubSection “Display”
Depth 24
EndSubSection
EndSection

To be honest, I am not 100% sure which of the recently-changed variables in my setup have resulted in this improving so drastically–whether the new nVidia driver beta (177.78), the xorg.conf changes, or the InitialPixmapPlacement=1 change–but the end result is that I’m now able to use KDE 4.2 (trunk) quite happily and I’m thoroughly stoked about it.

Hope this helps some other poor soul out there. Oh–also, does it sound far-fetched that IPP=1 would work better for me than IPP=2??

Friday October 3, 2008
by Jason 'vanRijn' Kasper
17 Comments

Multi-Monitor Setup On A Single Physical Head (Now Better!)

That’s a big title, eh? I blogged previously about setting up a multi-head X environment for development and testing, even though I’m working on a laptop with only one card. My previous attempt used Xdmx and multiple Xephyr displays, and there were some problems with it. Thankfully, Lubos commented about his nifty little fakexinerama library that achieves the same result only MUCH easier (easierly?) and without any of the problems that I’d seen using Xdmx/Xephyr(1..n). Here, then, is a description of what I’ve done and the results….

This is a screenshot from within the Xephyr session, showing the 1600×1200 Xephyr display. The cool thing is that using ksnapshot from within the Xephyr session will actually capture the entire display, not just what fits on your host display. This is important for me because my laptop LCD display is only 1680×1050, so I can’t actually fit the entire Xephyr display inside my real physical display. Nice to know, definitely, since this means that I can create a monstrous Xephyr display that doesn’t fit inside my actual host display and still get full-display snapshots out of it. So what you see here is a KDE3 session spanning all 4 Xinerama heads. Kicker correctly only spans head 1. VMware Workstation is on head 2, in full-screen mode, but only full-screened on the second head. It can span more than 1 head as I’ll show further down.

screenshot-ws-fullscreen-enabled

To achieve this, I downloaded seli’s fakexinerama library, compiled it in ~/build/ like this:

gcc -O2 -Wall Xinerama.c -fPIC -o libXinerama.so.1.0 -shared
ln -s libXinerama.so.1.0 libXinerama.so.1
ln -s libXinerama.so.1 libXinerama.so

I then copied the real /usr/lib/libXinerama.so.1.0.0 to /usr/lib/libXinerama.so.1.0.0.real (make sure you backup your library!) and set up an alias in my ~/.profile so that I can easily switch on and off this fake xinerama library. When I start up my real host session, I don’t want to be using fakexinerama, but when I launch my Xephyr session for multimon development, I do need it to be there.

xin () {
if [ “$1” = “real” ]
then
sudo cp /usr/lib/libXinerama.so.1.0.0.real /usr/lib/libXinerama.so.1.0.0
elif [ “$1” = “fake” ]
then
sudo cp ~/builds/libXinerama.so.1.0 /usr/lib/libXinerama.so.1.0.0
else
echo “real or fake?”
fi
}

Here’s the contents of my ~/.fakexinerama config file:

#Configuration file ~/.fakexinerama
#
# The format of the file is rather strict. Lines beginning with # are comments. First line is one
# number, specifying number of screens. This line must be followed by this number of lines, each
# containing four numbers: X Y W H, i.e. screen’s X and Y origin, width and height.
4
0 0 800 600
800 0 800 600
0 600 800 600
800 600 800 600

This establishes a 2×2 4-head xinerama configuration. Next up is creating the Xephyr display. From within your regular host session:

Xephyr :2.0 -ac -br +xinerama -screen 1600×1200 &
xterm -display :2&

You should now have a single Xephyr screen that’s 1600×1200 pixels with an xterm running inside of it. Now switch focus to the new xterm window and turn on the fakexinerama library and start up a KDE3 session:

xin fake
startkde
# (and when you’re done with this little environment, make sure you return your system to sanity by running “xin real”)

That’s about it. Really cool stuff. One last little screenshot… This one shows VMware Workstation spanning multiple heads. This obviously works with real external monitors as well. The way it works is by clicking the little monitor button to the right of the “View” menu. This tells Workstation to cycle through the available display topologies. So, on first press, Workstation spread across all 4 heads (fullscreen multimonitor, largest topology). Second press took on this configuration that I screengrabbed (vertical span). Third press spread Workstation horizontally across the first 2 heads. And then 4th press returned Workstation to just fullscreen on head 2 (where I started it from).

screenshot-ws-fullscreen-enabled-multimonvert

One last thought on the subject… One of the things I’m hopefully going to be able to work on in the next couple of months is implementing the new EWMH _NET_WM_FULLSCREEN_MONITORS hint in various X window managers. Currently, Workstation does some internal gyrations to convince window managers to allow our undecorated fullscreen window to maximize over multiple monitors/heads. _NET_WM_FULLSCREEN_MONITORS was the hint that was recently added to the EWMH spec to correctly accomplish this, but as far as I know, it hasn’t been added to any window managers yet. I’m excited about getting the chance to get up to speed on some window manager internals again! It’s been a while since I’ve last had the chance to do that (bbkeys/blackbox days of yore!).

Anyway, hope this helps someone else set up a multi-head dev/test environment, should the need arise. =:)

Thursday September 25, 2008
by Jason 'vanRijn' Kasper
6 Comments

A Poor Man’s Multi-Monitor Setup On A Single Physical Head

screenshot-xdmx-xephyr-multihead

Finally!! I’ve been trying to figure out how to do this for a while now. Namely, I need to be able to test multiple display stuff out in Linux and being that I use my laptop pretty much exclusively for development, and I don’t have mulitple physical monitors handy at home (and certainly not whilst travelling), I’ve been thus far unable to test anything multi-head-ish. But, thanks to Xdmx and Xephyr, this is now possible.

Xephyr :3.0 -ac -br +xinerama -screen 600×400 &
Xephyr :4.0 -ac -br +xinerama -screen 600×400 &
Xdmx :5 -display localhost:3 -display localhost:4 +xinerama
export DISPLAY=:5
openbox&
xterm&

So, the first 2 lines start up X-within-X displays on localhost:3 and localhost:4. The third line starts up the distributed multi-head X server, Xdmx, and tells it to use 2 displays (the two Xephyr displays started in lines 1 and 2) as the back ends. The fourth line exports a new DISPLAY variable (:5 — the Xdmx uber-display) that openbox and xterm both use. The screenshot shows my 1200×400 Xinerama 2-head X session, with the xterm dragged half-way between the two heads.

There are still some things that I need to figure out with this. Moving the mouse between the virtual heads is a little wonky (read: doesn’t work?). But at least, this is a promising beginning of what feels like a really cool answer to this problem. Anyone else have any insight to add to this? Any thoughts on how to get the mouse to behave sanely between virtual heads (which are actually X windows on my host)?

Friday September 19, 2008
by Jason 'vanRijn' Kasper
4 Comments

The N810, Lack of PIM apps, and Palm OS VM

So, about the biggest complaint that I have with the N810 thus far is that it doesn’t have good, syncable-with-my-Linux/KDE-desktop PIM apps. At least, none that I’ve seen yet. And yes, it would be super neato if I could run KDE PIM apps (korganizer, kaddressbook, etc.) on the N810, but that still doesn’t address the syncable-with-my-Linux/KDE-desktop problem. I have discovered, though, that the Access people (those who bought the Palm OS or something) are providing a Garnet (Palm OS) VM for the Maemo platform!!! You can find out more about it here and download it/install it on your N810 pretty easily.

What this means is that you can run all of your Palm applications on your N810! I’ve not tested this extensively yet, and I intend to try installing some of the Palm apps that I have on my real Palm devices on the Garnet VM on my N810 and see how it fares this weekend. But the coolness of this is that via the Garnet VM, you can have PIM applications (albeit not as sexy as what will hopefully eventually be available for the Mameo platform natively), but most definitely syncable with your Linux desktop through KPilot!!

Be on the lookout for a post from Bertjan explaining more about this. =:)

Friday September 19, 2008
by Jason 'vanRijn' Kasper
4 Comments

Nokia N810 and Videos

Dear LazyWeb,

I have ripped/encoded a bunch of (my own) movies previously in order to watch them on my PSP. The command I’ve been using is a variation of this:

mencoder -sws 9 -af volume=10.1:0 \
-vf pullup,softskip,scale=320:240,harddup,unsharp=l3x3:0.7 \
-ofps 30000/1001 \
-oac faac -faacopts br=128:mpeg=4:object=2:raw -channels 2 -srate 48000 \
-ovc lavc -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:acodec=libfaac\
:abitrate=128:vbitrate=500 \
-of lavf -lavfopts format=psp \
-aid 128 dvd://1 -chapter 01-04 \
-o $HOME/Movies/Seinfeld/Seinfeld-Season5-11-TheConversion.mp4

… which plays fine on my PSP. Unfortunately, these mp4 movies do not play on my shiney new Nokia N810. I’ve tried using Canola, as well as the built-in media player application, and they both don’t recognize the data as something they can play. I tried installing MPlayer on the N810 and, while I seem to remember it thinking it could play it, I also seem to remember it skipping, stuttering, and falling all over itself in trying to actually make it viewable. I also tried installing VLC, but when I try to launch it, no UI comes up?

Anyway, if someone could point me to either a way to view these movies on my N810 or to the best mencoder command to watch the best resolution/quality movies on my N810, I’d greatly appreciate it. =:)

[UPDATE]  Actually, it looks like MPlayer on the N810 does a really nice job! I think the problem that I was having previously was that i was trying to do something else (why does copying/pasting from a UPnP share use so much CPU??) at the same time that MPlayer was trying to play a video. But I just pulled over an mp4 of Office Space and MPlayer played it beautifully–without any hiccups or stutters. Here’s to hoping I don’t have to re-rip everything I’ve already done for my PSP!

Thursday September 18, 2008
by Jason 'vanRijn' Kasper
14 Comments

Nokia N810 and an 8 GB Micro/Mini SDHC Card

After reading about a whole lot of problems people have been having with SanDisk micro->mini SDHC card adapters on the N810, I bought this awesome little Kingston 8GB Micro SDHC Mobility Multi Kit Model MBLY/8GB over the weekend for only $30(!!) and just got it in the mail today. After figuring out how to actually put the thing in (label-side up like normal–it’s just a bit of a weird fit), I was pleasantly surprised to find that the N810 promptly displayed a “Memory card available” message and that I could use the card just fine. The 8GB card came pre-formatted as vfat (FAT32) and only reported as having 7.4GB available, which is, I guess, normal (albeit annoying). I reformatted the card on my laptop to ext3 and it came out at 6.8G available. Forget that! Reformatted it as ext2 and it came back up to 7.0GB available (really, guys?? how can you lose a whole GB from what’s described on the package???). I’ll leave it as ext2 for a while and see if there’s any advantages/disadvantages. I was thinking that ext2 would be better for installing KDE packages, etc., but I’m honestly not sure. And I may end up reformatting as vfat/FAT32 just to get my 400 MB back. =:(

Anyway, I’m pleased to announce that this is a really good combination that worked out of the box for me. I’ve seen none of the problems I was so worried about. And, this little kit comes with a micro SDHC card (duh), mini SD adapter (needed for the N810), full SD adapter, and even a USB adapter. Pretty sweet!! HTH!