PDA

View Full Version : F22 Nvidia Guide Link



bob
18th June 2015, 12:55 PM
Leigh's mentioned that this guide: http://rpmfusion.org/Howto/nVidia?highlight=%28CategoryHowto%29 is a decent one for working with F22. Of course, F22's default is dnf, so consider that when it refers to yum. And, Leigh reports that there is NO Kmod support for F22. Kmod support for other versions will be slow due to lack of manpower.

bgsmith
19th June 2015, 11:03 PM
Thanks. I have been trying off and on since FC22 was released to get nvidia from rmpfusion installed. It worked very well indeed with FC2.

Example output from Xorg.0.log

[ 21.034] (II) Loading /usr/lib64/nvidia/xorg/libglx.so
[ 21.076] (II) Module glx: vendor="NVIDIA Corporation"
[ 21.076] compiled for 4.0.2, module version = 1.0.0
[ 21.076] Module class: X.Org Server Extension
[ 21.077] (II) NVIDIA GLX Module 346.72 Tue May 5 17:11:15 PDT 2015
[ 21.077] (==) Matched nouveau as autoconfigured driver 0
[ 21.077] (==) Matched nv as autoconfigured driver 1
[ 21.077] (==) Matched modesetting as autoconfigured driver 2
[ 21.077] (==) Matched fbdev as autoconfigured driver 3
[ 21.077] (==) Matched vesa as autoconfigured driver 4
[ 21.077] (==) Assigned the driver to the xf86ConfigLayout
[ 21.077] (II) LoadModule: "nouveau"
[ 21.079] (II) Loading /usr/lib64/xorg/modules/drivers/nouveau_drv.so
[ 21.081] (II) Module nouveau: vendor="X.Org Foundation"
[ 21.081] compiled for 1.17.1, module version = 1.0.11
[ 21.081] Module class: X.Org Video Driver
[ 21.081] ABI class: X.Org Video Driver, version 19.0
[ 21.081] (II) LoadModule: "nv"
[ 21.083] (WW) Warning, couldn't open module nv
[ 21.083] (II) UnloadModule: "nv"
[ 21.083] (II) Unloading nv
[ 21.083] (EE) Failed to load module "nv" (module does not exist, 0)
[ 21.083] (II) LoadModule: "modesetting"
[ 21.083] (II) Loading /usr/lib64/xorg/modules/drivers/modesetting_drv.so
[ 21.084] (II) Module modesetting: vendor="X.Org Foundation"
[ 21.084] compiled for 1.17.1, module version = 1.17.1

bgsmith
21st June 2015, 06:28 PM
I noted that there was a kernel update today so I tried the nvidia RPMs from rpmfusion and this time installation succeeded and I am able to use the Nvidia driver.

In addition to the new kernel (kernel-4.0.5-300.fc22.x86_64), I followed the instructions to install these rpms on JR page at http://www.if-not-true-then-false.com/2014/fedora-20-nvidia-guide/ (keeping an eye on the rpmfusion how to also).

I used this: sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-devel (ie adding the devel package as this seemed to help others).

And this was followed by JRs instructions at 2.5:
## Backup old initramfs nouveau image ##
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img

## Create new initramfs image ##
dracut /boot/initramfs-$(uname -r).img $(uname -r)

I rebooted. Verified nvidia module was running and then installed i686 support.
sudo dnf install xorg-x11-drv-nvidia-libs.i686

The above worked for me. Your milage may vary. :cool:

brad

bob
22nd June 2015, 12:07 AM
Thanks, Brad! That might help quite a few.

Tikhon03
24th June 2015, 04:51 PM
I now have a method for making step 3 persistent on F22. First let me mention two things that did not work, that have been suggested for previous versions of fedora.


#vi /etc/modprobe.d/blacklist.conf - append 'blacklist nouveau'
#vi /etc/sysconfig/grub - append 'rd.driver.blacklist=nouveau' to end of 'GRUB_CMDLINE_LINUX=
#grub2-mkconfig -o /boot/grub2/grub.cfg
This method of blacklisting did not work, but is close to the final solution. Basically there are extra things that need to be added to GRUB_CMDLINE_LINUX. Amazingly the following code also does not work:


