Unichrome How-To

From MythTV Official Wiki
Revision as of 01:07, 19 November 2011 by Wagnerrp (talk | contribs) (Protected "Unichrome How-To": Historical archive ([edit=sysop] (indefinite) [move=sysop] (indefinite)))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Time.png Outdated: The information on this page may no longer be relevant to the current release of MythTV, 34.0. Please consider helping to update it. This page was last modified on 2011-11-19.

I'm not going to wiki-fi this page, I find it easier to just jot my notes down, and then later wiki-fi it, feel free to 'wiki-fi' this page if I haven't.

Getting the Via Unichrome Pro drivers working was by far the hardest time I've had with MythTV. In all fairness my chipset is so new it's not in a lot of existing software/driver packages.

System requirements/How-TO Assumes:

  • Gentoo, gentoo-sources-2.6.16, GCC-4.1 (we are planning for the future right?)
  • Xorg-7 (modular X)
  • http://openchrome.org (extensive use of this website was necessary)
  • http://dri.sf.net (never went to the website, but used their CVS repository for the DRM necessity)
  • MythTV-0.19-fixes
  • Desire for Diskless frontend

Instructions

Install Gentoo (beyond the scope of this document, but well documented at http://gentoo.org). After doing a minimal install, go back, unmask the GCC-4.1 ebuilds, re-emerge what you have already, and then start from scratch one more time (make sure after you install GCC-4.1 you use gcc-config to switch your profile to that compiler). Now we should have a minimal system completely built with GCC-4.1. Next, emerge the kernel and include the following options: Root filesystem on NFS, AGPGart (M), via-agp (M) leave DRM alone, we'll deal with that outside of portage later. You'll need networking stuff, specifically your Ethernet card needs to be built into the kernel as well as Kernel Level IP Configuration options (DHCP, BOOTP, etc), not modularized. Don't forget you need a Cron and system logger, etc, but don't blindly rc-update add everything, yet..

Next we'll move onto getting Xorg up. Following This Guide, you can get the Modular X up and running with little hassle. Simple emerging of a few obvious files (you need a keyboard working right?) Then you need a driver for your card. Here's where things go a little rough:

If you've got a newer UnichromePro chip, such as the P4M800CE, you'll need to grab the OpenChrome drivers along with DRM and hand edit a file or 2, so according to this page, We will:
svn co http://svn.openchrome.org/svn/trunk 
cd trunk
./autogen.sh
configure
make
make install 

All should be well. However, not so smooth with DRM. We will grab the DRM source:

cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/dri login
(password for anonymous is empty, just hit enter)
cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/dri co drm 

This is what worked for me:

git clone git://anongit.freedesktop.org/git/mesa/drm

But before we proceed we need to edit a file:

cd drm/shared-core/
vim drm_pciids.txt
(scroll to Via section and add:)
0x1106 0x3344 0 "VIA P4VM800PRO"

Save, close (CTRL+ZZ). Now we can proceed with the instructions from the above website:

cd drm
./configure
make
make install 

This is what worked for me

cd ../
./autogen.sh
./configure
make
make install

And the kernel modules (drm.ko and via.ko):

cd drm/linux-core
make LINUXDIR=/lib/modules/`uname -r`/build DRM_MODULES=via
cp *.ko /lib/modules/`uname -r`/kernel/drivers/char/drm/
depmod -ae

And that should be about it. Modprobe up your new modules:

modprobe via

This should pull up both drm and via, and in your dmesg give you some sort of message about DRM initializing via (this message varies widely it would seem).

Now, cross your fingers and:

startx

Edit: If you get an error (EE) No Devices Detected when you start Xorg you need to check the location on the driver. Running make install installs in /usr/local but X looks in /usr/. Depending on your steps so far, a via driver may already have been built (which means you won't be told the driver hasn't been found). Simply copy the compiled unichrome driver (via_drv.so) over the top of the one that X is trying to use.

Hopefully you are in and:

glxinfo | grep direct

Returns a few lines, and one of them says:

direct rendering:  Yes

Now, emerge (or re-emerge if you were impatient) mythtv, et al:

emerge -av mythtv mplayer xine-lib

It's necessary (for everyone with Via chipsets?) to patch mplayer to enable XvMC on via hardware. I also had to edit the mythtv ebuild to enable xvmc-pro as an option, without providing a hacked ebuild, here's the idea: Open up /usr/portage/media-tv/mythtv/mythtv-0.19.ebuild and add: xvmc-pro as a USE option; Next find then section where --enable-xvmc is located, and add:

use xvmc-pro && myconf="${myconf} --enable-xvmc-pro"

directly below it. YMMV and it may break your machine (I doubt it though).

NOW emerge mythtv, hopefully not again, because you read things to the end before you start right?  ;)

Should be about it, I'm sure I'm forgetting a very important step, but that's about all I have down. In the end, if problems arise, check the openchrome mailing list or the mythtv mailing list, both are cornucopias of information.