Help me install Nvidia 340.101 drivers on a Macbook 1342 running Fedora 25 without Blank Screen

Hello,

I am running Fedora 25 with the 4.8.14 kernel on a Macbook A1342, which has a Nvidia 320M (non optimus) GPU. I followed the instructions here —> https://www.if-not-true-then-false.com/2015/fedora-nvidia-guide/ to a T and got a successful install.

However, after performing:

systemctl set-default graphical.target 
reboot

Upon my first boot up, and every other time since, the system booted up fine, the fedora logo displays, some lines appear and the screen just goes blank/shuts off. I was able to log in with runlevel 3 by using the ‘e’ ‘3’ ‘F10’ mode on startup, and after typing:

lspci -nnk |grep -iA2 VGA

The following output is displayed:

Kernel driver in use: nvidia

I am thinking that maybe there is something wrong with the nvidia driver at some point during boot, but I have no idea where/how to find exactly where the error is…

When I booted using the 4.8.6 kernel, and also in rescue mode, everything seemed to work, but after the fedora logo appears, lines of code appear and it just hangs on that. CTRL+ALT+F2-F12 does nothing.

I reinstalled fedora, and then tried using this method—>http://negativo17.org/nvidia-driver/. However, when I type nvidia into gnome software, nothing was displayed, so i’m assuming my PCI ID was not in that repo…

The last method I tried was installing via this method—>https://rpmfusion.org/Howto/nVidia#Newer_GeForce which led to a successful install, and I was able to see the Nvidia X Server in my applications, but it kept telling me to close X by typing

nvidia-xconfig

I also read on that rpmfusion site that X will automatically get shut off after a reboot, so I rebooted the system and the blank screen issue happened once again.

At this point, I have reinstalled Fedora 25, and am running on the nouveau driver, but I would really like to get the nvidia drivers on there.

I also want to add that I had the same exact issues on openSuse 42.2 (which is what I tried prior to switching distros).

Any help will be greatly appreciated!

I’m almost 100% certain you are experiencing the issue already discussed (and resolved) in the following recent forum post:

Latest NVIDIA Driver 340.101 Builds / Compiles Properly, but Fails to Load (has errors) with Linux Kernel 4.9 [RESOLVED with PATCH]”

Link: [url]https://devtalk.nvidia.com/default/topic/982052/linux/latest-nvidia-driver-340-101-builds-compiles-properly-but-fails-to-load-has-errors-with-linux-kernel-4-9-resolved-with-patch-/[/url]

You must first apply the PATCH provided in that post, after that, load the driver and install the libraries. Instructions are also given.

Since you are not on Linux Kernel 4.9, it’s also possible you may need to rebuild your Boot Loader Initialized RAM disk (“Initrd”) so that it contains your new NVIDIA driver upon boot-up. This must always be done in any matter.

Let me know how it goes!

Please mark this post as resolved when done.

Thank you for the reply!

I patched the 340.101 file prior to installation, as outlined in your linked post, and then successfully installed it, however, once again. The blank screen issue still persists…

upon inspection of the nvidia-bug-report.log, I found this, which is puzzling:

