Fedora 16 with NVidia GT 610 and MythTV

ASUS GT610-SL-1GD3-L

I have been running Fedora 16 and MythTV 0.25 on a old Dell 510m laptop using it as a Myth Frontend to our 42″ LCD TV and it’s been running pretty good for the last year or so. I tried the content I already have running on full HD and it was much better in so many ways.

I just had to try to get a full HD Myth Frontend if I could. I ended up with an HP dc7700 “small form factor PC”, an 8GB Kingspec SSD hard drive and a new ASUS GT 610. Between them I had a dual core 2.8GHz CPU with 1GB of RAM and a passive NVidia graphics card.

The only problem was I knew the old GeForce 210 card worked fine with Fedora 16 but I was quite unsure of the new GT 610. This article details the results and how I managed to get it working. Unlike some posts about this topic this post is not intended to answer everyone’s question about NVidia drivers on Linux but rather tell my story in the hope it’s useful or gives some clues.

Often when solving problems like this I find some of the most useful information is tools that can be used to diagnose or give somewhat hidden detail, this proved to be very true here.

HP dc7700 Small Form Factor PC

Resources

There are quite a few pages on the web devoted to getting NVidia cards working on Fedora 16/17/18 and I have learned a bit from quite a few of them but the pages below were especially useful.

No Sound Fedora 16 or 17 with Geforce NVidia Video Card
http://cool-technology.blogspot.co.nz/2012/11/no-sound-fedora-16-or-17-and-geforce.html
Despite the title this article was very helpful in getting the video working on Fedora 16.

How to make PulseAudio work with Nvidia HDMI audio outputs…
http://www.piggott.me.uk/blog/2011/03/26/how-to-make-pulseaudio-work-with-nvidia-hdmi-audio-outputs-under-fedora-and-ubuntu/

NVidia Drivers
http://www.nvidia.com/object/linux-display-ia32-319.17-driver.html– I downloaded NVIDIA-Linux-x86-319.17.run

 

Video

When I started with Fedora 16 and the NVidia GT 610 it did work but the video on MythTV was very jerky and basically rubbish. So I was able to get the UI to work with basic static stuff, but throw any video at it and it just wasn’t working well.

As it transpires out of the box Fedora uses the Nouveau drivers, http://nouveau.freedesktop.org – these are open source NVidia drivers. From what I have read the genuine NVidia drivers are not shipped because of licensing issues. The Nouveau drivers are quite good but don’t utilize the full gambit of NVidia’s capabilities and this is particularly so of the new cards – whilst not a super fast card my GT 610 is apparently new enough to be a problem.

So my challenge was how to use the genuine NVidia drivers. It appears there are two basic approaches one is to download the drivers from NVidia and install them using the inbuilt installer for Linux or to use the copy of the drivers bundled in an RPM as either “akmod” or “kmod”. I tried with the akmod but didn’t have much success. Knowing what I know now they may work, so may well be worth trying. Because of the problems I had with akmod and kmod I used the drivers from NVidia and the installer that they were bundled in.

It also appears the Nouveau drivers are included in the out-of-the-box Fedora kernels.

Steps

1. Ensure you have done a full update of your system, using “yum update” or similar. This is not an absolute requirement but a good suggestion particularly if it has been a log time since a full update.
2. Go to the NVidia site and find the appropriate driver for your video card. In my case I had a “GT 610” so I downloaded “NVIDIA-Linux-x86-319.17.run” from http://www.nvidia.com/object/linux-display-ia32-319.17-driver.html.At this point it would be a good idea to copy the driver to the PC or download direct to the PC. In my case I put it in:/tmp/nvidia
3. At this stage it would also be quite good to ensure you have SSH working as it may be useful to have later on.
4. Ensure you have the following packages installed: 

  • kernel-devel
  • binutils
  • gcc

These can easily be installed by running commands like “yum install binutils“.

5. You might want to consider disabling any on-board sound or video adapters. Mine are still enabled but you might find disabling on-board sound/video may make things simpler.
6. Run the following to get details about any video adaptors on your system:

lspci -v

In my case this returned:

