Linux getting started Tutorial: Fedora21 Nvidia Driver Installation and Remedy upon failure

Source: Internet
Author: User
Three ways to install the Nvidia DRIVER: 1. Download the driver from the Nvidia official website and install the NVIDIA driver. 2: solution 3: Install a software package in a third-party software source (akmod-nvidia in rpmfusion) after akmod-nvidia fails to be installed: remedy for Bumblebee installation failure Fedora21 and Nvidia drivers

Reading directory

  • Three ways to install the Nvidia driver
  • Method 1: download and install the driver from the Nvidia official website.
  • Remedy for failure to install the NVIDIA official driver
  • Method 2: install the software package from a third-party software source (akmod-nvidia in rpmfusion)
  • Remedy for installation of akmod-nvidia failure
  • Method 3: Install Bumblebee
  • Remedy for Bumblebee installation failure
  • Fedora 21 and Nvidia drivers cannot cope with the problem. What exactly is the problem?

I have been playing for so long on Linux desktop systems, most of the time I use Ubuntu, and occasionally use Fedora. Multiple Linux distributions are installed on my computer. For details, see Install Multiple Linux distributions on the same hard disk and try Fedora 21. In the Ubuntu Desktop System, installing the Nvidia graphics card driver is a matter of minutes, and it has been used smoothly. For details, see "desktop beautification" here. However, in ora, it has always been a tough task. Especially for workora 21 Workstation, installing the Nvidia driver on my laptop won't get any good results. No matter which method is used, the process is smooth, but the result is always failed, and the graphic interface is always inaccessible. This interface always appears:

Three ways to install the Nvidia driver

There are many ways to install the Nvidia graphics card driver in Fedora. I have used three methods this time:

  1. Download and install the official driver from the Nvidia website.
  2. I used the akmod-nvidia package in rpmfusion here using the software package from the third-party source.
  3. Bumblebee is an open-source product designed to solve the problem of dual-graphics switching. After the first two methods fail, I thought the cause of the failure was that my laptop had a Nvidia GT 720M graphics card and an Intel dashboard co-existed. After using Bumblebee, the same ending still appeared.
Method 1: download and install the driver from the Nvidia official website.

Go directly to the Nvidia website www.nvidia.com, find the driver download page, and select your own hardware and software platform to search for the appropriate driver, such:

Select the latest version 346.47 for download. do not consider the words BETA, for example:

After downloading is a NVIDIA-Linux-x86_64.346.47.run file, you can run it like this:

Running the Nvidia official installation program requires a strong psychological quality, because it will show the following error pages in turn.

Error 1:

Error Message 2:

Error 3:

Error 4:

Error Message 5:

Fortunately, my heart was strong enough. I ran the installer again and again until all these problems were solved. The 1st error message indicates that the installer must run with the root permission. It is easy to solve this problem.sudo ./NVIDIA-Linux-x86_64.346.47.runCommand to run the program or usesuCommand to switch to the root user before running the program. The 2nd error message indicates that the Nvidia graphics card driver cannot be installed on the graphic interface. Therefore, you must exit X Server. So how can we enable Fedora 21 to enter the character interface after it is started? I have discussed this issue in the first article "methodology for playing with Linux systems" in this blog series. Different Linux releases use different character interfaces. The init program used by Fedora 21 is systemd, so the method for entering the character interface is run by the root user.systemctl set-default multi-user.targetCommand, such:

I thought it would be easy to install the driver on the Character interface, and I still found myself naive. Sure enough, the 3rd error message soon appeared. It tells us to install gcc first before installing the driver. This problem is well solved,yum install gccDone. Then run the installation program. The result is 4th error messages. It is so sad that the source code of the Linux kernel is required to install the driver. It took me some time to solve this problem, I thoughtyum install kernel-develThe problem can be solved. It is found that the installed kernel-devel version is different from the original kernel version of the system.yum update kernelTo solve the problem.

Then, the installation program runs smoothly and the Nvidia driver is compiled successfully to generate the corresponding kernel module. I thought it would be a success. The 5th error message is displayed. Let me go! The error message indicates that the nvidia. ko module cannot be loaded successfully because the nouveau module is still in use. To disable the nouveau module, you only need to disable it in/etc/modprobe. create. in the conf file, write blacklist nouveau. The Nvidia Driver Installer has already helped us with this, but it still cannot prevent nouveau module loading. Why? This is because the module in initramfs will be loaded when Linux is started. If initramfs is not updated, it is useless to simply write the configuration file under the/etc/modprobe. d directory. Update initramfs in Fedora 21 using this commanddracut --force.

Finally, usesystemctl set-default graphical.targetSet the command to enable the graphical interface when the system is started, and thenrebootCommand to restart. For example:

How do I know that the command for updating initramfs in Fedora 21 is dracut? This is another topic. The method is also written in methodology for converting Linux systems. First, we guess the command to create an initramfs file or an initrd file may bemkinitramfsOrmkinitrdAnd then usewhichCommand to find out whether these two commands exist in the system, then find out which software package it belongs to, and finally find out the documentation of this software package. Next let's take a look at Ubuntu and Fedora 21, which tools are used to reconstruct initramfs:

