Difference between revisions of "HOWTO: Get AMD/ATI or Nvidia Video Cards working in Sabayon"

From Sabayon Wiki
Jump to: navigation, search
(shift an added section to below a rule under the Nvidia section, and improve formatting.)
 
m
 
(92 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{I18n| [[HOWTO:_Get_Ati_or_Nvidia_Video_Cards_working_in_Sabayon|en]] [[Pl:HOWTO:_Instalacja_sterowników_NVIDIA_w_Sabayon_Linux|pl]]}}
 
{{I18n| [[HOWTO:_Get_Ati_or_Nvidia_Video_Cards_working_in_Sabayon|en]] [[Pl:HOWTO:_Instalacja_sterowników_NVIDIA_w_Sabayon_Linux|pl]]}}
  
{{Warning| '''This page is out of date?, misleading and potentially dangerous to your system.  Use equo to install the driver package you need (eg ati-drivers or nvidia-drivers) and kernel-switcher for future updates to your kernel.  '''}}
 
{{Warning| '''Portage (emerge) is not the primary package manager for Sabayon, this article is for advanced users only. In other words if this fails for you, its your fault. You have been warned.'''}}
 
=== Kernel Source Patchset Version Note===
 
Portage has numerous versions of the Linux kernel source. The most common ones used in Sabayon are gentoo-sources and sabayon-sources. gentoo-sources consists of the default Linux Kernel with the Gentoo patchset and works well for most Gentoo and Sabayon users. sabayon-sources of the default Linux Kernel with the Gentoo patchset  and the Sabayon patchset to add better but slightly more experimental support for the latest SATA or PATA , wireless and other emergent drivers.
 
  
Valid kernelname parameters include sabayon , gentoo, hardened , rsbac , ppa, mips, sh, sparc, xbox , and numerous others.
+
{{Warning| '''SUPPORTED AMD HARDWARE'''
Most users will use the first two, for more information about different Linux kernel sources provided in Portage see the Gentoo Linux Kernel Guide at http://www.gentoo.org/doc/en/gentoo-kernel.xml.
+
FGLRX is currently being deprecated. AMDGPU is the new platform. Devices not supported by AMDGPU will be supported by radeon. AMDGPU-PRO is in BETA and currently only supported on .deb and .rpm distributions during the BETA.  
== ATI ==
+
}}
 
+
# Identify whether you have the linux kernel sources installed. In root shell type ''' emerge ''kernelname''-sources -pv  ''', if already installed go to next step otherwise type '''emerge =sys-kernel/''kernelname''-sources-2.6.''kernelversion'' ''' (kernel version can be identified by typing '''uname -r ''' or '''uname -a''')
+
# If not using genkernel ensure your kernel configuration supports your video card (gentoo-wiki.com has more information)
+
# In a root shell type '''emerge ati-drivers '''
+
# Optionally install the ati control panel by typing '''emerge ati-drivers-extra ''' on x86 systems.
+
# In a root shell type ''' env-update && source /etc/profile '''
+
# Load the ATI module and change configuration by typing (still in a root shell) '''modprobe fglrx && eselect opengl set ati '''
+
# Update your xorg.conf file manually (change Driver "radeon" or "vesa" to "fglrx") or by typing '''/opt/ati/bin/aticonfig --initial --input=/etc/X11/xorg.conf ''' (still in a root shell)
+
# Restart X ('''/etc/init.d/xdm restart''' from a root shell)
+
# If X doesn't work please pastebin the contents of /var/log/Xorg.0.log and possibly /etc/X11/xorg.conf and check #Sabayon, the Sabayon Forums or gentoo-wiki.com, If it does, in root shell type '''glxinfo | grep direct ''', if this says Yes then continue to next step
+
# Using Google or other means identify whether your card works best with XGL or AIGLX or neither.
+
# Using  accel-manager which will need to be emerged by typing (still in a root shell) '''emerge accel-manager '''), choose your preferred method XGL or AIGLX. Or if neither ignore this step.
+
# Repeat Step 8
+
# You should now have a working ATI card with DRI and if you choose XGL or AIGLX. If you some reason you don't please use the resources in the Forum Usage & Resources Post in Sabayon Forums to remedy the problem. These resouces include http://gentoo-wiki.com/Ati . It would be beneficial if you repeat Step 9 as part of the troubleshooting process.
+
  