#yum remove xorg-x11-drv-nouveau.x86_64
It seems that this does not remove nouveau from /lib/modules/..., and so in fact nouveau is still detected in the boot process.

To discover what to put after GRUB_CMDLINE_LINUX=, I did step 3, rebooted, then ran


cat /proc/cmdline
This told me that fromy configuration /etc/sysconfig/grub should have the following line:


GRUB_CMDLINE_LINUX="nomodeset rhgb quiet nouveau.modeset=0 rd.driver.blacklist=nouveau video=vesa:off"
So basically there are three things to add to the line: nouveau.modeset=0, rd.driver.blacklist=nouveau, and video=vesa:off (the rest was already there). I then ran


#grub2-mkconfig -o /boot/grub2/grub.cfg
And that does it. By the way, I am pretty sure that the blacklist.conf file does not help at all, but I admit I have not removed it from my system.

rbmorse
24th June 2015, 07:50 PM
The blacklist.conf modification works, but you have to use dracut to update the initramfs image to make it take effect.

Tikhon03
25th June 2015, 08:50 PM
brmorse is correct about dracut needing to be run afterwards to build a new initramfs image, however in my case dracut has been run several times since I created the file. I think this may do some explaining:
http://http://forums.fedoraforum.org/newreply.php?do=newreply&noquote=1&p=1736316
This seems to indicate that dracut only checks in /etc/modprobe.d when the host-only option is used. The standard folder for blacklisting is actually /usr/lib/modprobe.d. This link has been around since F18, and yet almost all explanations that can be found by google for blacklisting nouveau refer to /etc/modprobe.d without the host only option. why?

Interestingly, there is already a file for blacklisting nouveau in /usr/lib/modprobe.d on my computer, yet it seems to be ignored. The file explains that if it is ignored, then dracut should be run with the -f option. I did this, but it was still ignored. Do they mean the -H option? I mean, if nouveau is really blacklisted it seems like xorg should not try loading nouveau at all, but the log still shows an attempt to load nouveau.

my_linux
14th July 2015, 12:35 PM
This seems to work for me on F22 64 bit.

1. Clean install of Live via USB.
2. Update system.
3. Reboot.
4. Setup RPM Fusion repos (free and nonfree).

In a terminal install Nvidia as follows and includes 32 bit libs for e.g. steam:

5. dnf install akmod-nvidia xorg-x11-drv-nvidia-libs.i686 kernel-devel dkms

6. mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img

7. dracut --omit-drivers nouveau /boot/initramfs-$(uname -r).img $(uname -r)

You may need to change akmod-nvidia and libs selection depending upon the type of card in use, see http://rpmfusion.org/Howto/nVidia

I will report back if there are any issues after next kernel update - hopefully not.

jonathonp
18th July 2015, 08:17 AM
You don't need to remove nouveau from the initramfs with fedora 22 as shown below:


mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
dracut --omit-drivers nouveau /boot/initramfs-$(uname -r).img $(uname -r)


To install the driver nvidia driver from rpmfusion for the Newer GeForce VGA as described on the rpmfusion website open a terminal and copy and paste the following:

First install the rpmfusion repository:

su
dnf install --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

To install the driver nvidia driver


su
dnf -y update && dnf -y install gcc kernel-devel kernel-headers
dnf install akmod-nvidia xorg-x11-drv-nvidia-libs.i686


Reboot

If your nvidia-kmod failed to build during the reboot copy and paste the following into a terminal with root privileges (use crtl+alt+f2 to gain access to a terminal if required) :

[root@jonathon-i7 jonathon]#
akmods --force
Checking kmods exist for 4.0.7-300.fc22.x86_64 [ OK ]
Building and installing nvidia-kmod [ OK ]
[root@jonathon-i7 jonathon]#

Reboot and you should be good to go..)

To remove the nvidia driver (if it failed to build or install) and move back to the nouveau driver instead of the vesa driver:


su
dnf remove *\nvidia\*

Reboot

Thanks to CronoCloud http://forums.fedoraforum.org/showpost.php?p=1737846&postcount=81 for letting me know the fix.