*** /var/lib/dkms/nvidia/340.101/4.8.13-300.fc25.x86_64/x86_64/log/make.log
*** ls: -rw-r--r--. 1 root root 634313 2016-12-19 14:59:33.292991266 -0800 /var/lib/dkms/nvidia/340.101/4.8.13-300.fc25.x86_64/x86_64/log/make.log
DKMS make.log for nvidia-340.101 for kernel 4.8.13-300.fc25.x86_64 (x86_64)
Mon Dec 19 14:58:55 PST 2016
NVIDIA: calling KBUILD...
make[1]: Entering directory '/usr/src/kernels/4.8.13-300.fc25.x86_64'
make -C /lib/modules/4.8.13-300.fc25.x86_64/build KBUILD_SRC=/usr/src/kernels/4.8.13-300.fc25.x86_64 \
-f /usr/src/kernels/4.8.13-300.fc25.x86_64/Makefile modules
make[2]: Entering directory '/usr/src/kernels/4.8.13-300.fc25.x86_64'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (		\
echo >&2;							\
echo >&2 "  ERROR: Kernel configuration is invalid.";		\
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";	\
echo >&2 ;

so I tried running

make oldconfig && make prepare /usr/src/kernels/4.8.13-300.fx25.x86_64

and I receive this error

make: *** No rule to make target 'oldconfig'. Stop.

so I decided to run

locate autoconf.h | grep 4.8.13

with this output

/usr/src/kernels/4.8.13-300.fc25.x86_64/include/generated/autoconf.h

followed by

locate auto.conf | grep 4.8.13

with the output

/usr/src/kernels/4.8.13-300.fc25.x86_64/include/config/auto.conf
/usr/src/kernels/4.8.13-300.fc25.x86_64/include/config/auto.conf.cmd

Hmm… I’m trying to recompile the boot loader, but not having success using mkinitrd so far

Recompiling your Linux Kernel is NOT the solution.

You must rebuild your “initrd” file by running: “dracut --force” in root. This will then include your NVIDIA driver in the initrd image upon boot-up.

Before you run that, please show me the output of your initrd file by running: “lsinitrd”.

Also, show me the output for “lsmod”.

Alright, as requested:

lsinitrd | less

Image: /boot/initramfs-4.8.14-300.fc25.x86_64.img: 20M
=======================================================
EARLY CPIO image
=======================================================
drwxr-xr-x     3 root           root                      0 Nov   7 01:59  .
-rw-r--r--      1 root            root                      2 Nov   7 01:59  early_cpio
drwxr-xr-x     3 root           root                      0 Nov   7 01:59  kernel
drwxr-xr-x     3 root           root                      0 Nov   7 01:59  kernel/x86
drwxr-xr-x     2 root           root                      0 Nov   7 01:59  kernel/x86/microcode
-rw-r--r--      1 root            root             24576 Nov   7 01:59  kernel/x86/microcode/GenuineIntel.bin
========================================================
Version  dracut-044-78.fc25

Arguments:  --force

dracut modules:
bash
systemd
systemd-initrd
nss-softokn
i18n
network
ifcfg
drm
plymouth
dm
kernel-modules
kernel-network-modules
lvm
fcoe
fcoe-uefi
resume
rootfs-block
terminfo
udev-rules
dracut-systemd
usrmount
base
fs-lib
shutdown
uefi-lib
========================================================
drwxr-xr-x    12 root           root                       0 Nov   7 01:59  .
crw-r--r--       1 root           root            5,        1 Nov   7 01:59  dev/console
crw-r--r--       1 root           root            1,       11 Nov   7 01:59  dev/kmsg
crw-r--r--       1 root           root            1,        3 Nov   7 01:59  dev/null
lrwxrwxrwx     1 root           root                       0 Nov   7 01:59  bin -> usr/bin
drwxr-xr-x      2 root           root                       0 Nov   7 01:59  dev
drwxr-xr-x    13 root           root                       0 Nov   7 01:59  etc

I am having trouble outputting the results of lsmod to a file at the moment

I could see already that your initrd or initramfs (same thing) is old, dated Nov 7th, and definitely does not include your latest NVIDIA driver build.

Do this, in root:

dracut --force

Then reboot. You should no longer be getting a “blank” screen and it should work. Let me know.

Note: To output into a file use “>” (pipe symbol).

Hence, lsmod > module_listing
Also, lsinitrd > initrd_listing

As recommended, I performed dracut --force in root and rebooted, but the blank screen still persists… it looks like gnome may be fighting something?

I have taken a video of it and will try to post here at the bottom.

In the meantime, thanks to your help, I have gotten lsmod and lsinitrd to .txt files (since performing dracut --force), It appears they are still dated Nov 7th, and I don’t know why…

Anyway, here they are (attached)
lsmod.txt (4.74 KB)
lsinitrd.txt (190 KB)

This should give you a better idea of what is happening…

I can’t seem to embed it, so here is a link:

Does the very last line in the below mean anything? (kernel modules: nouveau, nvidia)

lspci -vnn | grep -i nvidia
00:00.0 Host bridge [0600]: NVIDIA Corporation MCP89 HOST Bridge [10de:0d60] (rev a1)
00:00.1 RAM memory [0500]: NVIDIA Corporation MCP89 Memory Controller [10de:0d68] (rev a1)
00:01.0 RAM memory [0500]: NVIDIA Corporation Device [10de:0d6d] (rev a1)
00:01.1 RAM memory [0500]: NVIDIA Corporation Device [10de:0d6e] (rev a1)
00:01.2 RAM memory [0500]: NVIDIA Corporation Device [10de:0d6f] (rev a1)
00:01.3 RAM memory [0500]: NVIDIA Corporation Device [10de:0d70] (rev a1)
00:02.0 RAM memory [0500]: NVIDIA Corporation Device [10de:0d71] (rev a1)
00:02.1 RAM memory [0500]: NVIDIA Corporation Device [10de:0d72] (rev a1)
00:03.0 ISA bridge [0601]: NVIDIA Corporation MCP89 LPC Bridge [10de:0d80] (rev a2)
00:03.1 RAM memory [0500]: NVIDIA Corporation MCP89 Memory Controller [10de:0d7b] (rev a1)
00:03.2 SMBus [0c05]: NVIDIA Corporation MCP89 SMBus [10de:0d79] (rev a1)
	Subsystem: NVIDIA Corporation Device [10de:cb89]
00:03.3 RAM memory [0500]: NVIDIA Corporation MCP89 Memory Controller [10de:0d69] (rev a1)
00:03.4 Co-processor [0b40]: NVIDIA Corporation MCP89 Co-Processor [10de:0d7a] (rev a1)
	Subsystem: NVIDIA Corporation Device [10de:cb89]
00:04.0 USB controller [0c03]: NVIDIA Corporation MCP89 OHCI USB 1.1 Controller [10de:0d9c] (rev a1) (prog-if 10 [OHCI])
	Subsystem: NVIDIA Corporation Device [10de:cb89]
00:04.1 USB controller [0c03]: NVIDIA Corporation MCP89 EHCI USB 2.0 Controller [10de:0d9d] (rev a2) (prog-if 20 [EHCI])
	Subsystem: NVIDIA Corporation Device [10de:cb89]
00:06.0 USB controller [0c03]: NVIDIA Corporation MCP89 OHCI USB 1.1 Controller [10de:0d9c] (rev a1) (prog-if 10 [OHCI])
	Subsystem: NVIDIA Corporation Device [10de:cb89]
00:06.1 USB controller [0c03]: NVIDIA Corporation MCP89 EHCI USB 2.0 Controller [10de:0d9d] (rev a2) (prog-if 20 [EHCI])
	Subsystem: NVIDIA Corporation Device [10de:cb89]
00:08.0 Audio device [0403]: NVIDIA Corporation MCP89 High Definition Audio [10de:0d94] (rev a2)
	Subsystem: NVIDIA Corporation Device [10de:cb89]
00:09.0 Ethernet controller [0200]: NVIDIA Corporation MCP89 Ethernet [10de:0d7d] (rev a1)
00:0a.0 SATA controller [0106]: NVIDIA Corporation MCP89 SATA Controller (AHCI mode) [10de:0d88] (rev a2) (prog-if 01 [AHCI 1.0])
00:0b.0 RAM memory [0500]: NVIDIA Corporation Device [10de:0d75] (rev a1)
00:15.0 PCI bridge [0604]: NVIDIA Corporation Device [10de:0d9b] (rev a1) (prog-if 00 [Normal decode])
	Capabilities: [40] Subsystem: NVIDIA Corporation Device [10de:0000]
00:17.0 PCI bridge [0604]: NVIDIA Corporation MCP89 PCI Express Bridge [10de:0d76] (rev a1) (prog-if 00 [Normal decode])
	Capabilities: [40] Subsystem: NVIDIA Corporation Device [10de:0000]
02:00.0 VGA compatible controller [0300]: NVIDIA Corporation MCP89 [GeForce 320M] [10de:08a0] (rev a2) (prog-if 00 [VGA controller])
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia

Alright… Here we go…

ejmarkow met with me on irc and helped me with a few things…

First, we found out that legacy nvidia drivers absolutely do not work with wayland. I was initially running Fedora 25 (which uses wayland on gnome 3.22). It would not work, no matter what…

So, I switched distros, to openSUSE Leap 42.2 (which does not use wayland)…

With ejmarkow’s assistance, and his patch (mentioned on post #2) in this thread… We got it working.

I also had to update my kernel on SUSE to 4.9 (to use his patch, and since I wanted to be up to date as I was with F25).

So now the main question is this: When will NVIDIA update their legacy drivers to support wayland? and for this reason, this will remain unresolved (since my issue was with Fedora 25, not openSUSE)

Since it seems like a potential new standard going forward (at least for red-hat distros)…

The legacy driver will never get wayland support.

http://nvidia.custhelp.com/app/answers/detail/a_id/3142

F25 gnome has a option at login to switch to xorg session.
Fedora also has several other desktop spins that don’t use wayland.

https://spins.fedoraproject.org/

Yes, but I couldn’t even get to the login screen in the first place, watch my youtube video.

Also, I am aware of the other spins… but none of those use Gnome, hence the reason behind this post… Using Gnome 4.22 with F25.

I am using gentoo linux amd64 with a kernel 4.8.14 in a pc with Intel dual core with Nvidia geforce 210.

Can I use your patch in my system and compile with good luck?

I try to compile the nvidia-drivers 340.101 but this process failed.