Bug 27100 - dkms fails to build the nvidia390 modules for the kernel 5.8.*
Summary: dkms fails to build the nvidia390 modules for the kernel 5.8.*
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: High major
Target Milestone: Mageia 8
Assignee: Kernel and Drivers maintainers
QA Contact:
URL:
Whiteboard: MGA7TOO
Keywords: 8beta1
: 27152 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-13 08:17 CEST by Aurelian R
Modified: 2021-01-15 21:17 CET (History)
6 users (show)

See Also:
Source RPM: nvidia390-390.138-2.mga8.nonfree.src.rpm
CVE:
Status comment:


Attachments
make.log in the build directory (21.43 KB, text/plain)
2020-08-13 08:20 CEST, Aurelian R
Details

Description Aurelian R 2020-08-13 08:17:54 CEST
Description of problem:

dkms fails to build the nvidia340 module for the kernel 5.8.
It works with the latest kernel 5.7 and previous kernels from cauldron.

$ lspci | grep NVIDIA
0b:00.0 VGA compatible controller: NVIDIA Corporation GF116 [GeForce GTX 550 Ti] (rev a1)
0b:00.1 Audio device: NVIDIA Corporation GF116 High Definition Audio Controller (rev a1)
$ dkms status
nvidia390, 390.138-2.mga8.nonfree, 5.7.12-desktop-1.mga8, x86_64: installed
$ dkms build -m nvidia390 -v 390.138-2.mga8.nonfree -k 5.8.1-desktop-2.mga8 

Preparing kernel 5.8.1-desktop-2.mga8 for module build:
(This is not compiling a kernel, just preparing kernel symbols)
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper....(bad exit status: 2)
using /boot/config-5.8.1-desktop-2.mga8
make oldconfig....
make prepare....(bad exit status: 2)

Building module:
cleaning build area....
'make' -j16 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/5.8.1-desktop-2.mga8/build modules.....(bad exit status: 2)