Eos
26th July 2015, 12:35 PM
So, why not put a warning on the RPMFusion page, that installing the Nvidia a-/kmod packages will require additional steps in order to work. As of now, installing this packages will 100% guaranteed leave you with a broken, unbootable system.

I know the drill because the kmod-packages break my systems since 2010 or something, since nouveau came up, and I know the solution and fix is hidden somewhere deep inside the fedora forums. But I think about new Fedora users, who expect a quick and easy way to install the Nvidia drivers.

bob
27th July 2015, 12:04 PM
Eos, we don't control RPMFusion, FedoraProject, etc. and all we can do is to put a Guide that people should find if they come to this Forum. Not perfect, but until we rule the world, it's what's available. :D

Dutchy
1st August 2015, 11:33 AM
Needed the proprietary driver last night to play some game (let's hope the new mesa with OpenGL 4 arrives soon and nouveau stability and performance improves).
Where some time ago it was enough to use "dnf install akmod-nvidia xorg-x11-drv-nvidia-libs.i686" from RPMfusion, this time I was greeted with a kernel trace.

kernel: BUG: unable to handle kernel paging request at ffffffffa0a503a8
kernel: IP: [<ffffffff81298280>] proc_get_inode+0xc0/0x170
kernel: PGD 3c0e067 PUD 3c0f063 PMD 42267c067 PTE 0
kernel: Oops: 0000 [#1] SMP
kernel: Modules linked in: xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun nf_conntrack_netbios_ns nf_conntrack_broadcast ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle vboxpci(OE) iptable_security vboxnetadp(OE) vboxnetflt(OE) iptable_raw vboxdrv(OE) it87 hwmon_vid snd_hda_codec_hdmi eeepc_wmi asus_wmi sparse_keymap rfkill vfat fat kvm_amd kvm snd_hda_codec_realtek fuse snd_hda_codec_generic crct10dif_pclmul crc32_pclmul ghash_clmulni_intel joydev snd_hda_intel snd_hda_controller snd_hda_codec
kernel: snd_hda_core snd_hwdep snd_seq edac_core fam15h_power snd_seq_device k10temp edac_mce_amd snd_pcm sp5100_tco i2c_piix4 snd_timer snd soundcore shpchp acpi_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc binfmt_misc hid_logitech_hidpp btrfs hid_logitech_dj xor nouveau video i2c_algo_bit raid6_pq drm_kms_helper crc32c_intel ttm serio_raw drm mxm_wmi r8169 mii wmi
kernel: CPU: 0 PID: 1771 Comm: gnome-shell Tainted: P W OE 4.1.3-200.fc22.x86_64 #1
kernel: Hardware name: To be filled by O.E.M. To be filled by O.E.M./M5A99X EVO, BIOS 1708 04/10/2013
kernel: task: ffff88042c2b9da0 ti: ffff88041d054000 task.ti: ffff88041d054000
kernel: RIP: 0010:[<ffffffff81298280>] [<ffffffff81298280>] proc_get_inode+0xc0/0x170
kernel: RSP: 0018:ffff88041d057bf8 EFLAGS: 00010246
kernel: RAX: 0000000000008000 RBX: ffff880002fa3938 RCX: 0000000000000018
kernel: RDX: ffffffffa0a50360 RSI: 0000000000000001 RDI: ffff880002fa3938
kernel: RBP: ffff88041d057c08 R08: ffff88043ec1b3d0 R09: ffff88041c242460
kernel: R10: 2f2f2f2f2f2f2f2f R11: 0000000000000000 R12: ffff880428b6b6c0
kernel: R13: ffff880002fa36d8 R14: ffff88041d057df8 R15: 0000000000000000
kernel: FS: 00007f81ab6f3a80(0000) GS:ffff88043ec00000(0000) knlGS:0000000000000000
kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: CR2: ffffffffa0a503a8 CR3: 000000041c74f000 CR4: 00000000000407f0
kernel: Stack:
kernel: ffff88041dca4600 ffff880428b6b300 ffff88041d057c38 ffffffff8129dc13
kernel: ffff88041d057eec ffff88041dca4600 0000000000008000 ffff88041d057d90
kernel: ffff88041d057c48 ffffffff8129dc9b ffff88041d057c78 ffffffff81234c3d
kernel: Call Trace:
kernel: [<ffffffff8129dc13>] proc_lookup_de+0x53/0xc0
kernel: [<ffffffff8129dc9b>] proc_lookup+0x1b/0x20
kernel: [<ffffffff81234c3d>] lookup_real+0x1d/0x70
kernel: [<ffffffff8123a35c>] do_last+0xb5c/0x1330
kernel: [<ffffffff8123ba4f>] path_openat+0x8f/0x680
kernel: [<ffffffff8123d57e>] ? user_path_at_empty+0x6e/0xd0
kernel: [<ffffffff8123d699>] do_filp_open+0x49/0xd0
kernel: [<ffffffff813c266a>] ? find_next_zero_bit+0x1a/0x30
kernel: [<ffffffff8124a4ce>] ? __alloc_fd+0x7e/0x120
kernel: [<ffffffff81229ffa>] do_sys_open+0x13a/0x250
kernel: [<ffffffff8179da97>] ? schedule+0x37/0x90
kernel: [<ffffffff8122a12e>] SyS_open+0x1e/0x20
kernel: [<ffffffff817a1a6e>] system_call_fastpath+0x12/0x71
kernel: Code: 00 48 89 43 20 49 8b 54 24 28 48 85 d2 74 14 0f b7 03 66 25 00 f0 66 3d 00 80 74 0f 48 89 93 48 01 00 00 48 89 d8 5b 41 5c 5d c3 <48> 83 7a 48 00 48 c7 c0 60 7a 82 81 48 c7 c2 80 79 82 81 48 0f
kernel: RIP [<ffffffff81298280>] proc_get_inode+0xc0/0x170
kernel: RSP <ffff88041d057bf8>
kernel: CR2: ffffffffa0a503a8
kernel: ---[ end trace 0996b5ce35a8ba5a ]---
I first thought this was related to running a fresh 4.1.3 kernel but after booting into emergency mode I saw that nouveau was still being loaded.
Ran the command "dracut -f /boot/initramfs-$(uname -r).img $(uname -r)" as stated in /usr/lib/modprobe.d/blacklist-nouveau.conf and afterwards all was good.
Next I noticed the monitors were reversed on GDM, so after logging in, configuring the screens and copying ~/.config/monitors.xml to /var/lib/gdm/.config/ all was fine.

Eos
2nd August 2015, 01:33 AM
Eos, we don't control RPMFusion, FedoraProject, etc. and all we can do is to put a Guide that people should find if they come to this Forum. Not perfect, but until we rule the world, it's what's available. :D

I understand that, but I thought that maybe some of the package maintainers from RPMfusion show up here from time to time.

Anyway I followed jonathonps instructions now, and it just worked. No blacklisting nouveau needed. That was a pleasent surprise. All I had to do manually was a "dnf update"

dreamcarrior
10th August 2015, 09:17 PM
I followed jonathonp's post and everything else that I could have thought of, but my F22 kernel 4.1.3 still does not have a working graphics. gdm starts successfully, but after login, the oops message still shows up, and I cannot get to usual screen. I have the same problem since the kernel 4.0.8 update.

By the way, akmods --force returns that


Checking kmods exist for 4.1.3-201.fc22.x86_64 [ OK ]

I am still using kernel 4.0.7. I hope next kernel update will fix the problem.

Eos
13th August 2015, 01:34 PM
Strange, the akmod is still working flawlessly for me, now using the Kernel 4.1.3-201.fc22.x86_64.

My installation steps were:

Installed the rpmfusion-free and nonfree packages.

Ran "dnf install akmod-nvidia" in a terminal window.

The first reboot after this failed, and the Gnome oops-message showed up. I switched to a log-in screen with crtl+alt+fx, logged in as root, and tried akmods --force. This failed however, because there were some kernel-header packages missing or something. So I ran dnf update which acutally installed a couple of kernel related packages.

After the next reboot the akmod just worked and I had no problems whatsoever since then.

NgBUCKWANGS
23rd August 2015, 09:35 PM
I ran into this same problem on F22 (the last time I used Fedora was v17). It's not as simple in F22 to just install akmod-nvidia, I had to install extra packages (I hate doing this, I can never remember it). But luckily for dnf history info, I got this back and is what I used to get it working

sudo dnf install akmod-nvidia.x86_64 kernel-devel gcc gcc-c++ vdpauinfo libva-vdpau-driver libva-utils xorg-x11-drv-nvidia-libs.i686

Louisda16th
26th September 2015, 01:20 PM
In the first step:


/sbin/lspci | grep VGA

I get,


00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)

However I do have a nVidia graphics card on my laptop (I have a Dell Vostro 14 3446). The output for lspci is the following:


00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 0b)
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b)
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 1 (rev e4)
00:1c.2 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4)
00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4)
00:1c.4 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 5 (rev e4)
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
06:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)
07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
08:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev a1)


