Bug 27062 - dkms fails to build the nvidia340, nvidia390, and nvidia-current modules for the kernel 5.7
Summary: dkms fails to build the nvidia340, nvidia390, and nvidia-current modules for ...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: x86_64 Linux
Priority: Normal major
Target Milestone: ---
Assignee: Kernel and Drivers maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 27082 27083 27104
Blocks: 27006
  Show dependency treegraph
 
Reported: 2020-08-07 20:54 CEST by PC LX
Modified: 2020-08-16 16:22 CEST (History)
2 users (show)

See Also:
Source RPM: nvidia340-340.108-6.mga7.nonfree.src.rpm, nvidia390-390.132-6.mga7.nonfree.src.rpm, nvidia-current-430.64-8.mga7.nonfree.src.rpm
CVE:
Status comment:


Attachments
dkms-nvidia340 build log (/var/lib/dkms/nvidia340/340.108-6.mga7.nonfree/build/make.log) (140.14 KB, text/plain)
2020-08-07 20:54 CEST, PC LX
Details

Description PC LX 2020-08-07 20:54:17 CEST
Description of problem:

dkms fails to build the nvidia340 module for the kernel 5.7.13-desktop-3.mga7.
It fails to build both at boot and from the CLI.
It works with the kernel 5.6.14-desktop-2.mga7 and previous kernels.


$ dkms status
nvidia340, 340.108-6.mga7.nonfree, 5.6.14-desktop-2.mga7, x86_64: installed
$ dkms build -m nvidia340 -v 340.108-6.mga7.nonfree -k 5.7.13-desktop-3.mga7

Preparing kernel 5.7.13-desktop-3.mga7 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......
using /boot/config-5.7.13-desktop-3.mga7
make oldconfig......
make prepare.....

Building module:
cleaning build area....(bad exit status: 2)
'make' -j4 SYSSRC=/lib/modules/5.7.13-desktop-3.mga7/build module.................(bad exit status: 2)

Error! Bad return status for module build on kernel: 5.7.13-desktop-3.mga7 (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/nvidia340/340.108-6.mga7.nonfree/build/ for more information.

$ ls -la /usr/src/kernel-5.7.13-desktop-3.mga7/include/config/auto.conf /usr/src/kernel-5.7.13-desktop-3.mga7/include/generated/autoconf.h
-rw-r--r-- 1 root root 14906 ago  7 11:22 /usr/src/kernel-5.7.13-desktop-3.mga7/include/config/auto.conf
-rw-r--r-- 1 root root 19381 ago  7 11:22 /usr/src/kernel-5.7.13-desktop-3.mga7/include/generated/autoconf.h



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

$ rpm -qa | egrep  '(kernel|dkms|nvidia)' | sort
dkms-2.0.19-40.mga7
dkms-minimal-2.0.19-40.mga7
dkms-nvidia340-340.108-6.mga7.nonfree
kernel-desktop-5.6.14-2.mga7-1-1.mga7
kernel-desktop-5.7.13-3.mga7-1-1.mga7
kernel-desktop-devel-5.6.14-2.mga7-1-1.mga7
kernel-desktop-devel-5.7.13-3.mga7-1-1.mga7
kernel-desktop-devel-latest-5.7.13-3.mga7
kernel-desktop-latest-5.7.13-3.mga7
kernel-firmware-20190603-1.mga7
kernel-firmware-nonfree-20200721-1.mga7.nonfree
kernel-userspace-headers-5.7.13-3.mga7
nvidia340-doc-html-340.108-6.mga7.nonfree
x11-driver-video-nvidia340-340.108-6.mga7.nonfree



How reproducible:

Always.



Steps to Reproduce:

On a system that has a nVidia GPU supported by the nvidia340 proprietary driver.

1. Configure the system to use the nvidia340 driver.
2. Install the kernel 5.7.13-desktop-3.mga7.
3. Run the command: dkms build -m nvidia340 -v 340.108-6.mga7.nonfree -k 5.7.13-desktop-3.mga7
4. See the build error and the make.log file for details.
Comment 1 PC LX 2020-08-07 20:54:57 CEST
Created attachment 11790 [details]
dkms-nvidia340 build log (/var/lib/dkms/nvidia340/340.108-6.mga7.nonfree/build/make.log)
Comment 2 David Walser 2020-08-07 21:01:53 CEST
Do you know if this works in Cauldron?  It's basically the same kernel, so it shouldn't...

Assignee: bugsquad => kernel

Comment 3 Thomas Backlund 2020-08-07 21:25:37 CEST
You need:
http://svnweb.mageia.org/packages?view=revision&revision=1592682
Comment 4 Thomas Backlund 2020-08-07 21:30:11 CEST
nvidia390 will need:
http://svnweb.mageia.org/packages?view=revision&revision=1600100

nvidia-current cant be synced with caulron as its glvnd only
Comment 5 Morgan Leijström 2020-08-07 23:13:01 CEST
Thank you Thomas for keeping educating us :)

CC: (none) => fri

