nouveau is the open source driver for nVidia graphics cards.
You need to activate the following kernel options:
Device Drivers ---> Graphics support ---> <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) ---> <*> Nouveau (nVidia) cards
Portage uses the variable
VIDEO_CARDS for enabling support for various graphics cards in packages. Setting
VIDEO_CARDS to nouveau will pull in the correct driver:
After setting this update the system using the following command so the changes take effect:
emerge --ask --changed-use --deep world
If you have the USE flag acl enabled globally and are using ConsoleKit (i.e you're using a Desktop profile) permissions to video cards will be handled automatically. You can check the permissions using getfacl:
getfacl /dev/dri/card0 | grep larry
A broader solution is to add the user you want to be able to access the video card to the video group:
gpasswd -a larry video
Note that you will still be able to run X without permission to the DRI subsystem, but usually not with acceleration enabled.
The X server is designed to work out-of-the-box, with no need to manually edit X.Org's configuration files. It should detect and configure devices such as displays, keyboards, and mice.
However, the main configuration file of the X server is the xorg.conf.
Multi Monitor Problems
If you're having problems with freezing with possible EDID probes when using dual monitors/displays, try adding "video=VGA-1:e" or "video=VGA-1:d" (enable or disable respectively) to your grub.cfg/grub2.cfg command line options, substituting the name of your monitor listed within dmesg or /var/log/Xorg.0.log. (ie. CRT-1, VGA-1, LVDS-1, DVI-1, ...)
I have a Dell Inspiron 8100 laptop with a connected external display connected via the laptop's external VGA port. My current command line is: "video=LVDS-1:1280x1024@60 video=VGA-1:1280x1024@60". Think the EDID (DRM) probe on the external VGA connected display is still causing freezing during nouveau/drm load, but at least it's usable if the display is connected after grub is loaded and prior to the nouveau/drm modules loading. And with the prior mentioned command line LVDS/VGA resolutions, the displays are cloned and centered with somewhat correct resolutions for cloned displays.
If you are using a laptop with NVIDIA's Optimus technology (usually found in laptops built in 2010 and later) then everything will be passed through your integrated graphics controller (usually Intel) before it gets to your discreet video card (NVIDIA), which can cause a lot of otherwise unexplained problems when enabled. There are a few ways to handle this, but the simplest is to disable Optimus through your BIOS (normally accessed by pressing F12 during boot). This will result in increased power consumption (decreased battery life, increased running temperature), as your NVIDIA card will now be handling all of the work all of the time.
I'd like to post something here about how to get Optimus working properly, but I haven't figured it out enough to do so. I would suggest looking into the kernel option "config_vga_switcheroo" and the Bumblebee project to start.
- nVidia/nvidia-drivers - Closed source binary driver for NVIDIA graphic cards.
- nouveau & nvidia-drivers switching
- Hprofile#VGA - Or go directly there for dynamic switching with a single kernel. Warning: PRIME (VGASwitcheroo forn Intel/nVidia Optimus GPU hardware should be supported and functionnal), well if there is a /sys/kernel/debug/vgaswitcheroo/switch file is all you need to get intel/nouveau switching. Or else, getting intel/nvidia-drivers dynamic switching is cheap. Just follow the instructions!