Difference between revisions of "HOWTO: Get AMD/ATI or Nvidia Video Cards working in Sabayon"
|Line 21:||Line 21:|
If your radeon module is still loaded after
If your radeon module is still loaded after it to the modprobe blacklist, look into '''/etc/conf.d/modules''' to see if it is listed in the modules line.
Revision as of 12:37, 17 September 2013
(UPDATED 5.5.13 Thanks to anomaly65) https://forum.sabayon.org/viewtopic.php?f=56&t=28808
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!
[email protected] ~ $ su localhost user # equo update --force localhost user # equo remove ati-drivers localhost user # equo remove xf86-video-ati localhost user # equo remove x11-base/xorg-drivers localhost user # equo remove --configfiles xf86-video-ati localhost user # echo "blacklist radeon" >> /etc/modprobe.d/blacklist.conf
If your radeon module is still loaded after boot and you have added it to the modprobe blacklist, look into /etc/conf.d/modules to see if it is listed in the modules line.
Now we need to disable KMS (Kernel Mode Setting)
localhost user # nano /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 2012/06/28 22:36:53 floppym Exp $ # # 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" GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=5 GRUB_DISABLE_LINUX_UUID=true GRUB_CMDLINE_LINUX_DEFAULT="" GRUB_CMDLINE_LINUX="nomodeset" # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console
Now install new kernel and drivers.
localhost user # equo install sys-kernel/linux-sabayon localhost user # equo install sys-kernel/sabayon-sources localhost user # equo install x11-drivers/ati-drivers amdcccle
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 user # eselect bzimage list localhost user # eselect kernel list
You should get something like this...
localhost user # eselect bzimage list Available kernel targets:  kernel-genkernel-x86_64-3.8.0-sabayon *  kernel-genkernel-x86_64-3.9.0-sabayon localhost user # eselect kernel list Available kernel symlink targets:  linux-3.8.0-sabayon  linux-3.9.0-sabayon * localhost user #
Now select the newer bzimage and kernel and switch to the AMD/ATI libraries.
localhost user # eselect bzimage set 2 localhost user # eselect kernel set 2 localhost user # eselect opencl set amd localhost user # eselect opengl set ati
Need an updated or new xorg.conf? If you weren't using fglrx before then... yes. Backup old and update.
localhost user # cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak localhost user # /opt/bin/aticonfig --initial
OK now reboot!
Once you login and decide you want to set resolutions and extra settings open amdcccle.
[email protected] ~ $ kdesu /opt/bin/amdcccle
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 user # equo remove sys-kernel/linux-sabayon-3.8.10
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 go to the kernel you would like to boot from. Press 'e' on that line and it will take you to edit the grub commands before booting. This is a temporary grub edit, it will revert after reboot!
At the end of the "linux" line add the option "nox"
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 nox
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!
localhost user # equo update localhost user # equo remove ati-drivers amdcccle localhost user # equo install xf86-video-ati localhost user # equo install x11-base/xorg-drivers localhost user # eselect opengl set xorg-x11 localhost user # sed -i '/blacklist radeon/d' /etc/modprobe.d/blacklist.conf localhost user # sed -i 's/\<nomodeset\>//g' /etc/default/grub localhost user # 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)
- 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 )
- 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) --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 Install Nvidia Accelerated drivers (closed blob) for more recent video cards, e.g. 520GT, follow these steps in order:
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:
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.