Wednesday, May 6, 2009

Zombie X

I'm having a weird and disturbing issue, in which my display completely freezes while watching a recording in MythTV. I've also seen this happen when trying to watch a video fullscreen with mplayer. So it seems to be a video issue. Sometimes the display blanks, sometimes the image freezes, but remains on screen.

When this happens, my only recourse is to ssh in from my laptop, and issue the commands:

sudo /etc/init.d/xdm stop

sudo /etc/init.d/xdm start

Note that sudo /etc/init.d/xdm restart does not work, which is weird, since all that does (IIUC) is to stop/start the daemon!

I have also noticed the following error dump in dmesg when this occurs:

[ 6734.516861] BUG: unable to handle kernel paging request at ffffc20011105428
[ 6734.516867] IP: [] ulReadMmRegisterUlongViaAddr+0x9/0x10 [fglrx]
[ 6734.516957] PGD 12fc08067 PUD 12fc09067 PMD 12eaf5067 PTE 0
[ 6734.516962] Oops: 0000 [#4] SMP
[ 6734.516965] last sysfs file: /sys/devices/pci0000:00/0000:00:18.3/resource
[ 6734.516968] CPU 1
[ 6734.516970] Modules linked in: lirc_mceusb2 lirc_dev video1394 dv1394 raw1394 fglrx(P) ohci1394 snd_hda_intel ieee1394 r8169 snd_hwdep
[ 6734.516981] Pid: 17277, comm: X Tainted: P D 2.6.28-gentoo-r5 #6
[ 6734.516983] RIP: 0010:[] [] ulReadMmRegisterUlongViaAddr+0x9/0x10 [fglrx]
[ 6734.517046] RSP: 0018:ffff880117075c90 EFLAGS: 00010286
[ 6734.517048] RAX: 0000000000000000 RBX: ffff880099859190 RCX: 0000000000000007
[ 6734.517050] RDX: 000000000000150a RSI: 000000000000150a RDI: ffffc20011100000
[ 6734.517053] RBP: ffffc20011100000 R08: 0000000000000000 R09: ffffffffa01939a0
[ 6734.517055] R10: 00000000000fdfe0 R11: ffff88012fc08000 R12: 000000000000150a
[ 6734.517058] R13: ffff880040e3b000 R14: 000000004068646a R15: ffff880038855f00
[ 6734.517061] FS: 00007fdefc2e36f0(0000) GS:ffff88012fc03980(0000) knlGS:00000000f7de36c0
[ 6734.517063] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 6734.517066] CR2: ffffc20011105428 CR3: 0000000117076000 CR4: 00000000000006a0
[ 6734.517068] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 6734.517071] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 6734.517073] Process X (pid: 17277, threadinfo ffff880117074000, task ffff8800a5488740)
[ 6734.517076] Stack:
[ 6734.517077] ffffffffa00d036b 00000000fdff0000 0000000000000202 ffff880099859000
[ 6734.517081] ffff880099859000 00007fff0430a6e0 ffffffffa00ec124 000000004068646a
[ 6734.517086] ffff880099859000 ffff880099859190 00007fff0430a6e0 ffff880040e3b000
[ 6734.517090] Call Trace:
[ 6734.517093] [] ? ulReadMmRegisterUlong+0x6b/0x140 [fglrx]
[ 6734.517132] [] ? Cail_RS780_RestoreAdapterCfgRegisters+0x24/0x190 [fglrx]
[ 6734.517132] [] ? CAILExit+0x15f/0x190 [fglrx]
[ 6734.517132] [] ? firegl_cail_free+0x3f/0x70 [fglrx]
[ 6734.517132] [] ? hal_init_asic+0x45a/0x5e0 [fglrx]
[ 6734.517132] [] ? capable+0x17/0x36
[ 6734.517132] [] ? hal_init_asic+0x0/0x5e0 [fglrx]
[ 6734.517132] [] ? firegl_ioctl+0x1ea/0xf40 [fglrx]
[ 6734.517132] [] ? ip_firegl_ioctl+0x11/0x13 [fglrx]
[ 6734.517132] [] ? vfs_ioctl+0x5f/0x78
[ 6734.517132] [] ? do_vfs_ioctl+0x37c/0x3aa
[ 6734.517132] [] ? fsnotify_modify+0x62/0x6a
[ 6734.517132] [] ? sys_ioctl+0x55/0x77
[ 6734.517132] [] ? system_call_fastpath+0x16/0x1b
[ 6734.517132] Code: 0f 85 0e ff ff ff 44 89 f2 44 89 ee 48 89 df e8 8e 4d 02 00 85 c0 0f 84 40 ff ff ff e9 f3 fe ff ff 90 31 c0 48 85 ff 74 05 89 f2 <8b> 04 97 c3 66 66 90 48 85 ff 74 05 89 f1 89 14 8f c3 66 66 90
[ 6734.517132] RIP [] ulReadMmRegisterUlongViaAddr+0x9/0x10 [fglrx]
[ 6734.517132] RSP
[ 6734.517132] CR2: ffffc20011105428
[ 6734.517132] ---[ end trace 3dbdfa876caf57b1 ]---
[ 6734.521254] [fglrx:firegl_release] *ERROR* device busy: 1 0
[ 6734.521258] [fglrx] release failed with code -EBUSY


