ASUS A7N8x Deluxe Linux (in)compatibility

Continuing in the vein of ‘stupid hardware problems’, this week I discovered that the ASUS A7N8x deluxe motherboard I’ve been trying to nurse along as the backbone of my MythTV PVR basically doesn’t play nicely with linux, period. Don’t ask me why I didn’t try searching the web a little harder before, since most of the threads I’ve referenced below are ancient. Basically there is something screwy with its ACPI implementation, SATA controller, and just about everything else.

The issues apparently come and go with varying kernel versions, although I’m sure many folks don’t notice them since they don’t put the machine under heavy load or try to use both ethernet ports. For instance, the 3com and nvidia ethernet controllers absolutely will not stay bound to the same ethX devices after a warm reboot. Disabling one or the other ethernet card in the BIOS eliminates this problem fairly effectively.

Secondly, the machine crashes consistently under heavy I/O load. Sometimes it takes an hour, other times copying a video file from one drive to another will crash it immediately.

I’ve got it running with only a few crashes per week under FC5 by using the following kernel line

kernel /vmlinuz-2.6.18-1.2257.fc5 ro root=/dev/hda2 rhgb acpi=off noapic nolapic.

I’ve not yet tried an FC6 era kernel, but at this point since the general consensus is that the board runs windows reliably, I think I’m going to try and do some shuffling in order to make using windows on it a possibility.

References:

  • http://web.archive.org/web/20040117183728/http://attila.stevens-tech.edu/~dkopko/a7n8x.txt
  • http://www.nvnews.net/vbulletin/showthread.php?t=6946
  • http://lkml.org/lkml/2003/11/11/217

Fedora Core 5 ATI driver with theater_out tv support

I have a radeon 9200 video card in my HTPC, since when I bought it all the HTPC enthusiasts over at seemed to think ATI was better for tv output. I also wanted the possibility of using a component adapter cable (which I never bought). For years I’ve been happily using the ATI proprietary FGLRX drivers under linux to drive my Toshiba 27″ TV with an svideo cable. Alas, all good things come to an end. Xorg 7.0 came along with my Fedora Core 5 and MythTV 0.20 upgrade, and with it came FGLRX breakage. Or to be precise, along with it came an FGLRX upgrade.

After entirely too much digging, I discovered that versions of FGLRX greater than 0.20 have broken XV scaling. No, it doesn’t appear to be documented anywhere at ATI, but what happens is the video only uses part of the screen and appears to be clipped out of the top left corner of the frame. I fought with it for an hour or two thinking I was just drawing offscreen or something, but eventually realized it wasn’t happening.

Finally I gave up and just left XV disabled entirely, which seems to be ok for recorded TV, but DVD playback is noticeably choppy. In both cases CPU usage is well over 50% (most of it being eaten by the X server) on my Athlon XP 2500+, which is ludicrous.

In any case, the poor performance drove me to look for other options. The default ati driver included with x.org unfortunately doesn’t include any tv output support, but the gatos driver folks do support it, so I built up a new version of the latest ATI driver with their patch applied and lo and behold it works! Kudo’s to the fedora x.org packagers for splitting out the drivers so nicely. Here’s a patch against the most recent fc5 ati driver specfile.


--- SPECS/xorg-x11-drv-ati.spec 2006-04-25 21:22:36.000000000 -0400
+++ SPECS/xorg-x11-drv-ati-theater_out.spec     2006-11-05 15:56:11.000000000 -0500
@@ -13,7 +13,7 @@
 Summary:   Xorg X11 ati video driver
 Name:      xorg-x11-drv-ati
 Version:   6.5.8.0
-Release:   1
+Release:   1.theater_out
 URL:       http://www.x.org
 License:   MIT/X11
 Group:     User Interface/X Hardware Support
@@ -24,6 +24,8 @@
 Source2:   r128.xinf
 Source3:   radeon.xinf
 Patch0:    xorg-x11-drv-ati-6.5.7.3-radeon-metamodes-SEGV-fix.patch
