HOWTO: Get AMD/ATI or Nvidia Video Cards working in Sabayon
- 1 Kernel Upgrade (optional)
- 2 AMD - FGLRX to Open Source (radeon or AMDGPU)
- 3 NVIDIA
Kernel Upgrade (optional)
First things first! Update the database to make sure we have the most up to date package available! This will give us the most recent list of kernels and drivers.
[email protected] ~ $ su localhost root # equo update
Method 1 (kernel-switcher tool)
This method should automagically install the corresponding driver updates and addons such as the zfs mod.
Lets see what is available!
localhost root # kernel-switcher list
Find a kernel you wish to use, and switch!
localhost root # kernel-switcher switch linux-sabayon-4.1.7
Method 2 (Manual)
This method isn't better or worse than kernel-switcher. It just allows you to know exactly whats going on, what you are doing, and what is changing. This method doesn't automagically upgrade drivers or install addons such as virtualbox addons or the zfs mod.
localhost root # equo install sys-kernel/linux-sabayon localhost root # equo install sys-kernel/sabayon-sources
Now use eselect to set the soft links(shortcuts) to the proper libraries and files. eselect allows us to keep different libraries so we can switch without damaging the system by replacing important files.
First off we need to know which is our new kernel and bzimage
localhost root # eselect bzimage list localhost root # eselect kernel list
You should get something like this...
localhost root # eselect bzimage list Available kernel targets:  kernel-genkernel-x86_64-3.13.0-sabayon *  kernel-genkernel-x86_64-4.1.0-sabayon localhost root # eselect kernel list Available kernel symlink targets:  linux-3.13.0-sabayon  linux-4.1.0-sabayon * localhost root #
Now select the newer bzimage and kernel.
localhost root # eselect bzimage set 2 localhost root # eselect kernel set 2
Once your new kernel is installed reboot!
Once you have everything working you can remove the old kernel if you like. MAKE SURE YOU SELECT THE CORRECT KERNEL! Look using "equo search linux-sabayon" then copy and paste!
[email protected] ~ $ su localhost root # equo remove sys-kernel/linux-sabayon-3.13.11
AMD - FGLRX to Open Source (radeon or AMDGPU)
"Why" you ask? Besides the drivers not quickly supporting new Kernel releases, Open Source drivers are getting better all the time and AMD has announced plans to open source as much as possible. The majority of the drivers will be opensource while proprietary features will remain in a kernel agnostic binary blob. If you want to go full opensource, then the driver will hook into mesa for all rendering etc. If you want proprietary features, the same driver hooks into a binary blob. Same driver, different options. AMDGPU-PRO will basically be a full install of the opensource driver, but with binaries included. One source would be Phoronix.com . Currently AMDGPU-PRO isn't available to Gentoo in this BETA phase.
[email protected] ~ $ su localhost root # equo update localhost root # equo remove ati-drivers ati-userspace amdcccle localhost root # equo install xf86-video-ati xf86-video-amdgpu localhost root # eselect opengl set xorg-x11 localhost root # sed -i 's/nomodeset//g' /etc/default/grub localhost root # sed -i 's/nomodeset//g' /boot/grub/grub.cfg localhost root # sed -i 's/"blacklist radeon"//g' /etc/modprobe.d/blacklist.conf localhost root # rm -rf /etc/X11/xorg.conf
Newer versions of X11 do not require an xorg.conf file. If any special settings are required or wanted you can apply an override in /etc/X11/xorg.conf.d/
localhost root # vi /etc/X11/xorg.conf.d/30-Devices.conf
Now we can add typical xorg.conf configurations for the devices such as tearfree. This is typically for the more savvy.
Section "Device" Identifier "Card0" Driver "amdgpu" BusID "PCI:1:0:0" Option "TearFree" "True" Option "EnablePageFlip" "True" EndSection
If for some reason you don't have proprietary Nvidia drivers installed and you want them, there are simple steps to follow.
Available driver version
To get a list of all drivers for all kernels that are available:
$ equo search -qv nvidia-drivers
List of all drivers versions available for currently running kernel:
$ equo search -qv nvidia-drivers#$(uname -r)
Knowing what driver version you want to install (usually the newest, i.e. highest number version, it may differ if you have old card that needs older drivers):
Newest drivers for currently running kernel
localhost root # equo install --ask nvidia-driver#$(uname -r) nvidia-userspace
Will install newest driver available for currently running kernel.
Older drivers for currently running kernel
List Nvidia drivers for your current kernel (insturctions above), and install it along with corresponding nvidia-userspace, e.g.:
localhost root # equo install --ask nvidia-drivers-304.108#$(uname -r) nvidia-drivers-304.108
Block nouveau driver
For Nvidia drivers to work properly nouveau can't be loaded. Thus, it must be blocked.
localhost root # echo blacklist nouveau >> /etc/modprobe.d/blacklist.conf
Set Nvidia drivers as active
localhost root # eselect opengl set nvidia