Whoa, scary!

I looked through the Gentoo ATI Radeon FAQ, but didn't find much there. I did find this thread on the Gentoo forums. The person there describes a very similar problem, which he solved by switching to the "zen-sources" kernel.

I figure it's worth a try. zen-sources is not part of the normal Gentoo portage tree, it's in an "overlay", which is a 3rd-party portage tree. To install it, I followed their instructions. Basically: emerge layman; layman -a zen-sources; emerge zen-sources.

Kernel config/compile/install went smoothly, and the major subsystems (network/audio/Xorg) seem to function properly. I even remembered to re-emerge ati-drivers and lirc after installing the new kernel (since those packages provide kernel modules). I'll have to wait and see about the video stability...time for bed!

Update: zen-sources didn't resolve the stability issues. However, I did find a number of new resources online, including this helpful opensuse.org guide and the Unofficial wiki for the ATi Linux Driver.

Following the opensuse guide, I added some lines to the Device section of my xorg.conf (everything after "try these options..."):
Section "Device"

# Driver "radeonhd"
Identifier "Card0"
Driver "fglrx"
VendorName "ATI Technologies Inc"
BoardName "Radeon HD 3200 Graphics"
BusID "PCI:1:5:0"

#try these options to improve stability:
Option "VideoOverlay" "off"
Option "OpenGLOverlay" "off"
Option "TexturedVideo" "on"
Option "BlockSignalsOnLock" "on"
Option "KernelModuleParm" "locked-userpages=0"
Option "UseFastTLS" "2"
Option "UseInternalAGPGART" "no"
Option "mtrr" "off"
Option "no_accel" "no"
Option "EnablePrivateBackZ" "no"
Option "backingstore" "true"

EndSection


Time will tell if these options make it more stable...

The Long Slog: Unleash the photons!

Time to get the remote control working.

I followed the Gentoo LIRC wiki page, supplemented by the MythTV LIRC wiki page. I have a "Windows MCE" remote that came with my old Hauppauge USB WinTV receiver, which uses the "mceusb2" driver. So, the procedure for Gentoo is:


  • add LIRC_DEVICES="mceusb2" to /etc/make.conf.
  • emerge lirc
  • modprobe lirc_mceusb2
  • sudo echo lirc_mceusb2 >> /etc/modules.autoload/kernel-2.6


It worked after following these steps, although it wasn't very clear from the Gentoo wiki page that I would need to load a kernel module (the way I read it was that this was only needed in certain special circumstances).

[Edit: removed bitching about it not "just working"...getting old, Dr. Harris!]

Tuesday, May 5, 2009

The Long Slog: Firewire