Can I still go ahead and install the nVidia driver using the steps given? Or do I need to do something to disable the Intel HD graphics controller (I don't mind the lower battery life if nVidia is running all the time)?

steelaworkn
26th September 2015, 09:47 PM
I gave up with the Nvidia driver for F22. I currently don't have the time to continue the battle. When I think I've got it, a kernel update comes along that botches the system. The only reliable driver is the default. And even that one needs some help to from a 3rd party Repo in order to play a few games (which is pretty rare for me).

But all that into account, Fedora is still my daily driver.

NgBUCKWANGS
26th September 2015, 11:02 PM
This comment http://forums.fedoraforum.org/showpost.php?p=1741325&postcount=16

Louisda16th
30th September 2015, 02:42 PM
Thank you for your reply but that didn't work either :(

I still get the "Something has gone wrong" screen instead of the login screen.

Atsuri
30th September 2015, 10:18 PM
Thank you for your reply but that didn't work either :(

I still get the "Something has gone wrong" screen instead of the login screen.

If you have an integrated and a discreet video chip on a laptop and you want to use the proprietary nVidia drivers, you need Bumblebee. The proprietary driver disables kernel mode setting (KMS), which is needed for co-functioning of both graphics cards. Bumblebee lets you run the nVidia graphics card on demand, per program, while the Intel card still drives the display as before :).

