Bug 5536

Summary: The Nvidia-390xx driver module is not going to be installed on the new 5.5.5 kernel
Product: Fedora Reporter: Mikhail Volkov <volk.mixail>
Component: nvidia-390xx-kmodAssignee: Henrik Nordström <henrik>
Status: RESOLVED FIXED    
Severity: enhancement CC: alexducast, ben, edward.lara.lara, fedora, greg.bunia, henrik, leigh123linux, ps.raul.97, redhat, rmarquez.dba
Priority: P1    
Version: f31   
Hardware: x86_64   
OS: GNU/Linux   
namespace:
Attachments: akmods log
log
kernel-5.5.patch from Isaak I. Aleksandrov, with .manifest chunk commented out.
kernel-5.6.patch from Isaak I. Aleksandrov,
nvidia-390xx-kmod.spec wiht kernel-5.5 and 5.6 patches
patch to remove arm

Description Mikhail Volkov 2020-02-22 09:37:00 CET
Created attachment 2141 [details]
akmods log

[root@pcstation mixail]# akmods --force
Checking kmods exist for 5.5.5-200.fc31.x86_64             [  ОК  ]
Building and installing nvidia-390xx-kmod                  [СБОЙ ]
Building rpms failed; see /var/cache/akmods/nvidia-390xx/390.132-1-for-5.5.5-200.fc31.x86_64.failed.log for details

Hint: Some kmods were ignored or failed to build or install.
You can try to rebuild and install them by by calling
'/usr/sbin/akmods --force' as root.


part of the text from the log:

In file included from /tmp/akmodsbuild.5BlovNfx/BUILD/nvidia-390xx-kmod-390.132/_kmod_build_5.5.5-200.fc31.x86_64/nvidia-drm/nvidia-drm-drv.c:27:
 /tmp/akmodsbuild.5BlovNfx/BUILD/nvidia-390xx-kmod-390.132/_kmod_build_5.5.5-200.fc31.x86_64/nvidia-drm/nvidia-drm-fb.h:30:10: fatal error: drm/drmP.h: No such file or directory
30 | #include <drm/drmP.h>
 |          ^~~~~~~~~~~~
 compilation terminated.

 make[2]: *** [scripts/Makefile.build:266: /tmp/akmodsbuild.5BlovNfx/BUILD/nvidia-390xx-kmod-390.132/_kmod_build_5.5.5-200.fc31.x86_64/nvidia-drm/nvidia-drm-drv.o] Error 1
make[2]: *** Waiting for unfinished jobs....

 In file included from /tmp/akmodsbuild.5BlovNfx/BUILD/nvidia-390xx-kmod-390.132/_kmod_build_5.5.5-200.fc31.x86_64/nvidia-drm/nvidia-drm-utils.c:28:
 /tmp/akmodsbuild.5BlovNfx/BUILD/nvidia-390xx-kmod-390.132/_kmod_build_5.5.5-200.fc31.x86_64/nvidia-drm/nvidia-drm-utils.h:30:10: fatal error: drm/drmP.h: No such file or directory
30 | #include <drm/drmP.h>
 |          ^~~~~~~~~~~~
 compilation terminated.

 make[2]: *** [scripts/Makefile.build:265: /tmp/akmodsbuild.5BlovNfx/BUILD/nvidia-390xx-kmod-390.132/_kmod_build_5.5.5-200.fc31.x86_64/nvidia-drm/nvidia-drm-utils.o] Error 1
 ./tools/objtool/objtool orc generate  --module --no-fp --retpoline --uaccess /tmp/akmodsbuild.5BlovNfx/BUILD/nvidia-390xx-kmod-390.132/_kmod_build_5.5.5-200.fc31.x86_64/nvidia-uvm/uvm8_range_group_tree_test.o
 make[1]: *** [Makefile:1693: /tmp/akmodsbuild.5BlovNfx/BUILD/nvidia-390xx-kmod-390.132/_kmod_build_5.5.5-200.fc31.x86_64] Error 2
 make[1]: Leaving directory '/usr/src/kernels/5.5.5-200.fc31.x86_64'
 make: *** [Makefile:81: modules] Error 2
 Неверный код возврата из /var/tmp/rpm-tmp.c8VMXn (%build)