I get my TV signal directly from my cable digital set-top box (STB), via its firewire port. This is really great, because the signal coming through that port is already a decoded MPEG2 stream, so there's no need to have a tuner card in your mythbox!

MythTV didn't recognize the STB on the firewire port. I had installed and modprobed the ieee1394 kernel module. I first tried following this guide, which got me up and running when I had a mythbuntu box, but it doesn't apply for Gentoo users. Then I found this guide, which seems to be just what the good doctor ordered. I added two more kernel modules: video1394 and raw1394.

After that, mythtv-setup instantly recognized the STB on the firewire port. I set it to p2p instead of Broadcast (which the above guide says is more stable). I should say, I skipped the p2p setup stuff in that guide; I'm interested to see if it will "just work". Why are you laughing?

Woo! It seems to be working! In your face, Murphy!

Addendum: I should note that I had to select "Broadcast" mode for my firewire capture card in mythtv-setup, rather than "P2P".

Monday, May 4, 2009

The Long Slog: Can you hear me now?

Next up: Get sound working.

I had compiled the wrong kernel driver before. For my onboard Realtek ACL889A card, I need the snd-intel-hd driver. With that fixed, I was able to run alsaconfig, which detected and set up my card. I then started up KDE, and opened the systemsettings tool (which I have to say is really nice, BTW...much better than KControlCenter!).

In the Multimedia section, I saw three options:

  • HDA ATI SB (ALC883 Analog)
  • HDA ATI HDMI (HDMI Audio output)
  • Jack Audio connection kit


I knew I wanted to use HDMI audio output, so I tried that one first; there's a "Test" button in the tool, and on pressing it...woohoo! I heard the dulcet chimes of the KDE startup tune. Woo. I set the HDMI option to be the default output for all sound categories, and pressed Apply. There is also a "Backend" tab in this tool. In my case, this tab has two options: Xine and GStreamer. Xine was selected by default. I also tried GStreamer, but it didn't work immediately, so I went right back to Xine (IIAB,DFI).

Well, it can't all be good news, right? I tried watching a recording in MythTV, and there's still no sound output. I also tried using mplayer directly, and that also lacks audio. Dragon Player does have audio (not too surprising, since it uses Xine as a backend). I found this really nice guide, which gave me lots of good ideas and brought me closer to success, but not there yet. What I mean is, sound still doesn't function in mplayer and mythtv, but at least now here are no error messages :/

I started a thread on the Gentoo forums; hopefully someone will have ideas.

Update: It works now. I don't know what I did to fix it, but both mplayer and MythTV now produce audio!

The Long Slog: More Xorg driver problems

As you may have read in a previous post, I've had some trouble getting Xorg set up on the new mythbox. I first tried getting the radeon driver to work, but it was segfaulting on startup, so I switched to the closed ATI driver (fglrx). That one caused my screen to go blank and become totally unresponsive to keyboard or mouse. Nice. So, I went back to the open source radeon driver (and its radeonhd variant). I eventually got a functional KDE session working, but for some reason MythTV segfaulted whenever I tried to start it. I eventually discovered that MythTV would run, but only if the Xorg GLX module was not loaded (i.e., no hardware-accelerated graphics). I was hoping this wouldn't be a big problem, but the video playback in mythtv was horribly jerky due to many dropped frames.

So, I went back to fglrx, and eventually muscled my way toward a working X session. The only remaining issues are that (1) glxgears reports a higher FPS when GLX is not loaded than when it is (which is pretty bizarre), and (2) I still get the blank-screen catatonia if I stop the Xorg process. I can live with that; under normal circumstances, there's no reason to stop it.

Sunday, May 3, 2009

Migrating MythTV

The task: migrate all my recordings and the mythtv database to the new mythbox.