Although the graphic interface cannot be entered, the installation process can be summarized as follows:

  1. The graphics card driver belongs to the kernel module of the Linux kernel. You need to understand the kernel knowledge when installing the kernel module;
  2. Download the Nvidia driver;
  3. Exit the graphical interface and enter the character interface. The command issystemctl set-default multi-user.targetAnd then restart the system;
  4. Gcc needs to be installed. The command isyum install gcc;
  5. The kernel source code is required. The command isyum install kernel-develAnd the driver needs to be re-compiled every time the kernel is upgraded;
  6. Do not load nouveau module at startup by modifying the configuration file in the/etc/modprobe. d directory;
  7. Update initramfs with the command:dracut --force;
  8. Set the graphical interface when the system is started again. The command issystemctl set-default graphical.target;
  9. Restart the system. The command isreboot;

All the preceding commands run with the root user permission. Follow this process and you will be able to get the error interface shown at the beginning of this article. Congratulations, this is the end of ora 21 and Nvidia.

Remedy for failure to install the NVIDIA official driver

The biggest achievement of this round is how to recover from errors. It is no longer the case that the system will be reinstalled once it fails to enter the graphic interface as before. The method is as follows. First, press Ctrl + Alt + F2 to enter another console and log on as the root user. Then, I think programs in Linux often provide a little help, so I useNVIDIA-Linux-x86_64-346.47.run -h(With the-h option), the installation program provides a help message. In the help information, if you use the-x option to run the program, you can decompress the file. Then, I decompressed the package, went in and looked at it, and found more help information. Finally, runnvidia-installer --uninstallCommand, I successfully deleted the Nvidia driver. Finally,dracut --forceLet nouveau back and restart it. For example:

Method 2: install the software package from a third-party software source (akmod-nvidia in rpmfusion)

In fact, in addition to using the official software source of the release edition, Linux also occasionally uses third-party software sources, especially for some closed-source software, such as audio and video decoding, Flash playback, and so on. Of course, the graphics card driver is also a heavyweight software that is frequently indexed by third-party sources. More famous third source is fusion, here we use rpmfusion, to its official website http://fpmfusion.org to look at, such:

Before using third-party sources, useyum listThe command cannot find the driver related to Nvidia, and then add the rpmfusion source, such:

Use againyum listSearch for the Nvidia driver and obtain the following results:

Finally, useyum install akmod-nvidiaInstall it.

Here we will talk about akmod. As mentioned above, for the kernel module, the kernel module needs to be re-compiled every time the kernel is upgraded. If every manual operation is performed, the workload will be too large, therefore, an automated tool is required. akmod is such a tool. Dkms is the same tool as akmod. We have seen this tool before. dkms is automatically installed when the video card driver is installed in Ubuntu, And the VirtualBox virtual machine uses dkms to manage its kernel module. For details, see "Linux getting started Tutorial: VirtualBox for Virtual Machine experience".

I thought that the software package from the third source should be successful, because the software in the software source is often tested and relatively mature. But unfortunately, it still fails.

Remedy for installation of akmod-nvidia failure

This is relatively simple. Press Ctrl + Alt + F2 to go to another console, Log On As A root user, and delete the corresponding software package. But it should be noted that not only do you need to delete akmod-nvidia, but also remove the xorg-x11-drv-nvidia. Command isyum erase akmod-nvidia xorg-x11-drv-nvidia, The running effect is as follows:

Method 3: Install Bumblebee

The installation of the Nvidia driver failed in two ways. I really don't know why. I think it may be because of the dual-display card in the notebook, which seems to have been mentioned on the Internet. So my 3rd method is to solve the problem by switching the dual-graphics card.

I know Bumblebee from Wiki Ora's Wiki. It's hard to spell this word. If you know it means Bumblebee, you must have forgotten it, this name is used because the Nvidia dual-graphics switch technology is Optimus, which means Optimus Prime. There are so many transformers fans. For the Bumblebee installation process, see the following Wiki:

Unfortunately, it still fails.

Remedy for Bumblebee installation failure

This is the same remedy as the previous error. Press Ctrl + Alt + F2 to go to another console, log on as the root user, and delete the corresponding software package. Command isyum erase bumblebee. I cannot.

Fedora 21 and Nvidia drivers cannot cope with the problem. What exactly is the problem?

I searched the internet and found that many people failed to install the Nvidia driver using Fedora 21. So what is the cause of the error? Is it a dual-Card problem? Or is the Linux kernel too new? Or is the Nvidia driver version too new? Or, is it Xorg or Gnome? I have no answer to these questions. I am here to share my tossing process. You are welcome to discuss it.

For more information about Fedora, see Fedora topics page http://www.linuxidc.com/topicnews.aspx? Tid = 5

This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-03/115564.htm

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.