Bug 27421 - nvidia390 is not working with kernel 5.9.0
Summary: nvidia390 is not working with kernel 5.9.0
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Kernel and Drivers maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-15 01:03 CEST by Aurelian R
Modified: 2021-01-16 10:29 CET (History)
2 users (show)

See Also:
Source RPM: nvidia390-390.138-9.mga8.nonfree
CVE:
Status comment:


Attachments
log file for dkms-nvidia390.138, kernel 5.9 (112.83 KB, text/plain)
2020-10-15 09:44 CEST, Aurelian R
Details

Description Aurelian R 2020-10-15 01:03:45 CEST
Description of problem:

Updating to kernel 5.9.0 x86_64 breaks nvidia390 driver (or vice-versa!). Found a patch that seems to address the errors seen during the dkms build but I haven't been successful with it yet. 
Link to patch:

https://gitlab.com/EULA/snippets/-/commit/edc9a86f7769c9b3e8d449425013db5f94b6c8fa#508579d8b944d38e968d77a39f54f0f46c764c98

How reproducible:
Always 

Steps to Reproduce:
1.Install kernel-5.9.0

2.Try to build nvidia for it

$ dkms build --verbose -m nvidia390 -v 390.138-9.mga8.nonfree -k 5.9.0-desktop-1.mga8 
Preparing kernel 5.9.0-desktop-1.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
Makefile:1484: *** insufficient number of arguments (1) to function 'addprefix'.  Stop.
(bad exit status: 2)
using /boot/config-5.9.0-desktop-1.mga8
make KERNELRELEASE=5.9.0-desktop-1.mga8 oldconfig
scripts/kconfig/conf  --oldconfig Kconfig
#
# configuration written to .config
#

make -j16 KERNELRELEASE=5.9.0-desktop-1.mga8 prepare scripts
Makefile:1484: *** insufficient number of arguments (1) to function 'addprefix'.  Stop.
(bad exit status: 2)

Building module:
make -C /lib/modules/5.9.0-desktop-1.mga8/build M=/var/lib/dkms/nvidia390/390.138-9.mga8.nonfree/build clean
make: Entering directory '/usr/src/kernel-5.9.0-desktop-1.mga8'
make: Leaving directory '/usr/src/kernel-5.9.0-desktop-1.mga8'

'make' -j16 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/5.9.0-desktop-1.mga8/build modules >> /var/lib/dkms/nvidia390/390.138-9.mga8.nonfree/build/make.log 2>&1
(bad exit status: 2)

Error! Bad return status for module build on kernel: 5.9.0-desktop-1.mga8 (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/nvidia390/390.138-9.mga8.nonfree/build/ for more information.
Comment 1 Aurelien Oudelet 2020-10-15 01:33:58 CEST
Hi, thanks for pointing out this.
5.9.0 Kernel has just landed in Cauldron this October 14th, 2020. 

When a new kernel series landed, we need to rebuild all Kernel modules for it.

Also, providing /var/lib/dkms/nvidia390/390.138-9.mga8.nonfree/build/make.log
will be useful. Can you do it?

Assigning to Kernel and Drivers maintainers.
Cc'ed Guiseppe.

CC: (none) => ghibomgx
Assignee: bugsquad => kernel

Comment 2 Dave Hodgins 2020-10-15 01:37:17 CEST
The problem was mentioned on the usenet news group alt.os.linux, with a link to
https://forums.developer.nvidia.com/t/opencl-not-working-with-kernel-5-9/156941

The patch in the Description can not be applied to a package that Mageia
distributes. Changing the license in the source code would be a violation
of that license, making Mageia legally responsible.

From https://www.nvidia.com/en-us/drivers/nvidia-license/
2.1.2 Linux/FreeBSD Exception. Notwithstanding the foregoing terms of Section 2.1.1, SOFTWARE designed exclusively for use on the Linux or FreeBSD operating systems, or other operating systems derived from the source code to these operating systems, may be copied and redistributed, provided that the binary files thereof are not modified in any way (except for unzipping of compressed files).

Altering the source and recompiling the drivers is not allowed based on the
above license term.

While 5.9 has been made available on cauldron, the update to kernel 5.9 on
Mageia 7 will be held until this has been resolved in a way that works, without
violating the package license.

CC: (none) => davidwhodgins

Comment 3 Aurelian R 2020-10-15 09:44:20 CEST
Created attachment 11941 [details]
log file for dkms-nvidia390.138, kernel 5.9
Comment 4 Aurelian R 2020-10-15 09:58:31 CEST
(In reply to Dave Hodgins from comment #1)
Uploaded the log file. 

(In reply to Dave Hodgins from comment #2)
Thanks for the info and heads-up.
Comment 5 David Walser 2020-10-15 18:51:16 CEST
Once we have working fixed nvidia 390/430/current packages with kernel 5.9 in Cauldron, please build fixed packages for Mageia 7 as well.  Thank you.
Comment 6 Aurelian R 2020-10-15 19:17:23 CEST
 Everything works fine with the latest patched kernel and nvidia390 driver.

 I will like to have this bug closed as fixed and I'm unsure if I should close it or someone else, as I do have some other opened bugs related to nvidia390 that should be closed too. Please advise.

However, thank you all for great work and especially Giuseppe.
Comment 7 Giuseppe Ghibò 2020-10-16 12:15:03 CEST
Actually it seems nvidia340 suffers of the same problems under kernel 5.9 (I've not seen patches around for it, do you?)

As for mga7 kernel 5.9 upgrade, maybe we can wait a few release it stabilizes, alternatively if it should be done sooner, I suggest to use 5.8 series, starting from cauldron kernel 5.8.14 and merge in the latest upstream 5.8.15 which is still supported.
Comment 8 Aurelian R 2020-10-16 13:07:21 CEST
(In reply to Giuseppe Ghibò from comment #7)
> Actually it seems nvidia340 suffers of the same problems under kernel 5.9
> (I've not seen patches around for it, do you?)
> 

Found this link from a video (https://www.cda.pl/video/592607077/vfilm in polish looks like) that list a bunch of patches for nvidia drivers.

Link: https://nvidia.if-not-true-then-false.com/

Hope it will help.
Regards.
Comment 9 Giuseppe Ghibò 2020-10-16 14:02:32 CEST
No for kernel 5.9 there.
Comment 10 Aurelian R 2021-01-16 10:29:10 CET
At this time, it is fixed up to kernel 5.10, Mageia 7 too. Closing this bug...

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


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