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

From Sabayon Wiki
Jump to: navigation, search
m (Roll Back)
(AMD APU + AMD PCI-E Graphics)
 
(78 intermediate revisions by 5 users not shown)
Line 2: Line 2:
  
  
= AMD =
+
{{Warning| '''SUPPORTED AMD HARDWARE'''
 +
 
 +
FGLRX only covers HD5XXX series and higher. The r600-HD4xxx require Open Source Drivers. This guide doesn't cover hybrid (i.e. intel-ati on many new laptops) as I don't have one to test on.
 +
}}
 +
 
 +
 
 +
= <span style="color:BLUE">Kernel Upgrade (optional)</span> =
 +
 
 +
== 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-3.14.0-sabayon
 +
localhost root # eselect kernel list
 +
Available kernel symlink targets:
 +
  [1]  linux-3.13.0-sabayon
 +
  [2]  linux-3.14.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>
 +
 
 +
 
 +
 
 +
= <span style="color:green">AMD - New Sabayon install w/FGLRX</span> =
 +
 
 +
Upon booting your Live Disc, you will notice a GRUB screen that varies based on UEFI and NON-UEFI.
 +
 
 +
- UEFI -
 +
      Select "Advanced Options"
 +
      Select "Disable Kernel Mode Settings (for AMD Radeon GPUs with FGRLX)"
 +
      Boot Live Disc
 +
 
 +
- NON-UEFI -
 +
      Press F5 for "Other Options"
 +
      Select "nomodeset"
 +
      Boot Live Disc
 +
 
 +
 
 +
= <span style="color:green">AMD APU + AMD PCI-E Graphics</span> =
 +
 
 +
Found a hiccup with graphics detections and Sabayon installation. Getting stuck at root login shell?
 +
 
 +
Yeah, it has to do with having 2 Graphic Cards, APU + PCI-E. You have the APU disabled in BIOS you say?
 +
 
 +
This mainly happens with fglrx installations.
 +
 
 +
{{Console| <pre class="clear">
 +
sabayon ~ # lspci
 +
---cut---
 +
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Kaveri [Radeon R7 Graphics]
 +
---cut---
 +
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Fiji XT [Radeon R9 FURY X] (rev ca)
 +
</pre>}}
 +
 
 +
 
 +
Sometimes it doesn't matter. Pending on the motherboard, the hardware is still attached (its part of the CPU!) and seen, thus detected and configured as such. This detects both cards and populates them in order seen then assigns them separate "screens" in xorg.conf or only sets up the first card seen.
 +
 
 +
The APU is first on the PCI-E bus making it "primary". Fret not! We've got your back. Until an automatic solution is found I give you the fix!
 +
 
 +
 
 +
{{Console| <pre class="clear">
 +
sabayon ~ # nano /etc/X11/xorg.conf
 +
</pre>}}
 +
 
 +
 
 +
The solution is to swap "BusID" in the "Device" Sections essentially swapping "Primary" and "Secondary" Cards.
 +
 
 +
<span style="color:red">FROM:</span>
 +
{{Console| <pre class="clear">
 +
Section "Device"
 +
    Identifier "SabayonVga0"
 +
    Driver    "fglrx"
 +
    BusID      "PCI:00:01"
 +
---cut--
 +
EndSection
 +
 
 +
Section "Device"
 +
    Identifier "SabayonVga1"
 +
    Driver    "fglrx"
 +
    BusID      "PCI:01:00"
 +
---cut--
 +
EndSection
 +
</pre>}}
 +
 
 +
 
 +
<span style="color:red">TO:</span>
 +
{{Console| <pre class="clear">
 +
Section "Device"
 +
    Identifier "SabayonVga0"
 +
    Driver    "fglrx"
 +
    BusID      "PCI:01:00"
 +
---cut--
 +
EndSection
 +
 
 +
Section "Device"
 +
    Identifier "SabayonVga1"
 +
    Driver    "fglrx"
 +
    BusID      "PCI:00:01"
 +
---cut--
 +
EndSection
 +
</pre>}}
 +
 
 +
 
 +
 
 +
Now! That should fix the graphics card confusion, but you still need to get into the GUI right? Simple!
 +
 
 +