For removing black borders with ATI cards see http://www.sabayonlinux.org/wiki/index.php?title=Black_borders_around_windows_fix_%28ATI%29
+
= <span style="color:BLUE">Kernel Upgrade (optional)</span> =
  
== NVIDIA ==
+
==Repository Database Update==
# In root shell '''emerge kernelname-sources -pv ''', if already installed go to next step otherwise type '''emerge =kernelname-sources-2.6.kernelversion ''' (kernel version can be identified by typing '''uname -r ''' or '''uname -a ''')
+
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.
# If not using genkernel ensure your kernel configuration supports your video card (gentoo-wiki.com has more information)
+
# In root shell type '''emerge nvidia-drivers''' (Most older cards need a version that is 97.00 or lower.  Add >=x11-drivers/nvidia-drivers-97.00 to your /etc/portage/package.mask file before emerging.  i.e.  '''echo \>=x11-drivers/nvidia-drivers-97.00 >> /etc/portage/package.mask''' before you emerge nvidia-drivers'') --[[User:Megaman5|Megaman5]] 01:58, 24 March 2008 (UTC)
+
# Edit etc/X11/xorg.conf and change the Driver option under Device from nv or vesa to nvidia, also ensure the the Load glx line is uncommented in the Module Section
+
# In a root shell type '''eselect opengl set nvidia '''
+
# Make sure your user is in the video group by typing '''gpasswd -a youruser video ''' in a root shell.
+
# Restart X
+
# If X doesn't work please pastebin the contents of /var/log/Xorg.0.log and possibly /etc/X11/xorg.conf and check #Sabayon, the Sabayon Forums or gentoo-wiki.com, If it does, in root shell type glxinfo | grep direct, if this says Yes then continue to next step
+
# Using Google or other means identify whether your card works best with XGL or AIGLX or neither.
+
# Using accel-manager which will need to be emerged by typing (still in a root shell) '''emerge accel-manager''', choose your preferred method XGL or AIGLX. Or if neither ignore this step.
+
# Repeat Step 7
+
# You should now have a working NVIDIA card with DRI and if you choose XGL or AIGLX. If you some reason you don't please use the resources in the Forum Usage & Resources Post in Sabayon Forums to remedy the problem.These resouces include http://gentoo-wiki.com/HOWTO_nVidia_Drivers. It would be beneficial if you repeat Step 8 as part of the troubleshooting process.
+
  
----
+
{{Console| <pre class="clear">
To Install Nvidia Accelerated drivers (closed blob) for more recent video cards, e.g. 520GT, follow these steps in order:
+
[email protected] ~ $ su
   
+
localhost root # equo update
Firstly, attempt to discover the kernel revision your sabayon install is currently using, you can achieve this by opening an instance of a command line interface or Terminal emulator and type in this instruction into the terminal:
+
</pre>}}
uname -a
+
   