Steps:

  • rsync the following directories: /myth/tv, /myth/video
  • mysqldump the database, copy the dump file over to the new machine
  • Install mythtv, mythtv-themes, and plugins: mytharchive, mythbrowser, mythdvd, mythflix, mythgallery, mythgame, mythmovies, mythmusic, mythnews, mythphone, mythvideo, mythweather

  • Unfortunately, mytharchive can't be installed, because it depends on mjpegtools-1.8, which is not itself compilable without manually patching the code. I'll just wait for the patch to be released...

  • Wow, mythbrowser also threw a compile error. Well, I don't really use that, so I'm not going to look into it now, I'll just skip it.

  • MythTV pulled in MySQL database as a dependency, but it needs to be configured. Run emerge --config =dev-db/mysql-5.0.70-r1. This will create the main database and set the password for the "root" DB user.

  • Next, start the mysql daemon (/etc/init.d/mysql start, and rc-update add mysql default for all future sessions).

    Edit /etc/mythtv/.mythtv/mysql.txt. Contents:
    DBHostName=localhost #if you aren't using a separate backend computer

    # By default, Myth tries to ping the DB host to see if it exists.
    # If your DB host or network doesn't accept pings, set this to no:
    #
    DBHostPing=no

    DBUserName=<your_db_username>
    DBPassword=<your_db_password>
    DBName=mythconverg #I believe this is typical; you may have to change it
    DBType=QMYSQL3


  • I'm unsure what the correct chronology is for the next few steps. Should I import the database dump from the old mythbox first, or run mythtv-setup first? I'm going to try importing the old database first. But before I do it, the mythconverg database needs to be created first:

    # mysql -u root -p
    mysql> create database mythconverg;
    Query OK, 1 row affected (0.00 sec)

    mysql> flush privileges;
    Query OK, 0 rows affected (0.00 sec)

    mysql> exit
    Bye


    Then we can issue the command to import the old database information: mysql -u root -p mythconverg < mythtv_backup.sql

  • All right. Next run mythtv-setup. Funny story. It segfaults! No indication why, but digging around in the excellent Gentoo forums revealed this thread, which indicates that the problem is related to video drivers/opengl/mesa. Here's what I did to try to solve it:

    • Unmask mesa-7.4, and emerge it (required unmasking a couple of dependencies as well).
    • I discovered in that thread that there's a "radeonhd" driver, so i am going to try to use that instead of the regular "radeon" driver. So, I also ran emerge xf86-video-radeonhd
    • re-emerge xorg-server and mythtv.
    • revdep-rebuild to recompile dependencies.
    • Reboot to pull in all changes.


    Unfortunately, that didn't work. The other solution in that thread was to disable glx in xorg.conf. That worked; hopefully I won't miss GLX too much :/

    The nice thing was that importing the database from the old mythbox pulled in all of my configuration information as well, so there was very little to change in mythtv-setup!

  • Next, run mythfilldatabase.

  • Start mythbackend: /etc/init.d/mythbackend start, and for all future sessions: rc-update add mythbackend default. This didn't work right away, because I didn't realize that on gentoo, the backend gets the DB information from /etc/mythtv/.mythtv/mysql.txt, not from ~/.mythtv/mysql.txt.

  • Try running mythfrontend and watching a recording (which had been ported over from the old mythbox). Well, it worked, but there's no sound and the video playback is extremely poor quality, because I've disabled GLX in xorg.conf! Argh, what am I to do?

  • Get sound working. This was silly of me: I didn't select my motherboard's sound card in the kernel config. Now I'm compiling it as a module and will add it to modules.autoload. Then I had to emerge alsa-utils, then run alsaconf, then /etc/init.d/alsasound and rc-update add alsasound default.
    Darn: alsaconf doesn't appear to know about my sound chip. Or maybe I misidentified it in the kernel...I'm seeing another module name in the forums.

  • Get firewire connection to cable box working - TBD

  • Get the remote working - TBD

  • Fix deinterlacing settings, if necessary - TBD

  • Get auto shutdown/wakeup working - TBD


I'm already sick of this...

Saturday, May 2, 2009

New Mythbox!

We finally got a cabinet for our home theater stack, which is good, because our daughter is just about to start walking! I had three simple criteria for the cabinet: big enough to hold our components, made of wood, and with glass-front doors that can be child-proofed. It was surprisingly difficult to find something that fit the bill.