Just replace sddm with whichever desktop manager you use such as gdm(Gnome), lightdm(other), lxdm.
 +
 
 +
{{Console| <pre class="clear">
 +
sabayon ~ # equo i lightdm
 +
sabayon ~ # systemctl disable -f sddm
 +
sabayon ~ # systemctl enable lightdm
 +
</pre>}}
 +
 
 +
{{Warning| '''NEED TO KNOW'''
 +
 
 +
This Fix will work to get you into the GUI from disk to Install Sabayon. After install you may have to perform this fix one more time once booting from HDD, as this fix isn't copied over to the HDD during install. You will not need to perform this fix everytime. Once to get to installer, then once to setup the installed OS.
 +
}}
 +
 
 +
= <span style="color:green">AMD - FGLRX to Open Source</span> =
 +
 
 +
"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 new plan (drivers after "catalyst omega"), is to create an open source driver with hooks. 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 driver hooks into the blob. Same driver, different options. One source would be [[ http://www.phoronix.com/scan.php?page=article&item=amd_catalyst_kernel&num=1 | Phoronix.com ]]
 +
 
 +
Its very similar to the "Roll back" in the following section with a couple differences.
 +
 
 +
{{Console| <pre class="clear">
 +
user@localhost ~ $ su
 +
localhost root # equo update
 +
localhost root # equo remove ati-drivers ati-userspace amdcccle
 +
localhost root # equo install xf86-video-ati
 +
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/"fgrlx"/"ati"/g' /etc/X11/xorg.conf
 +
</pre>}}
 +
 
 +
Reboot and enjoy!
 +
 
 +
= <span style="color:green">AMD - Open Source to FGLRX</span> =
 +
 
 +
{{Warning| '''CROSSFIRE'''
 +
 
 +
Do you have an AMD system? Do you have IOMMU enabled? Crossfire currently DOES NOT WORK when IOMMU is enabled. You will need to make sure it it disabled in the BIOS. There is a catch, if you system was setup with IOMMU enabled, your linux setup may depend on IOMMU for your inputs meaning your Keyboard and Mouse could quit responding in Linux if you disable IOMMU.
 +
 
 +
Re-enabling IOMMU would bring them back, but CROSSFIRE will refuse to work. You may end up requiring re-installing or repairing your install with IOMMU disabled to get Crossfire.  Why is Windows not affected by this option you ask? IOMMU is strictly a Linux option/enhancement. Windows has a dummy driver which ignores IOMMU entirely.
 +
 
 +
Rumor has it a newer version of IOMMU to work with HSA will resolve this issue in the future.
 +
}}
  
(UPDATED 5.5.13 Thanks to anomaly65) https://forum.sabayon.org/viewtopic.php?f=56&t=28808
 
  
{{Warning| ''' This only covers HD5XXX series and higher. The r600-HD4xxx are on hold due to other portions of system incompatibility. This doesn't cover hybrid (i.e. intel-ati on many new laptops) as I don't have one to test on '''}}
 
  
 
== Prepare ==
 
== Prepare ==
Line 13: Line 205:
 
{{Console| <pre class="clear">
 
{{Console| <pre class="clear">
 
user@localhost ~ $ su
 
user@localhost ~ $ su
localhost user # equo update --force
+
localhost root # equo update --force
localhost user # equo remove ati-drivers
+
localhost root # equo remove ati-drivers
localhost user # equo remove xf86-video-ati
+
localhost root # equo remove xf86-video-ati
localhost user # equo remove x11-base/xorg-drivers
+
localhost root # echo "blacklist radeon" >> /etc/modprobe.d/blacklist.conf
localhost user # equo remove --configfiles xf86-video-ati
+
localhost user # echo "blacklist radeon" >> /etc/modprobe.d/blacklist.conf
+
 
</pre>}}
 
</pre>}}
 +
 +
If your radeon module is still loaded after boot and its blacklisted, look into '''/etc/conf.d/modules''' to see if it is listed in the modules line and make sure grub is booting with nomodeset(below).
  
  
Line 25: Line 217:
  
 
{{Console| <pre class="clear">
 
{{Console| <pre class="clear">
localhost user # nano /etc/default/grub
+
localhost root # nano /etc/default/grub
 
</pre>}}
 
</pre>}}
 
  
 