+
You should see from the very beginning of the screen (far left of the screen, in the terminal box) your host name which will say: Linux,  and the name you gave your PC, during the installation of sabayon. Next you will see the kernel version and then it's description... which should resemble something like this:
+
[3.2.0-sabayon #1 SMP]
+
   
+
Using this information, use either Sulfur (GUI) or equo (command line) installer and search for the correct revision that suits your graphics card and kernel version that we have just discovered. This case we will want to install the Nvidia 290.xx driver that matches the kernel which is 3.2.0-sabayon #1 SMP
+
   
+
Before we install, we want to make sure that there are no possible driver conflicts
+
   
+
For example: while I was learning this, the ATI fglrx (closed blob for ATI cards) driver was installed, along side nouveau(open sourced nvidia driver), plus the eselect program was pointed to the ATI driver, which did not help matters much...
+
   
+
You can detect if they are installed or not by typing in a root terminal by typing either "su root" (without quotes) followed by your username and pass or "sudo equo" (without quotes) search ATI and repeat the process for nouveau.
+
   
+
If you find either offending package, just type "equo remove ati-drivers" and/or "xf86-video-nouveau" (without quotes)
+
   
+
Once you found the correct version and type of graphic drivers you will ether need to right click on the driver package in Sulfur, then select install or alternatively type in "equo install nvidia-drivers-295.20#3.2.0-sabayon" (without quotes)
+
   
+
This will download, install and compile the modules into the kernel, but you will have to setup the last two bits yourself.
+
   
+
Follow these last two steps to complete the process:
+
Not doing these can cause your system to freeze, lock up and have a blank screen if not completed properly, if you choose to run a game or use your card's accelerated features!
+
   
+
In a root terminal type:
+
eselect opengl set nvidia
+
  
Make sure your user is in the video group by typing "gpasswd -a <username> video" (without quotes, replace <username> with your username e.g. gpassword -a mike video) in a terminal as root.
+
== 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!
 +
{{Console| <pre class="clear">
 +
localhost root # kernel-switcher list
 +
</pre>}}
 +
 
 +
Find a kernel you wish to use, and switch!
 +
{{Console| <pre class="clear">
 +
localhost root # kernel-switcher switch linux-sabayon-4.1.7
 +
</pre>}}
 +
 
 +
== 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.
 +
{{Console| <pre class="clear">
 +
localhost root # equo install sys-kernel/linux-sabayon
 +
localhost root # equo install sys-kernel/sabayon-sources
 +
</pre>}}
 +
 
 +
 
 +
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
 +
 
 +
{{Console| <pre class="clear">
 +
localhost root # eselect bzimage list
 +
localhost root # eselect kernel list
 +
</pre>}}
 +
 
 +
 
 +
You should get something like this...
 +
 
 +
{{Console| <pre class="clear">
 +
localhost root # eselect bzimage list
 +
Available kernel targets:
 +
  [1]  kernel-genkernel-x86_64-3.13.0-sabayon *
 +
  [2]  kernel-genkernel-x86_64-4.1.0-sabayon
 +
localhost root # eselect kernel list
 +
Available kernel symlink targets:
 +
  [1]  linux-3.13.0-sabayon
 +
  [2]  linux-4.1.0-sabayon *
 +
localhost root #
 +
</pre>}}
 +
 
 +
 
 +
Now select the newer bzimage and kernel.
 +
 
 +
{{Console| <pre class="clear">
 +
localhost root # eselect bzimage set 2
 +
localhost root # eselect kernel set 2
 +
</pre>}}
 +
 
 +
 
 +
<span style="color:RED">Once your new kernel is installed reboot!</span>
 +
 
 +
==Clean (optional)==
 +
 
 +
Once you have everything working you can remove the old kernel if you like.
 +
<span style="color:red; font-weight=bold;">MAKE SURE YOU SELECT THE CORRECT KERNEL! Look using "equo search linux-sabayon" then copy and paste!</span>
 +
 
 +
{{Console| <pre class="clear">
 +
[email protected] ~ $ su
 +
localhost root # equo remove sys-kernel/linux-sabayon-3.13.11
 +
</pre>}}
 +
 
 +
= <span style="color:RED">TEAM RED - AMD</span> =
 +
 
 +
==FGLRX to Open Source (radeon or AMDGPU)==
 +
 
 +
{{Note| '''SED'''
 +
In these instructions you'll notice the sed command. This may make some people leary as not everyone understands this command. "sed" stands for "stream editor". It can edit the edit file for you by substituting lines, words, strings, etc. In this case we are using it to remove a line in blacklist.conf and nomodeset command in grub config files.
 +
 
 +
If you don't feel fully comfortable about this command. Back up your file or use nano (vi etc.) to edit the file!
 +
}}
 +
 
 +
 
 +
"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. Currently AMDGPU-PRO isn't available to Gentoo in this BETA phase.
 +
 
 +
{{Console| <pre class="clear">
 +
[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
 +
</pre>}}
 +
 
 +
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/
 +
 
 +
{{Console| <pre class="clear">
 +
localhost root # vi /etc/X11/xorg.conf.d/30-Devices.conf
 +
</pre>}}
 +
 
 +
Now we can add typical xorg.conf configurations for the devices such as tearfree. This is typically for the more savvy.
 +
 
 +
{{Console| <pre class="clear">
 +
Section "Device"
 +
Identifier "Card0"
 +
Driver "amdgpu"
 +
BusID "PCI:1:0:0"
 +
Option "TearFree" "True"
 +
Option "EnablePageFlip" "True"
 +
EndSection
 +
</pre>}}
 +
 
 +
 
 +
 
 +
= <span style="color:green">TEAM GREEN - NVIDIA</span> =
 +
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:
 +
{{Console| <pre class="clear">$ equo search -qv nvidia-drivers</pre>}}
 +
 
 +
List of all drivers versions available for currently running kernel:
 +
{{Console| <pre class="clear">$ equo search -qv nvidia-drivers#$(uname -r)</pre>}}
 +
 
 +
== Installation  ==
 +
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 ===
 +
{{Console| <pre class="clear">localhost root # equo install --ask nvidia-driver#$(uname -r) nvidia-userspace</pre>}}
 +
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.:
 +
{{Console| <pre class="clear">localhost root # equo install --ask nvidia-drivers-304.108#$(uname -r) nvidia-drivers-304.108</pre>}}
 +
 
 +
== Block nouveau driver ==
 +
For Nvidia drivers to work properly nouveau can't be loaded. Thus, it must be blocked.
 +
 
 +
{{Console| <pre class="clear">localhost root # echo blacklist nouveau >> /etc/modprobe.d/blacklist.conf </pre>}}
 +
 
 +
== Set Nvidia drivers as active ==
 +
{{Console| <pre class="clear">localhost root # eselect opengl set nvidia</pre>}}
  
 
[[Category:Graphics|Get Ati or Nvidia Video Cards working in Sabayon]]
 
[[Category:Graphics|Get Ati or Nvidia Video Cards working in Sabayon]]

Latest revision as of 03:44, 13 November 2016

i18n: en pl


Stop.png
SUPPORTED AMD HARDWARE

FGLRX is currently being deprecated. AMDGPU is the new platform. Devices not supported by AMDGPU will be supported by radeon. AMDGPU-PRO is in BETA and currently only supported on .deb and .rpm distributions during the BETA.

Kernel Upgrade (optional)

Repository Database Update

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:
  [1]   kernel-genkernel-x86_64-3.13.0-sabayon *
  [2]   kernel-genkernel-x86_64-4.1.0-sabayon
localhost root # eselect kernel list
Available kernel symlink targets:
  [1]   linux-3.13.0-sabayon
  [2]   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!

Clean (optional)

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

TEAM RED - AMD

FGLRX to Open Source (radeon or AMDGPU)

Question.png
SED

In these instructions you'll notice the sed command. This may make some people leary as not everyone understands this command. "sed" stands for "stream editor". It can edit the edit file for you by substituting lines, words, strings, etc. In this case we are using it to remove a line in blacklist.conf and nomodeset command in grub config files.

If you don't feel fully comfortable about this command. Back up your file or use nano (vi etc.) to edit the file!


"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. 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


TEAM GREEN - NVIDIA

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)

Installation

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