Anyway, this post isn't about the cabinet, but the subsequent upgrade that the cabinet instigated: the mythbox is a regular tower PC, so to fit in the cabinet it has to lay on its side, which makes the DVD drive unusable. This doesn't seem like too big a deal, but taken together with my other peeves about that system (very loud fans; looks ugly and out of place in the living room; lacks the horsepower needed to decode HD video; and a fragile and increasingly complex disk partition layout that is perpetually threatening to overrun its capacity). That's right: time for a new Mythbox!

Let's go shopping!



This time, I decided to do it Right: get a media-center computer case with very quiet fans, a decent CPU/GPU that might have a chance to playback HD video, and a single large SATA hard drive that I can partition in a non-insane way to accommodate our needs. It's really amazing how much system can be had for less that $400 these days:


  • Case: Antec NSK 2480 [$100]. This clean aluminum media case looks a lot like a normal piece of A/V equipment, and the internal layout is really thoughtfully designed (apparently, an internet-famous case fetishist was heavily involved). This thing is dead quiet, too. This may sound like hyperbole, but it's literally true: when I first powered it on, I thought I must have missed a connection somewhere, because I didn't think it was on!

  • CPU: AMD Athlon X2 4050e 2.1 GHz dual-core [$40]. The fact that this level of computing power is available for the cost of dinner for two is really really stupid in a really good way. 40 bucks...unbelieveable! I could have spent $70, which would have bumped it up to 2.8 GHz, but really, what's the point? I'd just be chasing a number at that point, I think.

  • MoBo: Gigabyte GA-MA78GPM-UD2H [$100]. I needed a MicroATX form factor for the Antec case, and an AM2 socket for the CPU. I wanted good onboard video/sound/ethernet, and with SATA and Firewire controllers built-in. Oh, and I wanted HDMI and digital audio outputs so I can plug it directly into my Sony soundbar, so I can get rid of my crazy routing through the TV. This one fit the bill, and I've been happy with Gigabyte boards in the past. I'm hoping the onboard Radeon GPU will have enough firepower to decode HD video, but I actually haven't finished setting it all up yet, so we'll see...

  • RAM: OCZ 2x2GB DDR2 800 SDRAM [$50]. RAM is now $10 per GB. That's sick...I remember paying ten times that not to long ago! I love it.

  • HD: WD Caviar Green 1TB [$90]. Not to harp on about how cheap all this tech is (too late!), but ten years ago, someone I knew paid a few thousand dollars for an 18GB hard drive.