+#Patch1:          xorg7-6.5.8.0-tv_output.patch.gz
+Patch1:           http://megahurts.dk/rune/stuff/xorg7-6.5.8.0-tv_output.patch.gz

 ExclusiveArch: %{ix86} x86_64 ia64 ppc alpha sparc sparc64

@@ -42,6 +44,7 @@
 %prep
 %setup -q -n %{tarball}-%{version}
 #%patch0 -p2 -b .radeon-metamodes-SEGV-fix
+%patch1 -p1 -b .theater_out

 %build
 %configure --disable-static
@@ -79,12 +82,16 @@
 %{moduledir}/multimedia/theatre200_drv.so
 %{moduledir}/multimedia/theatre_detect_drv.so
 %{moduledir}/multimedia/theatre_drv.so
+%{moduledir}/multimedia/theater_out_drv.so
 #%dir %{_mandir}/man4x
 %{_mandir}/man4/ati.4*
 %{_mandir}/man4/r128.4*
 %{_mandir}/man4/radeon.4*

 %changelog
+* Sat Nov 04 2006 Erik LaBianca  6.5.8.0-1.theater_out
+- Added gatos theater out patch
+
 * Tue Apr 25 2006 Adam Jackson  6.5.8.0-1
 - Updated to stable branch release from upstream.

The relevant sections of the xorg.conf file needed to make this go are here:


Section "Monitor"
        Option "DPMS"
        HorizSync    30.0 - 40.0
        VertRefresh  60
        Identifier   "Monitor0"
EndSection

Section "Device"
        Driver      "ati"
        Option      "IgnoreEDID" "True"
        Option      "TVOutput" "NTSC"
        Option      "MonitorLayout" "AUTO, NONE"
        Identifier  "ATI Graphics Adapter"
        BusID       "PCI:3:0:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "ATI Graphics Adapter"
        Monitor    "Monitor0"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "800x600"
        EndSubSection
EndSection

This all does indeed work, and reasonably well. My picture isn’t perfectly centered, and the UI screens in Myth have a bit of flicker, but it does work, and is even open source, so I’m pretty happy with the change. I’m not sure of the licensing implications of actually distributing an x.org binary with a gpl patch included, so I’m not posting the RPMS here directly.

IVTV Autoloading on Fedora Core 5

My MythTV system has been in place for several years now, and has seen many versions of Fedora. Ensuring the IVTV modules were loaded correctly after a system restart has always been a bit of a black art, however, and with Fedora Core 5 this seems to be no less of an exception. However, I think I have got it partially figured out, so here it is.

First things first. Modern 2.6 linux kernels apparently fully support hardware autodetection. I understand that to mean you aren’t support to need to manually (or in a script) modprobe ivtv nor should you have to explicitly put any configuration into modprobe.conf. If your IVTV kernel modules are installed correctly, it’s supposed to be automatically detected, and then udev is supposed to create the relevant devices for you. This is working for me, however changing the permissions on video devices in /etc/udev/rules.d/50-udev.rules isn’t working. I tried to use this line to do it, but it appears to be ignored in general.


KERNEL=="video*",               MODE="0666"

The default is 0660 and I get this:


crw------- 1 mythtv root 81, 0 Nov  4 15:16 /dev/video0

My guess is that ivtv doesn’t play nice with udev, or I just don’t know enough about udev to use it effectively. I did find some good udev documentation so perhaps I’ll figure it out eventually.

Regardless, on my frontend system I also need my hauppauge pvr-250 remove receiver to work, and this is where things got sticky. I had some settings in place for Fedora Core 3 from Jarrod’s guide trying to preload lirc-i2c before loading ivtv which were hanging up on startup, so I had commented them out. That was allowing ivtv to load, but my remote didn’t work. A quick hack to those lines fixed the problem, however. It appears as if nowadays ivtv wants to load first, and then have lirc_i2c stuff in on top, so this seems to work well.


cat > /etc/modprobe.d/ivtv.conf <<-EOF
install ivtv /sbin/modprobe --first-time --ignore-install ivtv; \
    { /sbin/modprobe lirc_dev; /sbin/modprobe lirc_i2c; }
EOF