01:00.0 VGA compatible controller: nVidia Corporation Device 104a (rev a1) (prog-if 00 [VGA controller])
        Subsystem: ASUSTeK Computer Inc. Device 840d
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at f8000000 (32-bit, non-prefetchable) [size=16M]
        Memory at e8000000 (64-bit, prefetchable) [size=128M]
        Memory at f0000000 (64-bit, prefetchable) [size=32M]
        I/O ports at 1000 [size=128]
        [virtual] Expansion ROM at f2000000 [disabled] [size=512K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Capabilities: [b4] Vendor Specific Information: Len=14 <?>
        Capabilities: [100] Virtual Channel
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
        Kernel driver in use: nouveau
        Kernel modules: nouveau

01:00.1 Audio device: nVidia Corporation HDMI Audio stub (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device 840d
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at f9200000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd-hda-intel

One of the most important things to note is the highlighted line “Kernel driver in use: nouveau”, which obviously proves at this point you are still using Nouveau drivers.

7. Assuming you are using Grub as your boot loader you need to edit “/etc/default/grub”. Before I started mine looked like:

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Fedora"
GRUB_DEFAULT=saved
GRUB_CMDLINE_LINUX="rd.md=0 rd.lvm=0 rd.dm=0  KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0 LANG=en_US.UTF-8"

You should edit the last line, “GRUB_CMDLINE_LINUX” including “rdblacklist=nouveau nouveau.modeset=0”. This will have the effect of disabling the Nouveau drivers. Thus my final working config is:

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Fedora"
GRUB_DEFAULT=saved
GRUB_CMDLINE_LINUX="rd.md=0 rd.lvm=0 rd.dm=0  KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0 LANG=en_US.UTF-8 rdblacklist=nouveau nouveau.modeset=0"
8. As with any change to Grub you need to run the following after saving your changes:grub2-mkconfig -o /boot/grub2/grub.cfg
9. You should now reboot your PC. This will most likely boot into text mode and quite likely appear to hang with:Started Display Manager                           [OK]This is to be expected. It will see like you won’t be able to do anything as it appears to have hung. At this point you can either connect to your PC via SSH/Telnet or press <ctrl><alt><F4> to take you to a text based login screen.
10. Once you are logged in you should run the NVidia driver installer:

cd /tmp/nvidia
chmod 770 NVIDIA-Linux-x86-319.17.run
./NVIDIA-Linux-x86-319.17.run

Clearly the above is only true if you put the driver in the same location as me, “/tmp/nvidia” and downloaded the same driver.

11. The NVidia installer did complain about missing things for me and it was a case of just working through them one at a time. For me it was mostly just missing dependancies which I have listed earlier – there are likely more dependencies but I probably already had them installed. The main point is be patient and work through it. I wish it was a more simple exercise and worked solely through Yum but at least the end result is great.
12. After installing the NVidia drivers you will need to reboot.
13. After rebooting run “lspci -v” again and hopefully it should look something like:

01:00.0 VGA compatible controller: nVidia Corporation Device 104a (rev a1) (prog-if 00 [VGA controller])
        Subsystem: ASUSTeK Computer Inc. Device 840d
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at f8000000 (32-bit, non-prefetchable) [size=16M]
        Memory at e8000000 (64-bit, prefetchable) [size=128M]
        Memory at f0000000 (64-bit, prefetchable) [size=32M]
        I/O ports at 1000 [size=128]
        [virtual] Expansion ROM at f2000000 [disabled] [size=512K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Capabilities: [b4] Vendor Specific Information: Len=14 <?>
        Capabilities: [100] Virtual Channel
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
        Kernel driver in use: nvidia
        Kernel modules: nvidia, nouveau

Obviously the important thing is “Kernel driver in use: nvidia”

 

Sound

Once I had the video working for MythTV I found that even though the sound was working on MythTV the sound was not working for anything else. So “Rhythmbox” and YouTube had no sound.

In MythTV the sound was working and configured as:

ALSA:hdmi:CARD:NVidia,Dev=1

This gave me the impression that I might be using ALSA, Advanced Linux Sound Architecture and not PulseAudio. Apparently this is not exactly correct, quite a few web sites talk about the tight coupling of PulseAudio and Gnome 3. Gnome 3 being the default for Fedora 16/17/18. In fact it appears MythTV is probably talking directly to the sound card via ALSA.

My experience is that trying to change Gnome to ALSA was going to be an uphill battle so the task at hand was to get ALSA working under Pulse. The article at piggott.me.uk was particularly helpful in this regard.

Before you start ensure you have all the ALSA packages installed. In my case I have:

  • alsa-firmware.noarch 1.0.25-1.fc16 @updates
  • alsa-lib.i686 1.0.26-1.fc16 @updates
  • alsa-plugins-pulseaudio.i686 1.0.26-1.fc16 @updates
  • alsa-tools.i686 1.0.26.1-1.fc16 @updates
  • alsa-tools-firmware.i686 1.0.26.1-1.fc16 @updates
  • alsa-utils.i686 1.0.26-1.fc16 @updates
  • python-alsa.i686

Quite likely all the above are not needed and especially the python package is probably not needed, but these are the ones I have in my working system. Of course the easiest way to install a package is using yum and a command like:

yum install alsa-tools-firmware

The best first step would be to run:

aplay -l

This details what sound cards you have, so in my case it produces:

**** List of PLAYBACK Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC262 Analog [ALC262 Analog]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0

But that’s not all you can also run:

aplay -D hw:1,7 /tmp/nvidia/mytest.wav

This will pay the file “/tmp/nvidia/mytest.wav” using card 1 and device 7. Use this tool to test each of your sound devices to find out which one is the sound of your HDMI card. In my case it was “hw:1,7”.

An important point is that using “aplay -l” will work even if your sound is not configured correctly in Pulse, ALSA or MythTV – a very useful diagnostic tool. Also note you need a *.wav file not an *.mp3 file.

Now edit “/etc/pulse/default.pa” which is the config file for Pulse and look for the following line and comment it out:

load-module module-udev-detect

Now look for any instances of “module-alsa-sink”, you should only find one which should be commented out. So now you should add the following line, I added it at the bottom but I think it should work anywhere in the file:

load-module module-alsa-sink device=hw:1,7

You can now see how the output from “aplay -l” gave you the details to put in the “default.pa” file.

At this point you should start up the “Sound” applet from “System Settings” in Fedora and check nothing is muted and also check the sound is turned up on your screen.

Reboot your PC and hopefully your sound should work.

Posted in Fedora, MythTV permalink
Tony

About Tony

I believe in putting back and my contribution to this site and my blog is about adding information that I think is useful and different. It's also about adding my slant to life with things I see and views I have on subjects.