Error! Bad return status for module build on kernel: 5.8.1-desktop-2.mga8 (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/nvidia390/390.138-2.mga8.nonfree/build/ for more information.

Version-Release number of selected component (if applicable):

$ rpm -qa | egrep  '(kernel|dkms|nvidia)' | sort
dkms-2.0.19-41.mga8
dkms-minimal-2.0.19-41.mga8
dkms-nvidia390-390.138-2.mga8.nonfree
kernel-desktop-5.7.12-1.mga8-1-1.mga8
kernel-desktop-5.8.1-2.mga8-1-1.mga8
kernel-desktop-devel-5.7.12-1.mga8-1-1.mga8
kernel-desktop-devel-5.8.1-2.mga8-1-1.mga8
kernel-desktop-devel-latest-5.8.1-2.mga8
kernel-desktop-latest-5.8.1-2.mga8
kernel-firmware-20200721-1.mga8
kernel-firmware-nonfree-20200721-1.mga8.nonfree
kernel-userspace-headers-5.8.1-2.mga8
nvidia390-doc-html-390.138-2.mga8.nonfree
x11-driver-video-nvidia390-390.138-2.mga8.nonfree

How reproducible:
Always.

Steps to Reproduce:
1.install kernel 5.8 with nvidia390 driver
2.
3.
Comment 1 Aurelian R 2020-08-13 08:20:00 CEST
Created attachment 11803 [details]
make.log in the build directory
Comment 2 Aurelien Oudelet 2020-08-13 11:09:28 CEST
Thanks for reporting this.


Assigning to Kernel and Drivers maintainers.

Seems to exist since kernel 5.8.0.

Target Milestone: --- => Mageia 8
Keywords: (none) => 8beta1
Priority: Normal => release_blocker
Assignee: bugsquad => kernel
CC: (none) => ouaurelien
Source RPM: (none) => nvidia390-390.138-2.mga8.nonfree.src.rpm, x11-driver-video-nvidia390
Whiteboard: (none) => Since Kernel 5.8.0 in Cauldron
Severity: normal => major

Comment 3 David Walser 2020-08-13 16:16:57 CEST
Please leave this bug open and set version to 7 once it's fixed in Cauldron.

*After* the current kernel and nvidia updates in core/updates_testing are pushed for Mageia 7, we'll need to fix this issue in Mageia 7 as well, as we'll be preparing to update again to kernel 5.8.

Whiteboard: Since Kernel 5.8.0 in Cauldron => MGA7TOO
Source RPM: nvidia390-390.138-2.mga8.nonfree.src.rpm, x11-driver-video-nvidia390 => nvidia390-390.138-2.mga8.nonfree.src.rpm

Comment 4 Maurice Batey 2020-08-16 18:34:20 CEST
(In reply to Aurelian R from comment #0)
> Description of problem:
> 
> dkms fails to build the nvidia340 module for the kernel 5.8.
> It works with the latest kernel 5.7 and previous kernels from cauldron.
> Controller (rev a1)

Same problem here for the nvidia430 module (Kernel 5.8.1-desktop-2.mga8) since Cauldron update 3 days ago. 

If I accept the MCC/Hardware/Graphics invitation to install the proprietary nVidia driver, it appears to be a no-op. 

 In fact, each time I boot the the Mga8 install it now shows "Building nvidia-current driver" though today I noticed an in-boot screen message "The nouveau driver has been installed. The proprietary driver could not be found in Xorg..."
   Is there a way of providing the missing driver, I wonder...

But although after recent Cauldron updates the green nVidia desktop icon has re-appeared, it is a no-op, and Sysinfo/Graphics entries show "OpenGL: Could not initialise OpenGL/GLXor (ES)/EGL", and 'Wayland' is empty.

This follows several months of trouble-free auto-install of the proprietary driver.

The nVidia card installed is a GeForce GT730.

Install is 64-bit Plasma Mga8.



--

CC: (none) => maurice

Comment 5 Martin Whitaker 2020-08-16 23:03:16 CEST
The 5.8 series kernel makes a symbol used by the nvidia390 module GPL-only:

  https://www.spinics.net/lists/linux-fsdevel/msg173844.html

No fix is available yet.

CC: (none) => mageia

Comment 6 Maurice Batey 2020-08-17 17:09:19 CEST
(In reply to Martin Whitaker from comment #5)
> The 5.8 series kernel makes a symbol used by the nvidia390 module GPL-only:
> 
>   https://www.spinics.net/lists/linux-fsdevel/msg173844.html
> 
> No fix is available yet.

Clarification much appreciated!
Comment 7 Maurice Batey 2020-08-17 18:19:01 CEST
Mga8 desktop login now freezes, but can get get DNF updates done via tty2 as root.
Comment 8 Martin Whitaker 2020-08-20 21:52:08 CEST
*** Bug 27152 has been marked as a duplicate of this bug. ***

CC: (none) => joselp

Comment 9 Martin Whitaker 2020-08-20 21:57:37 CEST
From what I can find, the Ubuntu solution is to revert that change in their kernel, and the openSUSE solution is to disable the uvm module (which IIUC will break CUDA applications).
Comment 10 David Walser 2020-08-20 23:05:23 CEST
Apparently Giuseppe found a patch from Arch for nvidia390 to fix this.

See nvidia390-390.138-4.mga8.

If someone could package up the nvidia340 and nvidia390 fixes for kernel 5.8 for Mageia 7, that would be great, as we will need them fixed there.  I'm not sure if nvidia-current needs to be fixed.

CC: (none) => ghibomgx

Comment 11 Maurice Batey 2020-08-20 23:26:26 CEST
Only for nvidia390?

Any hope for e.g. nvidia430?
Comment 12 Martin Whitaker 2020-08-20 23:41:04 CEST
(In reply to David Walser from comment #10)
> Apparently Giuseppe found a patch from Arch for nvidia390 to fix this.
> 
> See nvidia390-390.138-4.mga8.

Nope, I already applied that patch. It fixes some other build issues, but not the one described in comment 5. I couldn't find what Arch have done to work round the problem (if they have).

(In reply to Maurice Batey from comment #11)
> Only for nvidia390?
> 
> Any hope for e.g. nvidia430?

Do you mean nvidia-current? That's on version 450 now. It builds and installs fine here (I don't have the hardware to test if it works). Check you have the latest version (dkms-nvidia-current-450.57-3.mga8).
Comment 13 Giuseppe Ghibò 2020-08-21 10:13:20 CEST
The rest of the patch would be to revert the kernel commit cfa6705d89b6562f79c40c249f8d94073c4276e4 in kernel-5.8.

Regarding mga7 we don't have kernel 5.8 yet, do we? I read it's planned, though I think it's a bit premature for now for mga7 to switch to 5.8, better wait it stabilizes a bit, as well as for all the external modules, e.g. vbox, etc. On the other and there is 5.7.16 out.

With kernel up to 5.8 upstream both nvidia 450.57 and 450.66 works without any extra patchset (it seems they need patches for kernel 5.9 currently in rc1). For nvidia-430.64 don't know if needs extra patches under kernel 5.8 (probably yes, though there is already 450.57 for mga7 too).
Comment 14 Maurice Batey 2020-08-21 12:49:43 CEST
(In reply to Martin Whitaker from comment #12)
..... 
> > Any hope for e.g. nvidia430?
> 
> Do you mean nvidia-current? That's on version 450 now. It builds and
> installs fine here (I don't have the hardware to test if it works). 

On both Mg7 & Mga8 nvidia430 has been smoothly auto-installed here, until (as mentioned above) Mga8 is now routinely freezing at normal desktop login, though I'm hopefully doing Cauldron updates via tty2/root.

Do you mean the system will auto-switch the driver to nvidia450 here?

> Check you have the latest version (dkms-nvidia-current-450.57-3.mga8).

  How does one do that from root/tty2 (as desktop login freezes).
(Mounting Mga/root, can see no sign of any file in fully-updated Mga8/root with anything resembling that filename...)
Comment 15 David Walser 2020-08-21 23:59:20 CEST
Yes we'll need to fix nvidia-current in mga7 if 430 needs patched for 5.8.  Of course we won't switch mga7 to kernel 5.8 until we have fixed all of the things.
Comment 16 Aurelian R 2020-08-29 09:14:04 CEST
 The last kernel 5.8.5-desktop-2.mga8 fixed the installation of nvidia390 driver. It looks like reverting the "radix-tree: Use local_lock for protection" kernel patch did it. I've tested vlc, glmark2, youtube and everything looks fine for me.
 Thanks for your great job.
Comment 17 Jose Manuel López 2020-09-01 06:11:15 CEST
Hi,

I have tried installing dkms-nvidia with the latest kernel update, and it works fine. Not so the Mageia-prime tool, it keeps trying to download the latest Nvidia driver which is not correct for my Fermi chipset card. I will report it again in the bug:https://bugs.mageia.org/show_bug.cgi?id=24967

Because now if I can install the Nvidia driver manually and dkms-nvidia works fine, but I still can't switch to the dedicated card on my laptop ...
Comment 18 Aurelien Oudelet 2020-12-03 14:24:04 CET
https://bugs.mageia.org/show_bug.cgi?id=27676

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 19 Eric Petit 2021-01-15 20:49:48 CET
Hello bug is back today with the last kernel update and dkms-nvidia340
'make' -j4 SYSSRC=/lib/modules/5.10.6-desktop-1.mga7/build module..............(bad exit status: 2)

Error! Bad return status for module build on kernel: 5.10.6-desktop-1.mga7 (x86_64)

log : https://termbin.com/5x6j

Ever confirmed: 1 => 0
Resolution: FIXED => (none)
Status: RESOLVED => UNCONFIRMED
CC: (none) => surfzoid

Comment 20 Eric Petit 2021-01-15 20:50:37 CET
i forget 
uname -a
Linux linux.local 5.10.6-desktop-1.mga7 #1 SMP Sat Jan 9 20:09:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Comment 21 Thomas Backlund 2021-01-15 21:09:42 CET
Sorry about that...
I tested the build but unfortunately I used the Cauldron srpm, and forgot to add the same fix to Mga7.


There is now a  nvidia340-340.108-9.mga7 building and heading to nonfree updates_testing...


please test it out as soon as it's available so we can push it to updates if it works for you

Keywords: 8beta1 => (none)
Summary: dkms fails to build the nvidia390 modules for the kernel 5.8.* => dkms fails to build the nvidia390 modules for the kernel 5.10.*
Priority: release_blocker => High
Target Milestone: Mageia 8 => Mageia 7
Whiteboard: MGA7TOO => (none)
Version: Cauldron => 7

Comment 22 Thomas Backlund 2021-01-15 21:17:55 CET
closing this again as it was about nvidia390, and you reported about nvidia340.

please report your tests in:
https://bugs.mageia.org/show_bug.cgi?id=28107

Version: 7 => Cauldron
Keywords: (none) => 8beta1
Summary: dkms fails to build the nvidia390 modules for the kernel 5.10.* => dkms fails to build the nvidia390 modules for the kernel 5.8.*
Resolution: (none) => FIXED
Whiteboard: (none) => MGA7TOO
Status: UNCONFIRMED => RESOLVED
Target Milestone: Mageia 7 => Mageia 8


Note You need to log in before you can comment on or make changes to this bug.