How do I install the Nvidia drivers? - Ask Ubuntu
i ordered nvidia gtx card. have dilemma, though. should keep using driver available in "additional drivers" in ubuntu, or should install driver nvidia site?
so driver best me?
updated - nov 2, 2016
the quick way:
before adding ppa, please read ppa's description on page mentions important information using it. desktop users want latest version of driver.
to install run following command:
sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt-get update sudo apt-get upgrade
this update system taking consideration packages ppa offers. if had nvidia driver installed, update driver (but not major version another, eg: 355 370). if did not have driver install, run (assuming have 1 of latest nvidia cards):
sudo apt-get install nvidia-370
then reboot use new drivers.
common questions regarding nvidia:
- 1. can use latest driver on older version of ubuntu?
- 2. difference between video cards & drivers: official nvidia site, ubuntu's default, ppa & nouveau?
- 3. ppas recommended when using video card?
- 4. how know driver or package install?
- 5. how install driver?
- 6. difference between proprietary drivers?
- 7. how know if video card supported in ubuntu?
for troubleshooting nvidia problems or overclocking settings please see this answer covers:
- 1. common bugs solved using latest drivers?
- 2. video card not installing (installation problems)
- 3. tuning , tweaking video card
top questions asked video cards:
1. can use latest driver on older version of ubuntu?
ubuntu 12.04+
since 12.04+, video drivers maintained , updated more often. easier handle , solve problems showed older ones. you'll won't need additional ppas unless have latest nvidia card.
2. difference between video cards & drivers: official nvidia site, ubuntu's default, ppa & nouveau
i recommend them in following order according problems found, how "out of box" experience feels end users, how compatible are, how easy update, install or remove , how feel once have set up:
nvidia ppa - great performance. works out of box cards using driver included in ppa (which different each generation of nvidia cards (this explained below).
ubuntu default recommended driver - ubuntu amazing job in figuring out nvidia driver need depending on card using.
nouveau - open source implementation of nvidia driver. amazing job , although not on par official drivers or ones in ppa (even more latest nvidia cards), speed of development, commitment, dedication , advancements per week, gives confident fact option have , promote.
official nvidia site - official drivers (same ones in ppa), difference not upgrade automatically , have issues when updating, uninstalling , installing (very rare happens).
the differences can summed in following points:
-- official site --
- offers latest driver
- installation through terminal
- when update appears have manually download new package
- it has more issues other method (specially nvidia)
-- ppa repositories --
- offers latest driver hours/days after it's official release
- installation either through terminal or gui
- if have installed driver update package automatically
- when update appears notified update using update manager
- it more stable , tested official ones
- it has less issues using other method (less issues video cards)
- it 1st recommended way nvidia cards.
-- default ubuntu drivers --
- for every new release drivers better , better
- gets updated less ppa
- in cases drivers work out of box (nouveau nvidia)
- not date when compared official site or ppa
- it far, more tested in ubuntu other way (ppa or official)
- easier update
4. how know driver or package install?
depending on how many video cards have , if integrated or not, installation method , packages install change ppa mentioned above single cards.
computers 2 video cards in hybrid mode
starting nvidia 319.xx, both nvidia optimus , common pcie drivers integrated one, if install nvidia-319 package or newer, driver integrated nvidia cards , pci ones.
there 2 solutions possible hybrid cards: first 1 package called bumblebee
, able use different configurations different applications. install it, run:
sudo apt-get install bumblebee linux-headers-generic
the second 1 official nvidia package called nvidia-prime
, automatically installed nvidia-355
package. able decide on card use @ profile level, i.e. when user logs in. decision adjustable @ nvidia x server settings control panel. note nvidia-prime
, bumblebee
incompatible: if bumblebee
installed nvidia-prime
won't function correctly, , options won't shown @ nvidia x server settings control panel. you'll have 1. remove bumblebee
2. reinstall nvidia-355
in order make work again.
after this, recommended turn off computer , on.
the following picture should seen nvidia-prime
installed, not when bumblebee
installed.
computers sli setup
if have 2 or more video cards in sli mode can following:
for nvidia cards, when creating
xorg.conf
add following line:sudo nvidia-xconfig --sli=on
lastly, ubuntu has neat way of recommending driver use depending on video card , drivers available (this why recommend adding ppas first). type:
ubuntu-drivers devices
it should show list of driver packages available hardware, including not limited video card. if wish see driver recommended video card type following:
ubuntu-drivers devices | grep recommended
5. how install driver?
the method used depend on how many video cards have , type of video cards using. following of ways of installing nvidia video card:
nvidia (old drivers need headers)
for nvidia, many times need first install header files of kernel version using @ moment driver install correctly. first need execute following line:
sudo apt-get install linux-headers-generic
and install package related driver (nvidia* nvidia cardss). in other cases might need go little further , install sources , specific header files, example:
sudo apt-get install linux-source linux-headers-3.5.0-16-generic
which installs linux-source
package , specific header file assuming have in case 3.5.0-16-generic
kernel version.
to check version have @ given time type uname -r
should give specific kernel version in use.
for nvidia, depends on video card , package needed it, latest video cards , assuming added ppa mentioned above, terminal line be:
sudo apt-get install nvidia-370
the number @ end change depending on how old video card or how new (some versions available 304, 340, 355 , 370).
for geforce 8 , 9 series gpus use nvidia-340
geforce 6 , 7 series gpus use nvidia-304
the latest versions bring more fixes , correct issues related graphics corruption, hdmi support, thermal support , more latest nvidia cards. normally, updating video drivers solves many issues.
note fan control , other nvidia features not found on nvidia-settings
app, not ubuntu related, nvidia related. recommend, asking nvidia developers in official nvidia forum features may want include (fan control, overclocking features, etc...)
for cuda can follow link installing , testing cuda in ubuntu 14.04
for bumblebee (nvidia optimus) can use following ppa (ubuntu 15.04+ users can optionally not since included):
sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt-get update sudo apt-get install bumblebee linux-headers-generic
6. difference between proprietary drivers?
please visit difference between additional drivers (nvidia) more information proprietary drivers.
7. how know if video card supported in ubuntu?
here couple of hints know if video card supported in ubuntu:
if video card existed before release of ubuntu version using, has 99% change supported.
if video card appeared less 6 months after release of ubuntu version using , kept ubuntu version updated, have pretty chance supported.
if added 1 of ppas mentioned above have 99.99% chance supported.
checking nvidia site or ppa support might yield quicker answer, in 100% of cases, video card supported either open source driver or proprietary driver.
using latest ubuntu version improve chances of having latest video card supported.
in general, make rule of thumb if have latest video card or 1 of latest video cards, need latest drivers. install latest drivers through ppa or software sources come ubuntu if have latest nvidia card.
note - ubuntu might show in graphics option in "about computer" value unknown. if happening, please install mesa-utils
package.
this answer oriented towards resolving common nvidia bugs (black screen, drivers not working in general, low fps, etc...)
- 1. common bugs solved using latest drivers?
- 2. video card not installing (installation problems)
- 3. tuning , tweaking video card
1. common bugs solved using latest drivers?
common bugs shared video cards are:
- missing unity launcher or panel
- missing options inside nvidia settings
- desktop not appear (black screen)
- top/bottom of screen cut out
- video looks cut pieces
- higher resolutions not usable (not found)
- video shows vga not hdmi (and vice versa)
- suspend not working on laptop when closing lid
- fan speed makes lot of noise or @ full speed
- heat problems
nvidia-xconfig
not creatingxorg.conf
correctly
if happen have of this, or similar in aspects, idea add 1 of ppas , update video drivers latest can manage. in cases, problem solved after updating , rebooting. cases recommend using graphics drivers ppa.
with above mentioned, invite take @ of questions related video cards:
which ati/amd, or intel, or nvidia graphics unity?
what correct way install proprietary ati catalyst video drivers (fglrx) directly amd?
how correctly enable desktop cube in unity 3d?
how enable desktop visual effects?
nvidia drivers not working after upgrade. why can see terminal?
desktop not show when installed nvidia drivers!
black screen on latest nvidia/ati cards when starting lightdm/ubuntu
hdmi/vga connection cuts borders of screen or creates blurry text
/etc/x11/xorg.conf doesn't exist?
installing latest nvidia xorg ppa gives black screen
now pointers want mention:
for nvidia cards, helps create
xorg.conf
file usingnvidia-xconfig
command line. go in terminal type following , reboot:sudo nvidia-xconfig
know if
nvidia-xconfig
throws 1 of following errors need delete existingxorg.conf
file first before executingnvidia-xconfig
command again:validation error - can mention section missing, incorrect information in section, not closed sections or requiring @ least 1 section proceed.
warning - can mention several errors in values regarding parameter found in section, example not specifying explicitly value parameter.
fatal server error - after running
nvidia-xconfig
can in small cases "no screens found" error means recommendations mentioned above installing ppa not applied first or possible module still working (either nouveau loading or nvidia driver installed using nvidia driver package nvidia site.error - error similar
unable write directory '/etc/x11'
if executednvidia-xconfig
command without sudo. if error persists vianvidia-settings
need deletexorg.conf
file first.
for cases need delete
xorg.conf
file, please make sure backup changes did before deleting it.reinstalling driver solves several issues. example, if using
nvidia-graphics-drivers-355
driver package, following reinstall it:sudo apt-get install --reinstall nvidia-graphics-drivers-355
reinstalling xorg helps in other cases:
remove existing xorg using following command
sudo apt-get remove --purge xserver-xorg
install xorg using following command
sudo apt-get install xserver-xorg
reconfigure xorg using following command
sudo dpkg-reconfigure xserver-xorg
after recommended reinstall video driver if using nvidia or ati mentioned above.
i have add if suffer black screen after installing nvidia drivers ppa , rebooting (and don't have hybrid system) problem might need remove bumblebee package along bumblebee.conf file. follow steps provided in installing latest nvidia xorg ppa gives black screen or run following lines:
sudo apt-get purge bumblebee primus sudo rm -fr /etc/modprobe.d/bumblebee.conf sudo reboot
2. video card not installing correctly (installation problems)
most installation problems related ati or nvidia can solved following steps provided in can not install nvidia driver in short can summarize in following steps assuming have 1 of following issues:
- installed official nvidia drivers , have problem updating or removing them
- screen looks wrong/corrupted
- unity not load of fails load
- can not access gui environment in no way
if have installed official nvidia drivers, follow steps below after having started ubuntu in recovery mode. if not, skip step 2:
if installed nvidia driver nvidia site or ati driver official amd site, type following on terminal (in example assume have ubuntu 64bit 304.51 version of nvidia):
sudo sh nvidia-linux-x86_64-304.51.run --uninstall
if have install nvidia package
nvidia-current
ornvidia-current-updates
remove them. same goes ati drivers.sudo apt-get remove nvidia-current
example.any change did blacklist nvidia/ati driver instance or changes other files related nvidia/ati drivers should reversed. in case went ahead , started editing crazy (which happens know ^^).
delete or backup/move
xorg.conf
file. not need file right now.after doing steps above reboot pc , make sure loads nouveau , not nvidia drivers nvidia cases or ati drivers , not fglrx ati/amd cases..
if right know running unity nouveau driver (or ati open source driver) or if happened video error, or fails correctly load lightdm, not worry, 3 options end same way. when rebooting, in grub menu, select "recovery mode". after recovery mode shows recover options, choose root option or failsafe x option. in modes , after previous steps have been done, install nvidia/ati driver using ppa mentioned above. try install latest driver if have recent video card:
sudo apt-get install nvidia-313
nvidia cards orsudo apt-get install fglrx
latest ati/amd cards. remember there should not installed before doing in regards nvidia/ati drivers (except nouveau drivers).now reboot , should work.
note - in step 6, if looks though pc stuck loading press ctrl+alt+f1 go tty1 terminal , step 6 there.
other common installation problems involve resolution. can check , change resolution via terminal in following way:
open terminal , type
xrandr
show possible supported resolutions (this depends on video card , monitor/tv). take note on order appear listed. first line shows resolution line 1, next 1 2 , on resolutions supported. value of 0 reset resolution default 1 after set resolution.type
xrandr -s x
x line number mentioned above. like:xrandr -s 1
.lastly users have reported not seeing unity launcher/panel after updating kernel and/or nvidia version, first thing check if unity plugin enabled. go compiz config settings manager (am assuming installed) , go unity plugin. check see checkbox activated. if not activate option , follow on-screen suggestions.
3. tuning , tweaking video card
for nvidia video cards follow steps:
in terminal type:
sudo nano /etc/x11/xorg.conf
find device section , add following line:
option "coolbits" "4"
it should this:
section "device" identifier "device0" driver "nvidia" vendorname "nvidia corporation" option "coolbits" "4" endsection
now save , reboot. should see (depending on video card model) new option fan speed this:
a brief explanation of coolbits:
coolbits enables various unsupported features, such support gpu clock manipulation in nv-control x extension. option accepts bit mask of features enable. means value of 0, 1, 2 or 4.
coolbits = 1 - when "1" (bit 0) set in "coolbits" option value, nvidia-settings utility contain page labeled "clock frequencies" through clock settings can manipulated. "coolbits" available on geforce fx , above.
coolbits = 2 - when "2" (bit 1) set attempt initialize sli when using gpus different amounts of video memory.
coolbits = 4 - when "4" (bit 2) set thermal monitor page allow configuration of gpu fan speed, on graphics boards programmable fan capability.
the default option 0 (unsupported features disabled).
as of nvidia 337.xx following options available:
coolbits = 8 - when "8" (bit 3) set powermizer page in nvidia-settings control panel display table allows setting per-clock domain , per-performance level offsets apply clock values. allowed on geforce gpus in geforce gtx 400 series , later. not clock domains or performance levels may modified.
coolbits = 12 - when "12" (bit 3 + 2) same activating effects of coolbits 8 + coolbits 4. new overclocking features , fan control.
this options can activated issuing following command:
nvidia-xconfig --cool-bits=4
warning: may cause system damage , void warranties.
i want add information proprietary drivers typically saved in home folder. example information saved nvidia-settings
stored in ~/.nvidia-settings-rc
can access typing following:
nano ~/.nvidia-settings-rc
i mention because if xorg.conf
not used, how settings ati or nvidia working. reason x can automatically detect , configure many options of xorg.conf input/output devices , video cards. did not happen automatically before, since 2010, x can handle many options , detect them without problems or need configure file them.
note that, many of still present divided more specific files in /usr/share/x11/xorg.conf.d/
for example, video cards not show unity launcher or top panel unless xorg.conf
present. in other cases, users want tweak video card, may need coolbits option added xorg.conf. reasons why nvidia-xconfig exists. provide additional level of support in case x not detect or offer options video card.
another trick run update-pciids
updates pci id list. on rare cases, id not found or detected incorrectly video card (actually pci device) solve problem related it.
in cases helps change texture filter value fast in opengl plugin inside compiz config settings manager.
lastly, changing image settings options "high performance" in opengl settings of nvidia settings panel can in cases.
Comments
Post a Comment