Skip to content

Latest commit

 

History

History
129 lines (84 loc) · 6.13 KB

nvidia.mdwn

File metadata and controls

129 lines (84 loc) · 6.13 KB

Nvidia

Legacy nvidia hardware not supported

The nvidia "unified" driver unfortunately doesn't have support for "legacy" nvidia hardware. In this case, with some luck, Xorg will default to the nouveau driver. I would be ideal if someone could confirm their old legacy nvidia hardware does indeed correctly fall back to the nouveau driver, because I can't test this.

It's not reasonable for Webconverger developers to support proprietary acceleration on "legacy" nvidia cards since:

  1. I don't have any such hardware to develop with
  2. New Xorg 1.12 have a new API, which the legacy drivers will not be ported to

You can tell if your nvidia is considered a legacy device by looking up the ids on: https://github.com/Webconverger/webc/tree/master/usr/share/nvidia

nvidia sanity testing on linux

These files should be in use:

/dev/nvidia0
/usr/lib/libnvidia-glcore.so.302.17
/usr/lib/nvidia/current/libGL.so.302.17
/usr/lib/nvidia/current/libglx.so.302.17
/usr/lib/nvidia/current/nvidia_drv.so
/usr/lib/nvidia/diversions/libglx.so
/usr/lib/tls/libnvidia-tls.so.302.17

http://static.dabase.com/fps is a simple WebGL FPS test

Hardware setups

  1. Plugged directly into nvidia card - rare on desktop kiosk deployments, should not happen on laptops equipped with nvidia acceleration in "optimus" setups
  2. Optimus type setups, display connected by VGA and not directly into nvidia card

Currently from 14.1 only case 2 is supported.

Typical issues:

nVidia integration guide

There are two parts to integrating the proprietary nvidia driver:

  1. the nvidia kernel
  2. the matching nvidia driver component

Setting up the development environment on the target machine

To update the drivers, it's best to work from a live chroot on the target machine, so boot into debug mode and mount -o remount /tmp in order to remove the "noexec" [[security]] flag.

# apt-get update
# mkdir -p /var/cache/apt/archives/ /var/lib/dpkg/info
# apt-get install linux-headers-3.2.0-2-artax1-486 build-essential

Despite the numerous apt complaints, the files are installed. It's just that all the /var/lib/dpkg/info listings have been removed in a commit to save space.

Taking screenshots are pretty useful. I recommend apt-get install scrot dmenu and then taking a screen shot by using alt+p keystroke and typing scrot /tmp/a-clever-name.png.

nvidia FTP

Next you need to download the latest nvidia driver package from their ftp site: ftp://download.nvidia.com/XFree86/Linux-x86/

I usually copy the link and wget it into /tmp. This version should be later than modinfo nvidia | grep version:, else you are probably wasting your time.

/tmp# sh ./NVIDIA*.run -x

Building the nvidia kernel module

Using the Archlinux nvidia packaging as a guide.

/tmp/NVIDIA-whatever/kernel# make module
/tmp/NVIDIA-whatever/kernel# make install

The install should simply move the nvidia.ko to the right place in /lib/modules/blah-blah/kernel/drivers/video/nvidia.ko as the original commit did.

/tmp/NVIDIA-whatever/kernel# git status

To double check that there is a modified: ..../nvidia.ko line

Installing the matching nvidia driver component

Using nvidia-installer.log as a guide to running ./nvidia-installer, install the accompanying drivers. Keep to the defaults with the dialog prompts.

Now pkill X and X will fail to restart. Go to another tty like ctrl+alt+f3 and login as root to gain a shell. Now rmmod nvidia should now cause the system to insert the replacement nvidia.ko and X should just boot up again.

Confirm this is indeed the case with modinfo nvidia | grep version:

Dealing with [[Adobe]] issues

Red&blue are indeed inverted on nvidia

As the discussion documents, you might notice [[adobe_flash|adobe]] with:

  1. Blue instead of yellow colours aka the smurf bug
  2. Instabilities

The solution is to patch VDPAU or look at the wonderful Archlinux wiki on browser plugins

The fix is introduced in https://github.com/Webconverger/webc/commit/9eba0e05b1dc900a90b997ae4a25e68f5f02f499 for example.

Contributing back

Since the rootfs is under git, you can can create a commit carefully by only adding files relevant to your change and then run git format-patch origin to create a encapsulated patch. To send the patch to developers at Webconverger I recommend uploading it to your Web space and providing a URL to it and posting to webc-users about it.

Remember your contribution must be MIT licensed. [[Thank_you|acknowledgements]]!