Comment 6 Giuseppe Ghibò 2020-08-07 23:42:24 CEST
Basically you can use current cauldron nvidia-current, nvidia390 and nvidia340 to backport ot mga7. cauldron's nvidia-current will work on mga7 even if it's glvnd-only (it has it's own GL tree enabled with updates-alternatives). Next nvidia-current builds will be native glvnd so wouldn't work anymore.

BTW, if you plan to upgrade also mesa on mga7, current cauldron mesa works also on mga7. The only condition is to disable glvnd, changing in mesa.spec

%global with_glvnd      1

to

#global  with_glvnd      1

I would suggest to upgrade also meson to 0.52.1 in mga7 (it will be mandatory for mesa 20.2).

CC: (none) => ghibomgx

David Walser 2020-08-08 00:15:00 CEST

Source RPM: nvidia340-340.108-6.mga7.nonfree.src.rpm => nvidia340-340.108-6.mga7.nonfree.src.rpm, nvidia390-390.132-6.mga7.nonfree.src.rpm
Summary: dkms fails to build the nvidia340 module for the kernel 5.7.13-desktop-3.mga7 => dkms fails to build the nvidia340 and nvidia390 modules for the kernel 5.7

Comment 7 David Walser 2020-08-08 02:28:01 CEST
nvidia-current I guess will need the patch added here:
http://svnweb.mageia.org/packages?view=revision&revision=1598388

and renamed here:
http://svnweb.mageia.org/packages?view=revision&revision=1600081

Source RPM: nvidia340-340.108-6.mga7.nonfree.src.rpm, nvidia390-390.132-6.mga7.nonfree.src.rpm => nvidia340-340.108-6.mga7.nonfree.src.rpm, nvidia390-390.132-6.mga7.nonfree.src.rpm, nvidia-current-430.64-8.mga7.nonfree.src.rpm

David Walser 2020-08-08 02:28:28 CEST

Summary: dkms fails to build the nvidia340 and nvidia390 modules for the kernel 5.7 => dkms fails to build the nvidia340, nvidia390, and nvidia-current modules for the kernel 5.7

Comment 8 Giuseppe Ghibò 2020-08-08 15:37:25 CEST
(In reply to David Walser from comment #7)

> nvidia-current I guess will need the patch added here:
> http://svnweb.mageia.org/packages?view=revision&revision=1598388
> 
> and renamed here:
> http://svnweb.mageia.org/packages?view=revision&revision=1600081

If you go to 450.57, I would take the current nvidia-current spec file from cauldron as whole; a few fixes from the rev 1600081 applies are for reverting other changes (e.g. attempts for moving to glvnd) which aren't in mga7 nvidia-current.

If you instead plan to remain on 430.x (but dunno if have security bugs upstream), a tested version compiling on 5.7 for 430.x is here: 

http://svnweb.mageia.org/packages/cauldron/nvidia430/current/SPECS/nvidia430.spec?view=log

(i.e. Patch7, Patch8 and Patch9) should be enough (you have just to set %bcond_without use_pkgname_as_nvidia_current if you want to use the new naming patches, otherwise ignore it, and just take the patches).
Comment 9 Thomas Backlund 2020-08-09 18:19:26 CEST
(In reply to Giuseppe Ghibò from comment #6)
> Basically you can use current cauldron nvidia-current, nvidia390 and
> nvidia340 to backport ot mga7. cauldron's nvidia-current will work on mga7
> even if it's glvnd-only (it has it's own GL tree enabled with
> updates-alternatives). Next nvidia-current builds will be native glvnd so
> wouldn't work anymore.
> 

Have you really tested it on mga7 ?

To minimize possible breakages and allowing wider testing of the 45x.x branch, I'd suggest to stay with 430.x in updates for now, and stick the 450.x in backports...

If many people then confirm the backport is good, it can be built for updates later on...

> BTW, if you plan to upgrade also mesa on mga7, current cauldron mesa works
> also on mga7. The only condition is to disable glvnd, changing in mesa.spec

mga7 could do with mesa 20.1

> 
> %global with_glvnd      1
> 
> to
> 
> #global  with_glvnd      1

or
%global with_glvnd 0


> 
> I would suggest to upgrade also meson to 0.52.1 in mga7 (it will be
> mandatory for mesa 20.2).

This might cause issues, as iirc we have had meson problems before...
Martin Whitaker 2020-08-11 12:15:19 CEST

Depends on: (none) => 27082

Martin Whitaker 2020-08-11 12:21:53 CEST

Depends on: (none) => 27083

David Walser 2020-08-11 14:48:11 CEST

Blocks: (none) => 27006

Comment 10 David Walser 2020-08-11 14:50:41 CEST
Yes, let's please minimize the changes to the nvidia-current package for now to get it built with kernel 5.7 so we can get this kernel out.
Comment 11 David Walser 2020-08-12 02:15:51 CEST
Giuseppe, please file bugs similar to Martin's 27082 and 27083 for the two nvidia-current updates you built, and assign them to qa-bugs@ml.mageia.org

Package lists will be...

RPM packages bug:
x11-driver-video-nvidia-current-430.64-11.mga7.nonfree.x86_64.rpm
dkms-nvidia-current-430.64-11.mga7.nonfree.x86_64.rpm
nvidia-current-devel-430.64-11.mga7.nonfree.x86_64.rpm
nvidia-current-cuda-opencl-430.64-11.mga7.nonfree.x86_64.rpm
nvidia-current-doc-html-430.64-11.mga7.nonfree.x86_64.rpm
nvidia-current-utils-430.64-11.mga7.nonfree.x86_64.rpm

from nvidia-current-430.64-11.mga7.src.rpm


Backports bug:
x11-driver-video-nvidia-current-450.57-3.mga7.nonfree.x86_64.rpm
dkms-nvidia-current-450.57-3.mga7.nonfree.x86_64.rpm
nvidia-current-devel-450.57-3.mga7.nonfree.x86_64.rpm
nvidia-current-cuda-opencl-450.57-3.mga7.nonfree.x86_64.rpm
nvidia-current-doc-html-450.57-3.mga7.nonfree.x86_64.rpm
nvidia-current-utils-450.57-3.mga7.nonfree.x86_64.rpm

from nvidia-current-450.57-3.mga7.src.rpm
David Walser 2020-08-13 16:47:47 CEST

Depends on: (none) => 27104

Comment 12 David Walser 2020-08-16 16:22:58 CEST
Nvidia updates validated.

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


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