Read up on Bumblebee on Fedora's and Arch Linux's wiki pages and enjoy the convenience :D.

whitefish
9th October 2015, 08:22 AM
Strange, the akmod is still working flawlessly for me, now using the Kernel 4.1.3-201.fc22.x86_64.

My installation steps were:

Installed the rpmfusion-free and nonfree packages.

Ran "dnf install akmod-nvidia" in a terminal window.

The first reboot after this failed, and the Gnome oops-message showed up. I switched to a log-in screen with crtl+alt+fx, logged in as root, and tried akmods --force. This failed however, because there were some kernel-header packages missing or something. So I ran dnf update which acutally installed a couple of kernel related packages.

After the next reboot the akmod just worked and I had no problems whatsoever since then.

Hello. I did a fresh install yesterday. The kernal version is 4.1.8-200.fc22.x86_64. Can you report that nvidia driver is working well if you have the same kernal version?

Atsuri
10th October 2015, 08:55 AM
I can confirm that the nvidia-340xx series akmod works well with the most recent F22 kernel.

As whitefish pointed out through his trial-and-error approach, you need to make sure that you have the kernel headers for this kernel, otherwise the nvidia kernel module will not be compiled properly. For me installing akmod-nvidia-340xx pulled in all of the dependencies, though I would closely inspect the dnf (or yumex-dnf) transaction before proceeding ;).

Louisda16th
17th October 2015, 03:18 PM
If you have an integrated and a discreet video chip on a laptop and you want to use the proprietary nVidia drivers, you need Bumblebee. The proprietary driver disables kernel mode setting (KMS), which is needed for co-functioning of both graphics cards. Bumblebee lets you run the nVidia graphics card on demand, per program, while the Intel card still drives the display as before :).

Read up on Bumblebee on Fedora's and Arch Linux's wiki pages and enjoy the convenience :D.

Thank you so much, this works!

Is it possible to have gnome running with bumblebee? I'd be grateful if you could point me to instructions if it's possible.