And...that's it! Build your own mythbox in five easy pieces. Well, not quite. Normally, I'd have to buy a DVD drive too, but I'm harvesting the one from my Linux-box-that-went-boom. Also, I didn't realize that the CPU didn't come with a heatsink/fan, so I had to run to Fry's to pick one up. Can I just say, the CPU cooling market is getting a bit out of hand. There were all kinds of enormous coolers on the shelf, many with copper tubing and "blingy" LED effects (/me eyeroll...does *anyone* think that's cool?). Some of these were only around $40, but I just couldn't bring myself to buy something so ridiculously overengineered (or rather, I should say, so perfectly marketed to a demographic to which I don't belong). I got a nice, circumspect Thermaltake unit for $20.

Byte by Byte, putting it together...



I like assembling my own system. It's fun! I opened the case, surveying and appreciating all of the little features the case fetishist added to its design. First, you seat the motherboard, aligning its back ports with the port panel on the case. Once it's been screwed into place, carefully seat the CPU. The next step is probably the most difficult: seating the heatsink/fan onto the CPU. It's held in place with a clamp which exerts quite a bit of down pressure on the CPU, to maintain excellent thermal contact. This makes it a bit difficult to clamp on. I'll just note that the clamp designs are much better now than several years ago; I'll never forget a build about 5 years ago, during which I just about punctured a mobo with a flathead screwdriver, with which I was attempting to force a heatsink clamp into place. Ouch. Amazingly, it still worked after that...

Anyway, next up is to seat the memory sticks, and install the HD and DVD drive. Then all that remains is to thread all of the cabling: power to mobo, fans, disks; data from disks to mobo; connect front panel lights and switches to mobo. Voila! Done.

Installing Linux



Dear reader, you and I both know that I've been complaining too much lately about how Linux doesn't "just work" often enough. How I would love to tell you it had gone differently this time. Alas, I cannot.


  • First attempt: Kubuntu-9.04. This was released just a few days ago. I was pretty happy with Kubuntu-8.10 on the old mythbox, so this was the logical choice. Unfortunately, the new mythbox was behaving very erratically during the install. I was seeing weird errors during bootup ("ata1: Softreset failed (Device not ready)"), and frequent stalls and freezes during the installation process. This was pretty frustrating; I probably hard-reset the machine a dozen times trying to get it to install. Googling the problem was not very enlightening, but I did see that others were having similar problems with Ubuntu-9.10 and Gigabyte Mobos, so I was somewhat relieved that it might not be a hardware problem.

  • Second attempt: Kubuntu-8.10. I still had the install CD I burned for the old mythbox, so i gave it a try. Unfortunately, I had the same instability issues.

  • Third attempt: OpenSUSE 11.1 (KDE4 Reload edition). OpenSUSE and I have a colorful history. I have heard good things about it over the years, and have tried to check it out several times, but in all those attempts, I have never been able to install it successfully. I am not exactly a linux newbie, so this has always been pretty frustrating for me. When I've tried to report my issues, I'm basically told that I must have "weird hardware". I am sad to report that my latest experience with OpenSUSE was no better. As with Kubuntu, I couldn't even get through the installation process due to my system freezing up.

  • Fourth attempt: I decided to return to the comfortable embrace of my old friend, Gentoo. At this point, I was becoming more convinced that some component was either defective, or simply so new that it wasn't supported well in the kernel. Either way, I saw an RMA in my future, which is always sad.

    But then...surprise! I had no instability issues whatsoever under Gentoo. No weird messages, no interruptions, no hard resets! The installation process went very smoothly. Well, if you've never done a Gentoo install before, it's way, way more hands-on than Kubuntu or OpenSUSE. With those distros, you select you language, give a partition layout, and press Go. With Gentoo, you almost literally build your OS from scratch. You download a pre-fab compile chain and system toolset, but literally everything else is compiled on the fly, including the kernel. It's kind of fun, if you're into that sort of thing!


Reaching the Desktop: Installing KDE



Once the base installation is complete, the next step is to type emerge kde, which takes many hours to compile (due to dependencies, that one command represents almost 600 packages, including little things like, oh...xorg-x11). So, there's plenty of time to go see a movie, have dinner with friends, get a good night's sleep, and check on its progress in the morning I executed the emerge kde command on Saturday afternoon, around 2:00 pm. It finished around 9:00 am the next day! The good news is, there were zero issues encountered in compiling and installing those 600 packages.

That's not to say there were no issues in trying to use the packages, though. I don't usually go into microscopic detail about why I am sometimes frustrated that Linux is not easier to use (or rather, to administer...I actually think it's already very easy to use); I think this particular case may be illustrative of my general experience:


  • KDE is finally installed. Great! So, let's use it. Start the xdm graphical login service (/etc/init.d/xdm start): FAILED: it's mis-configured to use xdm (which is not even installed) instead of kdm.

  • Find correct configuration file where the DISPLAYMANAGER environment variable lives. It's currently in /etc/conf.d/xdm. Set the variable to "kdm" even though the comments in that file instruct that it should be "kde-NN" where NN is the KDE version number. The comments are wrong/deprecated.

  • Try /etc/init.d/xdm start again: FAILED. Xorg starts momentarily, then I am dumped back to the vt text console with no error message.

  • Try bypassing the login manager by executing Xorg & startkde: FAILED. X starts, shows the default grey mesh screen with X cursor, but the keyboard and mouse are unresponsive, so there's nothing to do but hard-reset.

  • Google around, find a message board post saying that I need to enable the Hardware Abstraction Layer daemon. So, execute /etc/init.d/hald start (and do rc-update add hald default so it gets started at boot from now on). Try Xorg again: MARGINAL. Keyboard and mouse work, but the Xorg is not configured correctly.

  • Run xorgcfg to configure X: FAILED. Error: ":1.1 is not allowed to own the service org.x.config.display0"

  • Instead of googling that error, just try an alternative configurator: Xorg -configure: MARGINAL. Creates a viable xorg.conf file, which I place in /etc/X11. I can now successfully log into a KDE-4.2 session using the KDM login manager! BUT: it looks terrible. The screen resolution is 1440x900 instead of 1920x1080, so everything looks blurry due to the pixel resampling. I definitely need to use my TV's full screen resolution.

  • Install ati-drivers to get better X performance and full 1920x1080 screen resolution: FAILED. Missing kernel option "Enable unused/obsolete exported symbols". Reconfigure / compile / install the kernel. Reboot.

  • Try to install ati-drivers again: FAILED. "ati-drivers-8.552 requires support for pci_find_slot". No hint this time where to find that option in the kernel's menuconfig. Google for it: find this bug report. Basically, I also need "Enable deprecated pci_find_* API" option in my kernel. Sigh. Reconfig / compile / install kernel (again!). Reboot.

  • Try to install ati-drivers a third time: FAILED. Got message from the ebuild: "DRM support is enabled builtin, so direct rendering will not work". Argh! That means I have to Reconfig / compile / install kernel (third time!). Reboot.

  • Try to install ati-drivers a fourth time: SUCCESS!

  • Run aticonfig --initial to tweak xorg.conf for new driver and DRI settings: SUCCESS

  • Execute eselect opengl set ati to enable ATI hardware-accelerated openGL.

  • Start KDM: FAILED! Screen goes black, no response from keyboard. Hard reset.

  • Go back to my original xorg.conf file. I guess I will have to tweak it by hand to enable what I need, which is pretty ridiculous. Try setting the Driver parameter to radeon, which is the open-source driver for ATI cards: FAILED. This causes Xorg to throw a signal 11 error with a useless backtrace. So, let's review: I can use the generic vesa driver and get an ugly undersampled desktop, use the open-source radeon driver and get an immediate Xorg crash, or use the closed ATI driver and get a blank screen. Neat!

  • Digging into this issue, I discovered that my emerge kde command did NOT actually pull in xorg-x11 as a dependency! That seems really weird to me. It obviously pulled in *some* X11 stuff, since I am able to start an X session. I don't understand all of the overlapping X packages, but it would seem pretty important to have xorg-x11. So I emerge it, and it brings about ten friends along for the ride.

  • Next I decided to nuke the ATI closed drivers, and just try getting the "radeon" driver working. I ran X -configure again, and then manually changed the "Driver" to radeon (instead of vesa): SUCCESS! I finally have a KDE desktop at full resolution, and glxinfo says I have direct rendering enabled. However, glxgears is pretty slow (~500, would like to see a few thousand).

  • Though glxinfo claims direct rendering is enabled, Xorg.0.log tells a different story:
    (EE) RADEON(0): [dri] RADEONDRIGetVersion failed to open the DRM
    [dri] Disabling DRI.
    (==) RADEON(0): Will attempt to use R6xx/R7xx EXA support if DRI is enabled.
    ABI class: X.Org Video Driver, version 4.1
    (II) AIGLX: Screen 0 is not DRI capable
    (II) AIGLX: Loaded and initialized /usr/lib64/dri/swrast_dri.so
    (II) GLX: Initialized DRISWRAST GL provider for screen 0
    Module class: X.Org XInput Driver
    ABI class: X.Org XInput driver, version 2.1


    So it looks like hardware DRI failed, so it's falling back to software DRI. A little more digging around led me to conclude that DRI is simply not supported yet for my video card. It's expected in kernel version 2.6.30, so I'll just wait for that.


This post is really long, so I'm going to write about setting up MythTV in a new post. See you there!