==Editing /etc/default/grub==
 
==Editing /etc/default/grub==
Line 35: Line 226:
 
     # Copyright 1999-2012 Gentoo Foundation
 
     # Copyright 1999-2012 Gentoo Foundation
 
     # Distributed under the terms of the GNU General Public License v2
 
     # Distributed under the terms of the GNU General Public License v2
     # $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/files/grub.default-2,v 1.2 2012/06/28 22:36:53 floppym Exp $
+
     # $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/files/grub.default-2,v 1.2 201$
 
     #
 
     #
 
     # To populate all changes in this file you need to regenerate your
 
     # To populate all changes in this file you need to regenerate your
Line 43: Line 234:
 
     # See the grub info page for documentation on possible variables and
 
     # See the grub info page for documentation on possible variables and
 
     # their associated values.
 
     # their associated values.
 +
   
 
     GRUB_DEFAULT=saved
 
     GRUB_DEFAULT=saved
     GRUB_DISTRIBUTOR="Sabayon"
+
     GRUB_DISTRIBUTOR="Sabayon Linux 15.08"
 
      
 
      
 +
    GRUB_DEFAULT=0
 
     GRUB_HIDDEN_TIMEOUT=0
 
     GRUB_HIDDEN_TIMEOUT=0
 
     GRUB_HIDDEN_TIMEOUT_QUIET=true
 
     GRUB_HIDDEN_TIMEOUT_QUIET=true
 
     GRUB_TIMEOUT=5
 
     GRUB_TIMEOUT=5
    GRUB_DISABLE_LINUX_UUID=true
 
 
      
 
      
     GRUB_CMDLINE_LINUX_DEFAULT=""
+
     GRUB_CMDLINE_LINUX_DEFAULT="<span style="color:red">nomodeset</span> quiet splash"
    GRUB_CMDLINE_LINUX="<span style="color:red">nomodeset</span>"
+
    GRUB_CMDLINE_LINUX=""
 
      
 
      
 
     # Uncomment to disable graphical terminal (grub-pc only)
 
     # Uncomment to disable graphical terminal (grub-pc only)
Line 58: Line 250:
 
      
 
      
  
==Install==
+
Populate the changes
  
Now install new kernel and drivers.
 
   
 
 
{{Console| <pre class="clear">
 
{{Console| <pre class="clear">
localhost user # equo install sys-kernel/linux-sabayon
+
localhost root # grub2-mkconfig -o /boot/grub/grub.cfg
localhost user # equo install sys-kernel/sabayon-sources
+
localhost user # equo install x11-drivers/ati-drivers amdcccle
+
 
</pre>}}
 
</pre>}}
  
  
Now use eselect to set the soft links(shortcuts) to the proper libraries and files.
+
==Install==
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
 
  
 +
OK, lets install the drivers and set the links to the GL libraries.   
 
{{Console| <pre class="clear">
 
{{Console| <pre class="clear">
localhost user # eselect bzimage list
+
localhost root # equo install --bdeps x11-drivers/ati-drivers-15.9-r1#$(uname -r) ati-userspace amdcccle
localhost user # eselect kernel list
+
localhost root # eselect opengl set ati
 +
localhost root # eselect opencl set amd
 
</pre>}}
 
</pre>}}
  
  
You should get something like this...
+
Need an updated or new xorg.conf? If you weren't using fglrx before then... yes.
  
{{Console| <pre class="clear">
+
Newer versions of X11 do not require an xorg.conf file, but may not load fgrlx drivers.
localhost user # eselect bzimage list
+
Available kernel targets:
+
  [1]  kernel-genkernel-x86_64-3.8.0-sabayon *
+
  [2]  kernel-genkernel-x86_64-3.9.0-sabayon
+
localhost user # eselect kernel list
+
Available kernel symlink targets:
+
  [1]  linux-3.8.0-sabayon
+
  [2]  linux-3.9.0-sabayon *
+
localhost user #
+
</pre>}}
+
  
 +
creating an xorg.conf file and forcing X11 to use it to override auto-detection can help.
  
Now select the newer bzimage and kernel and switch to the AMD/ATI libraries.
+
Backup old (if one exists) and update.
 
+
 