bosim
18th October 2015, 08:37 PM
To me bumblebee gives a huge reduction in FPS. What do you guys think about my GPU selection package? (I am quite suprised I didn't get much feedback when I wrote about it in the forum) With bumblebee I got at some situations 30 FPS in X-Plane, however using the NVIDIA card directly I got double FPS (there is apparently a huge overhead in copying frames from NVIDIA card to the Intel card).

https://github.com/paltas/FedoraPrime

Bo

BohdanKornienko
12th November 2015, 12:41 AM
Hello Guys.
I have GeForce GTX960 card.
On freshly installed F22 I have tried to install nVidia driver as said in tutorial (just akmod and akmod-340xx)
But after rebooting I got message "Oh no! Something has gone wrong..."

If I use gdm it shows me this message after booting.
If I use lightdm this message comes up after logging in.

I have tried also install from nvidia official web site. Their run installer. Using this tutorial http://www.if-not-true-then-false.com/2015/fedora-nvidia-guide/ as well. But it gives me an error "Unable to load dkms modules".

I have tried stuff from next links:
https://ask.fedoraproject.org/en/question/64434/fedora21-unable-to-start-after-installing-nvidia-drivers/
https://ask.fedoraproject.org/en/question/69051/why-do-i-get-the-oh-no-something-has-gone-wrong-screen-when-using-the-fedora-22-live-dvd/

and a lot of another examples which I have found in google by keywords like "oh no message, unable to boot after nvidia installed" and so on.

I really do know what to do else.
Please. Could you assist me in solving this problem?

Update:
The final goal is to get drivers working to allow me install Cuda and Caffe framwork.

Piscium
6th June 2016, 11:20 PM
I wish there was a definitive guide for using proprietary Nvidia drivers with Fedora. As there isn't this thread is the best resource, however it has shortcomings in that different people say different things!

So I took things from what different people said and ran these commands:



dnf update
dnf install akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-devel xorg-x11-drv-nvidia-libs gcc kernel-devel vdpauinfo libva-vdpau-driver libva-utils dkms kernel-headers xorg-x11-drv-nvidia-libs.i686

## Backup old initramfs nouveau image ##
ls /boot
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img

## Create new initramfs image ##
dracut --omit-drivers nouveau /boot/initramfs-$(uname -r).img $(uname -r)
ls /boot

# reboot

# After reboot, this command should not output anything:
lsmod |grep nouveau


The above works with the current Fedora 23 kernel (4.5.5-201). "lsmod |grep nouveau" returns nothing.

I still have xorg-x11-drv-nouveau.x86_64 installed.

My question: when the next kernel update arrives do I have to do anything special, such as running dracut again?

dd_wizard
6th June 2016, 11:41 PM
Yes, you'll need to create a file in /etc/dracut.conf.d that tells dracut to omit the nouveau driver when it runs after a kernel upgrade. Check out man dracut.conf for more info, but watch out, the syntax changes for the file compared to the command line! Here's my file to add f2fs support to the kernel:


# cat /etc/dracut.conf.d/99-f2fs.conf
add_drivers+=" f2fs "

If you look at the command line argument to dracut, it's --add-drivers. The missing -- in the file makes sense, but substituting _ for - in the file caught me by surprise the first time. :dis:

dd_wizard

P.S You can test your file by running dracut and sending the output to a file, instead of initramfs. Then you can use lsinitrd on the file to check for nouveau.


# dracut test.img $(uname -r)


# lsinitrd test.img | grep f2fs
drwxr-xr-x 1 root root 0 Jun 6 15:48 usr/lib/modules/4.5.5-201.fc23.x86_64/kernel/fs/f2fs
-rw-r--r-- 1 root root 117224 May 21 09:21 usr/lib/modules/4.5.5-201.fc23.x86_64/kernel/fs/f2fs/f2fs.ko.xz

Piscium
6th June 2016, 11:51 PM
I am always looking for the simplest solution.
If I uninstall the Nouveau driver would I still need to change the dracut configuration per your post?

dd_wizard
6th June 2016, 11:58 PM
As long uninstalling nouveau removes the kernel modules, that should work. I've never had to worry about it since I'm using Intel drivers. Did you see my PS? You can uninstall the nouveau driver, then do a test dracut build and use lsinitrd to look for the nouveau modules in the test.img file.

dd_wizard

Piscium
7th June 2016, 12:18 AM
I did what you suggested (see below), and removing the RPM package for the Nouveau driver did not remove the driver from the dracut image. I suppose that I could manually delete the Nouveau driver from usr/lib/modules/ but I am not sure if when a new kernel arrives it would not be put back.

On the other hand it seems that the Nouveau driver is blacklisted automatically by installing the xorg-x11-drv-nvidia driver. So maybe things are fine as they are and I don't need to do anything else, and indeed it may have been unnecessary to uninstall the Nouveau driver.

What do you think?






[root@tornado tmp]# dracut test.img $(uname -r)
[root@tornado tmp]# lsinitrd test.img | grep nouveau
-rw-r--r-- 1 root root 185 Nov 21 2015 usr/lib/modprobe.d/blacklist-nouveau.conf
drwxr-xr-x 2 root root 0 Jun 7 00:04 usr/lib/modules/4.5.5-201.fc23.x86_64/kernel/drivers/gpu/drm/nouveau
-rw-r--r-- 1 root root 442452 May 21 17:21 usr/lib/modules/4.5.5-201.fc23.x86_64/kernel/drivers/gpu/drm/nouveau/nouveau.ko.xz
[root@tornado tmp]# dnf remove xorg-x11-drv-nouveau
Dependencies resolved.
================================================== ================================================== ==============================
Package Arch Version Repository Size
================================================== ================================================== ==============================
Removing:
xorg-x11-drv-nouveau x86_64 1:1.0.12-3.fc23 @System 217 k

Transaction Summary
================================================== ================================================== ==============================
Remove 1 Package

Installed size: 217 k
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Erasing : xorg-x11-drv-nouveau-1:1.0.12-3.fc23.x86_64 1/1
Verifying : xorg-x11-drv-nouveau-1:1.0.12-3.fc23.x86_64 1/1

Removed:
xorg-x11-drv-nouveau.x86_64 1:1.0.12-3.fc23

Complete!
[root@tornado tmp]# dracut test2.img $(uname -r)
[root@tornado tmp]# lsinitrd test2.img | grep nouveau
-rw-r--r-- 1 root root 185 Nov 21 2015 usr/lib/modprobe.d/blacklist-nouveau.conf
drwxr-xr-x 2 root root 0 Jun 7 00:07 usr/lib/modules/4.5.5-201.fc23.x86_64/kernel/drivers/gpu/drm/nouveau
-rw-r--r-- 1 root root 442452 May 21 17:21 usr/lib/modules/4.5.5-201.fc23.x86_64/kernel/drivers/gpu/drm/nouveau/nouveau.ko.xz

[root@tornado tmp]# yum provides */blacklist-nouveau.conf
Yum command has been deprecated, redirecting to '/usr/bin/dnf provides */blacklist-nouveau.conf'.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run:
'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'

Last metadata expiration check: 0:03:01 ago on Tue Jun 7 00:04:59 2016.
xorg-x11-drv-nvidia-1:358.16-2.fc23.x86_64 : NVIDIA's proprietary display driver for NVIDIA graphic cards
Repo : @System

xorg-x11-drv-nvidia-340xx-1:340.96-1.fc23.x86_64 : NVIDIA's 340xx series proprietary display driver for NVIDIA graphic cards
Repo : rpmfusion-nonfree-updates

xorg-x11-drv-nvidia-304xx-304.131-1.fc23.x86_64 : NVIDIA's 304xx serie proprietary display driver for NVIDIA graphic cards
Repo : rpmfusion-nonfree-updates

xorg-x11-drv-nvidia-1:358.16-2.fc23.x86_64 : NVIDIA's proprietary display driver for NVIDIA graphic cards
Repo : rpmfusion-nonfree-updates

dd_wizard
7th June 2016, 12:37 AM
If nouveau is blacklisted, you should be good. Did you reboot after you removed nouveau and before you ran dracut?

dd_wizard

Piscium
7th June 2016, 01:08 AM
No, I hadn't rebooted after uninstalling the Nouveau driver, but I rebooted just a moment ago and it did not make any difference with respect to the output of lsinitrd.

Cool. So the problem is solved (hopefully) and I will have the confirmation only when the next kernel update appears.

Thanks a lot for your help!

Cheers.





[root@tornado tmp]# dracut test3.img $(uname -r)
[root@tornado tmp]# lsinitrd test3.img | grep nouveau
-rw-r--r-- 1 root root 185 Nov 21 2015 usr/lib/modprobe.d/blacklist-nouveau.conf
drwxr-xr-x 2 root root 0 Jun 7 01:02 usr/lib/modules/4.5.5-201.fc23.x86_64/kernel/drivers/gpu/drm/nouveau
-rw-r--r-- 1 root root 442452 May 21 17:21 usr/lib/modules/4.5.5-201.fc23.x86_64/kernel/drivers/gpu/drm/nouveau/nouveau.ko.xz
[root@tornado tmp]# dnf provides */nouveau.ko.xz
Last metadata expiration check: 0:58:28 ago on Tue Jun 7 00:04:59 2016.
kernel-modules-4.4.3-300.fc23.x86_64 : kernel modules to match the core kernel
Repo : @System

kernel-modules-4.4.5-300.fc23.x86_64 : kernel modules to match the core kernel
Repo : @System

kernel-modules-4.4.6-300.fc23.x86_64 : kernel modules to match the core kernel
Repo : @System

kernel-modules-4.4.6-301.fc23.x86_64 : kernel modules to match the core kernel
Repo : @System

kernel-modules-4.4.8-300.fc23.x86_64 : kernel modules to match the core kernel
Repo : @System

kernel-modules-4.4.9-300.fc23.x86_64 : kernel modules to match the core kernel
Repo : @System

kernel-modules-4.5.5-201.fc23.x86_64 : kernel modules to match the core kernel
Repo : @System

kernel-debug-modules-4.5.5-201.fc23.x86_64 : kernel modules to match the core kernel
Repo : updates

kernel-modules-4.5.5-201.fc23.x86_64 : kernel modules to match the core kernel
Repo : updates

kernel-debug-modules-4.2.3-300.fc23.x86_64 : kernel modules to match the core kernel
Repo : fedora

kernel-modules-4.2.3-300.fc23.x86_64 : kernel modules to match the core kernel
Repo : fedora

Piscium
9th June 2016, 07:46 PM
A new kernel version arrived for F23, 4.5.6-200, and Nvidia still works fine without me doing anything special.

Below is my updated procedure in case someone needs it. It should work for new-ish Nvidia cards (mine is 3 years old).

I installed the dkms package because someone recommended it in this thread, though I am not sure it is needed. Also I installed a few packages recommended in the RPM Fusion website such as vdpauinfo though again I am not sure they are needed. In any case, these packages are not causing me any harm. There is no need to uninstall the Nouveau driver.

I am left wondering why we even need such a procedure. For example, why doesn't installing akmod-nvidia and xorg-x11-drv-nvidia pull all the other needed packages and run dracut? I know nothing about packaging so maybe there is a good reason for that! :)



# Run the commands below as root or with sudo

# Make sure we are up to date
dnf update

# Install a bunch of packages
# This is an explicit list and it could be made shorter as some packages depend on others, the long list is just for clarity
dnf install akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-devel xorg-x11-drv-nvidia-libs gcc kernel-devel vdpauinfo libva-vdpau-driver libva-utils dkms kernel-headers xorg-x11-drv-nvidia-libs.i686

ls /boot

# Backup old initramfs nouveau image.
# There are two alternatives to this: delete old image or use the parameter "--force" in dracut below
mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img

# Create new initramfs image
# There is no need to use "--omit-drivers nouveau" because the nouveau driver is automatically blacklisted as a result of installing xorg-x11-drv-nvidia
dracut /boot/initramfs-$(uname -r).img $(uname -r)

ls /boot

# Reboot
# reboot

# After reboot, this command should not output anything if the Nvidia driver is being used:
lsmod |grep nouveau