Nvidia Card Tweaks For Better MythTV and UI Performance

From LinuxMCE wiki

Jump to: navigation, search


Checking to make sure that your card is running at full speed

You need to check that access to the video card is using AGP or PCI-E, therwise the system will default to PCI protocols to access the card, which makes it very slow. Your card may be running at 20% of its real performance! The framerate for the 'glxgears' test jumped from 50 to 250 after this change was made (6200 video card, PCI-E).

You need to check that

  1. The system's BIOS settings are running the card in full speed mode. This means going into the BIOS as the machine boots, and finding the section which refers to the video card. You should check that the Video card is set to either AGP or PCI-E. Gigabyte refers to it as PEG (PCI-E Graphics I guess).
  2. If you have an AGP card, you need to check that your /etc/X11/xorg.conf file has the following line in either the Screen or Device section. Use Gedit or nano editor to check this. You may also see "True" instead of "1" in your file, these mean the same thing. if you have any problems try setting this option to 3 (which uses the kernel's AGPGART driver), or if still having problems with stability set it to 0 (i.e. disabled). There are more instructions about getting NvAGP or AGPGART working in the Nvidia Howto documents (follow the README link from the latest Nvidia driver page.
Option          "NvAGP" "1"

You will need to reboot your computer after this change is made.

Using nvidia-settings to get better graphics performance

This was done using LMCE 7.10 beta3. This requires you have an Nvidia based GPU, either on-board or a card.

On a 6200 PCI-E video card, this took the 3D performance from 80 fps to 250 fps.

I noticed that while watching LiveTV using MythTV hooked up to a Dish Network 522 DVR and a Hauppagge PVR 150 MCE card, that xorg was taking up almost all of the available CPU during playback. This resulted in very poor and stuttering performance, as X was hogging all of the CPU. Going back to my days with KnoppMyth we used to have issues with HD content playback, or viewing. To resolve this High X usage, we used nvidia-settings to disable "Sync to VBlank" This made a drastic performance increase, and allowed X to better manage the nvidia cards.

This is how to set that up in LMCE. All of the following commands are done as root, or as sudo user.

Go to the kde desktop via the option on the LMCE menu system. Once there use K Menu > System > Konsole to get up a terminal window, in that window do the following:

sudo -i
nvidia-settings

By changing to user root, you are put into root's home directory, and then the settings you are about to change will be saved there. This is important as all things run as user root in LMCE. You will be presented with Nvidia's control application:

Image:Nv-settings.png

Once in there, select the menu option "X Server XVideo Settings"

Image:Nv-settings2.png

Remove the tick from the "Sync to VBlank" box.

Image:Nv-settings3.png

This should also automatically take out the tick in the "OpenGL Settings" menu option as well, verify this by checking it out:

Image:Nv-settings4.png


After you accomplish these step, simply click "Quit" answer "Yes" and the application should exit. At this point you should be able to go back to LMCE and check the performance.

!!! note for users who require overscan settings: This can also be enabled, and tested in real time here while in the KDE desktop. Simply use the menu option entry for your viewing device, For my Big Screen TV this showed up as "CRT-0". If you need to make these changes, do this before exiting, we can use the same generated config file to load these settings as well!!!

Now that you have exited the program, you should have a file in /root called

.nvidia-settings-rc

This is the file we will load along with lmce_launch_manager.sh on boot, or reboot.

Now it is time to get this file to load persitantly on all reboots, and boots.

Again as user root:

sudo -i
vi /usr/pluto/bin/lmce_launch_manager.sh

You will see a line in there:

KDE_DEBUG=1

Before this line add the line:

/usr/bin/nvidia-settings --load-config-only &

This will invoke nvidia-settings to load your newly configured "nvidia-settings-rc"

That is it, you're done. Now go ahead and watch some tv, and from a remote session watch top, you will see your xorg is running at a much lower % of your cpu, and this will help in both SD and HD MythTV watching. It smoothed mine right out.

I also noticed that this definitely helps with UI2 blended and UI2 masked for much smoother transitions, and speed of navigation.

Please feel free to edit this page and correct any mistakes I may have made.