Comment 1 leigh scott 2020-02-22 10:05:47 CET
I wont be patching 390xx or 340xx for kernel-5.5, even nvidia main has issues with it.

https://devtalk.nvidia.com/default/topic/1071186/linux/patch-for-legacy-driver-390-132-with-linux-5-5-x/

https://devtalk.nvidia.com/default/topic/1071120/linux/-bug-nvidia-440-59-kernel-5-5-1-stable-boot-trace/

You should file the issue at nvidia so they can fix it.

https://devtalk.nvidia.com/default/board/98/
Comment 2 Mikhail Volkov 2020-02-22 10:09:41 CET
Got it, thanks for the info.
Comment 3 Richard 2020-02-22 13:37:15 CET
Time to retire the packages? I finally got rid of my GTS 450. The oldest card in the house is now a GT 750 which looks to be supported by the 440 series.
Comment 4 leigh scott 2020-02-22 14:24:54 CET
(In reply to Richard from comment #3)
> Time to retire the packages? I finally got rid of my GTS 450. The oldest
> card in the house is now a GT 750 which looks to be supported by the 440
> series.

Maybe post to the mailing list to request a new maintainer.
Comment 5 Mikhail Volkov 2020-02-22 15:02:53 CET
(In reply to Richard from comment #3)
> Time to retire the packages? I finally got rid of my GTS 450. The oldest
> card in the house is now a GT 750 which looks to be supported by the 440
> series.

Thanks for the help, I have 750GTX and I used the 390xx driver because I thought that my outdated card was not supported by the current driver. Reinstalled the driver on 440.59 and everything works well with the 5.5.5 kernel.
Comment 6 Sergei S. Rublёv 2020-02-24 10:53:35 CET
I have GeForce GT 730 and I confirm that nvidia-390 refuses to work with kernel 5.5. 

No, installing nvidia-440 won't help, the 440 driver tells it will ignore my GPU.

I have to load kernel 5.4.18, where nvidia-390 works and apparently freeze the kernel not allowing it to update to 5.5 and higher.
Comment 7 leigh scott 2020-02-29 12:41:38 CET
*** Bug 5546 has been marked as a duplicate of this bug. ***
Comment 8 Alexandre Ducastaing 2020-02-29 18:34:31 CET
Hi all;
Doesn't work with kernel 5.5.6-201.fc31.x86_64 too:
# LANG=C /usr/sbin/akmods --force
Checking kmods exist for 5.5.6-201.fc31.x86_64             [  OK  ]
Building and installing nvidia-390xx-kmod                  [FAILED]
Building rpms failed; see /var/cache/akmods/nvidia-390xx/390.132-1-for-5.5.6-201.fc31.x86_64.failed.log for details

Hint: Some kmods were ignored or failed to build or install.
You can try to rebuild and install them by by calling
'/usr/sbin/akmods --force' as root.
#
Regards.
Comment 9 Alexandre Ducastaing 2020-02-29 18:38:24 CET
Created attachment 2152 [details]
log
Comment 10 leigh scott 2020-03-01 09:47:16 CET
*** Bug 5549 has been marked as a duplicate of this bug. ***
Comment 11 leigh scott 2020-03-01 10:55:43 CET
(In reply to Richard from comment #3)
> Time to retire the packages? I finally got rid of my GTS 450. The oldest
> card in the house is now a GT 750 which looks to be supported by the 440
> series.

I have set 390xx packages to orphaned status for all fedora branches.
Comment 12 leigh scott 2020-03-01 11:01:23 CET
(In reply to Richard from comment #3)
> Time to retire the packages? I finally got rid of my GTS 450. The oldest
> card in the house is now a GT 750 which looks to be supported by the 440
> series.


Request for a new maintainer posted to devel-list

https://lists.rpmfusion.org/archives/list/rpmfusion-developers@lists.rpmfusion.org/thread/LS5AWWFDIB4B5G3CEUHZ4UOWBPLMAXBW/
Comment 13 Henrik Nordström 2020-03-08 23:20:41 CET
Created attachment 2156 [details]
kernel-5.5.patch from Isaak I. Aleksandrov, with .manifest chunk commented out.
Comment 14 Henrik Nordström 2020-03-08 23:22:04 CET
Created attachment 2157 [details]
kernel-5.6.patch from Isaak I. Aleksandrov,
Comment 15 Henrik Nordström 2020-03-08 23:23:49 CET
Created attachment 2158 [details]
nvidia-390xx-kmod.spec wiht kernel-5.5 and 5.6 patches
Comment 16 Henrik Nordström 2020-03-08 23:25:29 CET
There exists patches for 5.5 and 5.6.

Discussion:
https://devtalk.nvidia.com/default/topic/1071186/linux/patch-for-legacy-driver-390-132-with-linux-5-5-x/
https://devtalk.nvidia.com/default/topic/1071243/patches-for-340-108-and-5-6-rc-need-help-with-driver-init-/

Patches:
https://gitlab.com/snippets/1943814  kernel-5.5.patch
https://gitlab.com/snippets/1943873  kernel-5.6.patch

The first includes changes to a .manifest file which seems to be from somewhere else (Archlinux?). Works if that patch chunk is ignored.

I have attached the patches and an updates spec file.
Comment 17 Henrik Nordström 2020-03-08 23:38:40 CET
My laptop with K2100M also needs the 390 driver and not plannning to get rid of that one for quite some time to come.

I am happy to step up as a maintainer for this package if someone tells me how. Not active in rpmfusion today, but I am a Fedora package maintainer.

rpmfusion account registered and signed.
Comment 18 leigh scott 2020-03-09 01:32:46 CET
(In reply to Henrik Nordström from comment #17)
> My laptop with K2100M also needs the 390 driver and not plannning to get rid
> of that one for quite some time to come.
> 
> I am happy to step up as a maintainer for this package if someone tells me
> how. Not active in rpmfusion today, but I am a Fedora package maintainer.
> 
> rpmfusion account registered and signed.

I have sponsored you for the packagers group.
See link for rpmfusion-packager setup.

https://rpmfusion.org/Contributors

To checkout

rfpkg co nonfree/nvidia-390xx-kmod
Comment 20 leigh scott 2020-03-09 11:11:18 CET
(In reply to Henrik Nordström from comment #17)
> My laptop with K2100M also needs the 390 driver and not plannning to get rid
> of that one for quite some time to come.
> 
> I am happy to step up as a maintainer for this package if someone tells me
> how. Not active in rpmfusion today, but I am a Fedora package maintainer.
> 
> rpmfusion account registered and signed.

To test the patched srpm before building at koji, run

rpmbuild --rebuild --define'kernels $(uname -r)' nvidia-390xx-kmod-390.132-2.fc32.src.rpm
Comment 21 Henrik Nordström 2020-03-09 20:47:55 CET
The srpm is tested, and works, But it does have the same refcount issue others have reported.
Comment 22 Henrik Nordström 2020-03-09 21:46:48 CET
A build is available at http://koji.rpmfusion.org/koji/taskinfo?taskID=392980

The build succeeded on x86_64, but failed on armv7hl due to missing package

DEBUG util.py:583:  BUILDSTDERR: No matching package to install: 'xorg-x11-drv-nvidia-390xx-kmodsrc >= 3:390.132'

There is a build of that package for arm on 2019-11-10, but the latest build from 2020-02-05 do not include armv7hl for some reason.
Comment 23 leigh scott 2020-03-09 23:36:54 CET
(In reply to Henrik Nordström from comment #22)
> A build is available at http://koji.rpmfusion.org/koji/taskinfo?taskID=392980
> 
> The build succeeded on x86_64, but failed on armv7hl due to missing package
> 
> DEBUG util.py:583:  BUILDSTDERR: No matching package to install:
> 'xorg-x11-drv-nvidia-390xx-kmodsrc >= 3:390.132'
> 
> There is a build of that package for arm on 2019-11-10, but the latest build
> from 2020-02-05 do not include armv7hl for some reason.

From 31 onwards you need to build for multilibs target

f33/rawhide

rfpkg build --target f33-nonfree-multilibs

f32

rfpkg build --target f32-nonfree-multilibs

f31

rfpkg build --target f31nonfree-multilibs

f30

rfpkg build


and the same for xorg-x11-drv-nvidia-390xx
Comment 24 leigh scott 2020-03-09 23:49:46 CET
Created attachment 2159 [details]
patch to remove arm

(In reply to leigh scott from comment #23)
> (In reply to Henrik Nordström from comment #22)
> > A build is available at http://koji.rpmfusion.org/koji/taskinfo?taskID=392980
> > 
> > The build succeeded on x86_64, but failed on armv7hl due to missing package
> > 
> > DEBUG util.py:583:  BUILDSTDERR: No matching package to install:
> > 'xorg-x11-drv-nvidia-390xx-kmodsrc >= 3:390.132'
> > 
> > There is a build of that package for arm on 2019-11-10, but the latest build
> > from 2020-02-05 do not include armv7hl for some reason.
> 
> From 31 onwards you need to build for multilibs target
> 
> f33/rawhide
> 
> rfpkg build --target f33-nonfree-multilibs
> 
> f32
> 
> rfpkg build --target f32-nonfree-multilibs
> 
> f31
> 
> rfpkg build --target f31nonfree-multilibs
> 
> f30
> 
> rfpkg build
> 
> 
> and the same for xorg-x11-drv-nvidia-390xx

Sorry this only applies for xorg-x11-drv-nvidia-390x.
I have attached a patch for the kmod spec
Comment 25 leigh scott 2020-03-09 23:53:20 CET
rfpkg builds xorg-x11-drv-nvidia-390xx as a multilib target automatically 

https://github.com/rpmfusion-infra/rfpkg/blob/4ba769f92be658ffdece9596b250566ec4043bfc/rfpkg/__init__.py#L224
Comment 26 leigh scott 2020-03-15 15:50:36 CET
Fix pushed to stable
Comment 27 Alexandre Ducastaing 2020-03-15 17:55:34 CET
Cool, it works !

[alexandre@tales ~]$ uname -r
5.5.8-200.fc31.x86_64
[alexandre@tales ~]$ inxi -G
Graphics:
  Device-1: NVIDIA GF119 [GeForce GT 705] driver: nvidia v: 390.132 
  Display: x11 server: Fedora Project X.org 1.20.6 driver: nvidia 
  unloaded: fbdev,modesetting,nouveau,vesa resolution: 1280x1024~60Hz 
  OpenGL: renderer: GeForce GT 705/PCIe/SSE2 v: 4.6.0 NVIDIA 390.132 
[alexandre@tales ~]$ rpm -qa | grep akmod-nvidia
akmod-nvidia-390xx-390.132-4.fc31.x86_64
[alexandre@tales ~]$

Congratulations.
I thank you very much.
Alexandre
Comment 28 rmarquez.dba 2020-03-16 06:23:21 CET
Hi,
It works for me as well (asus N73SV dual graphics adapter) :

[root@computer20 ~]# lsmod | fgrep nv
nvidia_drm             53248  6
nvidia_modeset       1056768  9 nvidia_drm
nvidia              14733312  356 nvidia_modeset
ipmi_msghandler       118784  2 ipmi_devintf,nvidia
drm_kms_helper        233472  2 nvidia_drm,i915
drm                   585728  8 drm_kms_helper,nvidia_drm,i915
[root@computer20 ~]# uname -a 
Linux computer20 5.5.8-200.fc31.x86_64 #1 SMP Thu Mar 5 21:28:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@computer20 ~]# inxi -G
Graphics:  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics driver: i915 v: kernel 
           Device-2: NVIDIA GF108M [GeForce GT 540M] driver: nvidia v: 390.132 
           Display: server: Fedora Project X.org 1.20.6 driver: none resolution: 1920x1080~60Hz 
           OpenGL: renderer: GeForce GT 540M/PCIe/SSE2 v: 4.6.0 NVIDIA 390.132 
[root@computer20 ~]# 

Thank you very much
Best regards,
Ramon
Comment 29 Sergei S. Rublёv 2020-03-17 15:58:59 CET
Works for me too, thank you very much!

akmod-nvidia-390xx-390.132-4.fc31.x86_64

kernel 5.5.8-200.fc31.x86_64

Graphics:  Device-1: NVIDIA GF108 [GeForce GT 730] driver: nvidia v: 390.132 
           Display: x11 server: Fedora Project X.org 1.20.6 driver: nvidia unloaded: fbdev,modesetting,nouveau,vesa 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: GeForce GT 730/PCIe/SSE2 v: 4.6.0 NVIDIA 390.132