{{Console| <pre class="clear">
 
{{Console| <pre class="clear">
localhost user # eselect bzimage set 2
+
localhost root # cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
localhost user # eselect kernel set 2
+
localhost root # /opt/bin/aticonfig --initial
localhost user # eselect opencl set amd
+
localhost root # X -config /etc/X11/xorg.conf
localhost user # eselect opengl set ati
+
</pre>}}
+
 
+
 
+
Need an updated or new xorg.conf? If you weren't using fglrx before then... yes.
+
Backup old and update.
+
 
+
{{Console| <pre class="clear">
+
localhost user # cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
+
localhost user # /opt/bin/aticonfig --initial
+
 
</pre>}}
 
</pre>}}
  
 
OK now reboot!
 
OK now reboot!
 +
 +
{{Note| '''--bdeps'''
 +
build time dependencies are REQUIRED!
 +
aticonfig and amdcccle tools will segfault
 +
upon use without build time dependencies.
 +
}}
  
 
==Configure==
 
==Configure==
  
Once you login and decide you want to set resolutions and extra settings open amdcccle.
+
Once you login and decide you want to set resolutions and extra settings, open amdcccle.
  
 
{{Console| <pre class="clear">
 
{{Console| <pre class="clear">
 +
user@localhost ~ $ xhost +
 
user@localhost ~ $ kdesu /opt/bin/amdcccle
 
user@localhost ~ $ kdesu /opt/bin/amdcccle
 
</pre>}}
 
</pre>}}
 +
 +
{{Note| '''xhost command'''
 +
Are you getting the error below when using a sudo-like tool for a GUI application?
 +
 +
 +
No protocol specified
 +
xhost:  unable to open display ":0.0"
 +
 +
 +
There has been some security work done to prevent this. Using the xhost command above you can
 +
temporarily disable access control for X allowing kdesu,gksu, and sudo for X applicaions to work.
 +
 +
}}
  
 
==Clean (optional)==
 
==Clean (optional)==
Line 130: Line 318:
 
{{Console| <pre class="clear">
 
{{Console| <pre class="clear">
 
user@localhost ~ $ su
 
user@localhost ~ $ su
localhost user # equo remove sys-kernel/linux-sabayon-3.8.10
+
localhost root # equo remove sys-kernel/linux-sabayon-3.13.11
 
</pre>}}
 
</pre>}}
 
  
 
==Roll Back==
 
==Roll Back==
Line 144: Line 331:
  
 
With your computer powered off, connect the computer to the internet via a cable and then press the power button.  
 
With your computer powered off, connect the computer to the internet via a cable and then press the power button.  
When you reach the Grub selection screen press an arrow key to halt the timer and go to the kernel you would
+
When you reach the Grub selection screen press an arrow key to halt the timer and select the "Advanced Options....".
like to boot from. Press 'e' on that line and it will take you to edit the grub commands before booting.
+
Then you will select the option with "(Recovery Mode)"
<span style="color:red">This is a temporary grub edit, it will revert after reboot!</span>
+
  
At the end of the "linux" line add the option "nox"
+
This will take you through the normal boot process, then will put you at a CLI screen and request the root password.
 
+
Enter the root password and you will be brought into a terminal as root!
    linux  /boot/kernel-genkernel-x86_64-3.9.0-sabayon ro  init=/linuxrc splash=silent,theme:sabayon
+
    video=vesafb:ywrap,mtrr:3 vga=791 gfxpayload=1024x768x16 console=tty1 quiet dokeymap keymap=us
+
    domdadm root=UUID=787202b0-a5d2-4e03-aeb6-569bafef6de0 docrypt <span style="color:red">nox</span>
+
 
+
Now press F10 to boot with the new command.
+
 
+
This will take you through the normal boot process, then will put you at a CLI login screen.
+
 
+
You can either
+
# login as root
+
# login as user then su
+
  
 
Now to start putting things back!
 
Now to start putting things back!
  
 
{{Console| <pre class="clear">
 
{{Console| <pre class="clear">
localhost user # equo update
+
localhost root # equo update
localhost user # equo remove ati-drivers amdcccle
+
localhost root # equo remove ati-drivers ati-userspace amdcccle
localhost user # equo install xf86-video-ati
+
localhost root # equo install xf86-video-ati
localhost user # equo install x11-base/xorg-drivers
+
localhost root # eselect opengl set xorg-x11
localhost user # eselect opengl set xorg-x11
+
localhost root # sed -i '/blacklist radeon/d' /etc/modprobe.d/blacklist.conf
localhost user # sed -i '/blacklist radeon/d' /etc/modprobe.d/blacklist.conf
+
localhost root # sed -i 's/nomodeset//g' /etc/default/grub
localhost user # sed -i 's/\<nomodeset\>//g' /etc/default/grub
+
localhost root # cp /etc/X11/xorg.conf.bak /etc/X11/xorg.conf
localhost user # cp /etc/X11/xorg.conf.bak /etc/X11/xorg.conf
+
 
</pre>}}
 
</pre>}}
  
Line 185: Line 359:
 
}}
 
}}
  
= NVIDIA =
+
= <span style="color: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.
  
{{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.'''}} 
+
== Update package database ==
  
{{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.'''}}  
+
First thing is to make sure that package database is up to date.
 +
{{Console| <pre class="clear"># equo update --force</pre>}}
  
# 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 ''')
+
== Available driver version ==
# 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.
+
  
----
+
To get a list of all drivers for all kernels that are available:
To Install Nvidia Accelerated drivers (closed blob) for more recent video cards, e.g. 520GT, follow these steps in order:
+
{{Console| <pre class="clear">$ equo search -qv nvidia-drivers</pre>}}
   
+
 
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:
+
List of all drivers versions available for currently running kernel:
uname -a
+
{{Console| <pre class="clear">$ equo search -qv nvidia-drivers#$(uname -r)</pre>}}
   
+
 
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:
+
== Installation  ==
[3.2.0-sabayon #1 SMP]
+
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 ===
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
+
{{Console| <pre class="clear"># equo install --ask nvidia-driver#$(uname -r) nvidia-userspace</pre>}}
   
+
Will install newest driver available for currently running kernel.
Before we install, we want to make sure that there are no possible driver conflicts
+
 
   
+
=== Older drivers for currently running kernel ===
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...
+
List Nvidia drivers for your current kernel (insturctions above), and install it along with corresponding '''nvidia-userspace''', e.g.:
   
+
{{Console| <pre class="clear"># equo install --ask nvidia-drivers-304.108#$(uname -r) nvidia-drivers-304.108</pre>}}
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.
+
 
   
+
== Block nouveau driver ==
If you find either offending package, just type "equo remove ati-drivers" and/or "xf86-video-nouveau" (without quotes)
+
For Nvidia drivers to work properly nouveau can't be loaded. Thus, it must be blocked.
   
+
 
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)
+
{{Console| <pre class="clear"># echo blacklist nouveau >> /etc/modprobe.d/blacklist.conf </pre>}}
   
+
 
This will download, install and compile the modules into the kernel, but you will have to setup the last two bits yourself.
+
== Set Nvidia drivers as active ==
   
+
{{Console| <pre class="clear"># eselect opengl set nvidia</pre>}}
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.
 
  
 
[[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 10:16, 11 November 2015

i18n: en pl


Stop.png
SUPPORTED AMD HARDWARE

FGLRX only covers HD5XXX series and higher. The r600-HD4xxx require Open Source Drivers. This guide doesn't cover hybrid (i.e. intel-ati on many new laptops) as I don't have one to test on.


Kernel Upgrade (optional)

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-3.14.0-sabayon
localhost root # eselect kernel list
Available kernel symlink targets:
  [1]   linux-3.13.0-sabayon
  [2]   linux-3.14.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!


AMD - New Sabayon install w/FGLRX

Upon booting your Live Disc, you will notice a GRUB screen that varies based on UEFI and NON-UEFI.

- UEFI -

      Select "Advanced Options"
      Select "Disable Kernel Mode Settings (for AMD Radeon GPUs with FGRLX)"
      Boot Live Disc

- NON-UEFI -

      Press F5 for "Other Options"
      Select "nomodeset"
      Boot Live Disc


AMD APU + AMD PCI-E Graphics

Found a hiccup with graphics detections and Sabayon installation. Getting stuck at root login shell?

Yeah, it has to do with having 2 Graphic Cards, APU + PCI-E. You have the APU disabled in BIOS you say?

This mainly happens with fglrx installations.

sabayon ~ # lspci
---cut---
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Kaveri [Radeon R7 Graphics]
---cut---
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Fiji XT [Radeon R9 FURY X] (rev ca)


Sometimes it doesn't matter. Pending on the motherboard, the hardware is still attached (its part of the CPU!) and seen, thus detected and configured as such. This detects both cards and populates them in order seen then assigns them separate "screens" in xorg.conf or only sets up the first card seen.

The APU is first on the PCI-E bus making it "primary". Fret not! We've got your back. Until an automatic solution is found I give you the fix!


sabayon ~ # nano /etc/X11/xorg.conf


The solution is to swap "BusID" in the "Device" Sections essentially swapping "Primary" and "Secondary" Cards.

FROM:

Section "Device"
    Identifier "SabayonVga0"
    Driver     "fglrx"
    BusID      "PCI:00:01"
---cut--
EndSection

Section "Device"
    Identifier "SabayonVga1"
    Driver     "fglrx"
    BusID      "PCI:01:00"
---cut--
EndSection


TO:

Section "Device"
    Identifier "SabayonVga0"
    Driver     "fglrx"
    BusID      "PCI:01:00"
---cut--
EndSection

Section "Device"
    Identifier "SabayonVga1"
    Driver     "fglrx"
    BusID      "PCI:00:01"
---cut--
EndSection


Now! That should fix the graphics card confusion, but you still need to get into the GUI right? Simple!

Just replace sddm with whichever desktop manager you use such as gdm(Gnome), lightdm(other), lxdm.

sabayon ~ # equo i lightdm
sabayon ~ # systemctl disable -f sddm
sabayon ~ # systemctl enable lightdm
Stop.png
NEED TO KNOW

This Fix will work to get you into the GUI from disk to Install Sabayon. After install you may have to perform this fix one more time once booting from HDD, as this fix isn't copied over to the HDD during install. You will not need to perform this fix everytime. Once to get to installer, then once to setup the installed OS.

AMD - FGLRX to Open Source

"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 new plan (drivers after "catalyst omega"), is to create an open source driver with hooks. 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 driver hooks into the blob. Same driver, different options. One source would be Phoronix.com

Its very similar to the "Roll back" in the following section with a couple differences.

user@localhost ~ $ su
localhost root # equo update
localhost root # equo remove ati-drivers ati-userspace amdcccle
localhost root # equo install xf86-video-ati
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/"fgrlx"/"ati"/g' /etc/X11/xorg.conf

Reboot and enjoy!

AMD - Open Source to FGLRX

Stop.png
CROSSFIRE

Do you have an AMD system? Do you have IOMMU enabled? Crossfire currently DOES NOT WORK when IOMMU is enabled. You will need to make sure it it disabled in the BIOS. There is a catch, if you system was setup with IOMMU enabled, your linux setup may depend on IOMMU for your inputs meaning your Keyboard and Mouse could quit responding in Linux if you disable IOMMU.

Re-enabling IOMMU would bring them back, but CROSSFIRE will refuse to work. You may end up requiring re-installing or repairing your install with IOMMU disabled to get Crossfire. Why is Windows not affected by this option you ask? IOMMU is strictly a Linux option/enhancement. Windows has a dummy driver which ignores IOMMU entirely.

Rumor has it a newer version of IOMMU to work with HSA will resolve this issue in the future.


Prepare

Lets prepare the system for a fresh install of the ati-drivers package and block the conflicting driver Radeon at boot. be sure to look at the first part of the line. $ is for user while # is for root!

user@localhost ~ $ su
localhost root # equo update --force
localhost root # equo remove ati-drivers
localhost root # equo remove xf86-video-ati
localhost root # echo "blacklist radeon" >> /etc/modprobe.d/blacklist.conf

If your radeon module is still loaded after boot and its blacklisted, look into /etc/conf.d/modules to see if it is listed in the modules line and make sure grub is booting with nomodeset(below).


Now we need to disable KMS (Kernel Mode Setting)

localhost root # nano /etc/default/grub

Editing /etc/default/grub

You will notice a Difference. I have highlighted in Red what needs to be added.

    # Copyright 1999-2012 Gentoo Foundation
    # Distributed under the terms of the GNU General Public License v2
    # $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/files/grub.default-2,v 1.2 201$
    #
    # To populate all changes in this file you need to regenerate your
    # grub configuration file afterwards:
    #     'grub2-mkconfig -o /boot/grub2/grub.cfg'
    #
    # See the grub info page for documentation on possible variables and
    # their associated values.
    
    GRUB_DEFAULT=saved
    GRUB_DISTRIBUTOR="Sabayon Linux 15.08"
    
    GRUB_DEFAULT=0
    GRUB_HIDDEN_TIMEOUT=0
    GRUB_HIDDEN_TIMEOUT_QUIET=true
    GRUB_TIMEOUT=5
    
    GRUB_CMDLINE_LINUX_DEFAULT="nomodeset quiet splash"
    GRUB_CMDLINE_LINUX=""
    
    # Uncomment to disable graphical terminal (grub-pc only)
    #GRUB_TERMINAL=console
    

Populate the changes

localhost root # grub2-mkconfig -o /boot/grub/grub.cfg


Install

OK, lets install the drivers and set the links to the GL libraries.

localhost root # equo install --bdeps x11-drivers/ati-drivers-15.9-r1#$(uname -r) ati-userspace amdcccle
localhost root # eselect opengl set ati
localhost root # eselect opencl set amd


Need an updated or new xorg.conf? If you weren't using fglrx before then... yes.

Newer versions of X11 do not require an xorg.conf file, but may not load fgrlx drivers.

creating an xorg.conf file and forcing X11 to use it to override auto-detection can help.

Backup old (if one exists) and update.

localhost root # cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
localhost root # /opt/bin/aticonfig --initial
localhost root # X -config /etc/X11/xorg.conf

OK now reboot!

Question.png
--bdeps

build time dependencies are REQUIRED! aticonfig and amdcccle tools will segfault upon use without build time dependencies.

Configure

Once you login and decide you want to set resolutions and extra settings, open amdcccle.

user@localhost ~ $ xhost +
user@localhost ~ $ kdesu /opt/bin/amdcccle
Question.png
xhost command

Are you getting the error below when using a sudo-like tool for a GUI application?


No protocol specified xhost: unable to open display ":0.0"


There has been some security work done to prevent this. Using the xhost command above you can temporarily disable access control for X allowing kdesu,gksu, and sudo for X applicaions to work.

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!

user@localhost ~ $ su
localhost root # equo remove sys-kernel/linux-sabayon-3.13.11

Roll Back

If you're looking at this. We are either curious or ran into a snag.

Good News: everything is reversible!

Bad News: you're stuck in a terminal until its fixed! But you knew that didn't you ;)

With your computer powered off, connect the computer to the internet via a cable and then press the power button. When you reach the Grub selection screen press an arrow key to halt the timer and select the "Advanced Options....". Then you will select the option with "(Recovery Mode)"

This will take you through the normal boot process, then will put you at a CLI screen and request the root password. Enter the root password and you will be brought into a terminal as root!

Now to start putting things back!

localhost root # equo update
localhost root # equo remove ati-drivers ati-userspace amdcccle
localhost root # equo install xf86-video-ati
localhost root # eselect opengl set xorg-x11
localhost root # sed -i '/blacklist radeon/d' /etc/modprobe.d/blacklist.conf
localhost root # sed -i 's/nomodeset//g' /etc/default/grub
localhost root # cp /etc/X11/xorg.conf.bak /etc/X11/xorg.conf

Now reboot! Now you are back on the Open Source Drivers! You will keep your upgraded kernel so that was not reverted. (reason for less steps)

Question.png
SED

I'm sure you have noticed 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 deleting lines, words, strings, etc. In this case we are using it to remove the Line we added in blacklist.conf and the command we added in grub.

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

NVIDIA

If for some reason you don't have proprietary Nvidia drivers installed and you want them, there are simple steps to follow.

Update package database

First thing is to make sure that package database is up to date.

# equo update --force

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

# 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.:

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

# echo blacklist nouveau >> /etc/modprobe.d/blacklist.conf 

Set Nvidia drivers as active

# eselect opengl set nvidia