You are not logged in.

#26 2020-10-18 23:28:28

Al.Piotrowicz
Member
Registered: 2017-08-07
Posts: 87

Re: [Solved] nVidia driver and kernel 5.9

Thanks @loqs. It works for both version. You made my day.

Offline

#27 2020-10-18 23:35:17

jonathon
Member
Registered: 2016-09-19
Posts: 41

Re: [Solved] nVidia driver and kernel 5.9

loqs wrote:

Will try to produce a patch that works with both kernels by dropping using conftest and using version testing instead.

This is awesome. Are you sure you don't want to maintain the AUR package? big_smile

Offline

#28 2020-10-18 23:55:53

loqs
Member
Registered: 2014-03-06
Posts: 12,134

Re: [Solved] nVidia driver and kernel 5.9

jonathon wrote:

This is awesome. Are you sure you don't want to maintain the AUR package? big_smile

No thanks.

patch for 390xx which should work with linux-lts as well

diff --git a/kernel/common/inc/nv-linux.h b/kernel/common/inc/nv-linux.h
index ab06dbc..dd335b5 100644
--- a/kernel/common/inc/nv-linux.h
+++ b/kernel/common/inc/nv-linux.h
@@ -159,7 +159,7 @@ static inline uid_t __kuid_val(kuid_t uid)
 }
 #endif
 
-#if defined(NVCPU_X86_64) && !defined(HAVE_COMPAT_IOCTL)
+#if defined(NVCPU_X86_64) && !defined(NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL)
 #include <linux/syscalls.h>         /* sys_ioctl()                      */
 #include <linux/ioctl32.h>          /* register_ioctl32_conversion()    */
 #endif
diff --git a/kernel/common/inc/nv-mm.h b/kernel/common/inc/nv-mm.h
index d2d7657..a5325fe 100644
--- a/kernel/common/inc/nv-mm.h
+++ b/kernel/common/inc/nv-mm.h
@@ -144,9 +144,13 @@ typedef int vm_fault_t;
                 flags |= FOLL_FORCE;
 
         #if defined(NV_GET_USER_PAGES_REMOTE_HAS_LOCKED_ARG)
-
+            #if defined (NV_GET_USER_PAGES_REMOTE_HAS_TSK_ARG)
                return get_user_pages_remote(tsk, mm, start, nr_pages, flags,
                                             pages, vmas, NULL);
+            #else
+               return get_user_pages_remote(mm, start, nr_pages, flags,
+                                            pages, vmas, NULL);
+            #endif
 
         #else
 
@@ -159,7 +163,7 @@ typedef int vm_fault_t;
     #endif
 #else
     #if defined(NV_GET_USER_PAGES_HAS_WRITE_AND_FORCE_ARGS)
-        #define NV_GET_USER_PAGES_REMOTE    NV_GET_USER_PAGES
+        #define NV_GET_USER_PAGES_REMOTE    get_user_pages
     #else
         #include <linux/mm.h>
         #include <linux/sched.h>
diff --git a/kernel/conftest.sh b/kernel/conftest.sh
index e900963..ef82dee 100755
--- a/kernel/conftest.sh
+++ b/kernel/conftest.sh
@@ -3043,6 +3043,7 @@ compile_test() {
 
             if [ -f conftest$$.o ]; then
                 echo "#undef NV_GET_USER_PAGES_REMOTE_PRESENT" | append_conftest "functions"
+                echo "#undef NV_GET_USER_PAGES_REMOTE_HAS_TSK_ARG" | append_conftest "functions"
                 echo "#undef NV_GET_USER_PAGES_REMOTE_HAS_WRITE_AND_FORCE_ARGS" | append_conftest "functions"
                 echo "#undef NV_GET_USER_PAGES_REMOTE_HAS_LOCKED_ARG" | append_conftest "functions"
                 rm -f conftest$$.o
@@ -3070,14 +3071,20 @@ compile_test() {
             rm -f conftest$$.c
 
             if [ -f conftest$$.o ]; then
+                echo "#define NV_GET_USER_PAGES_REMOTE_HAS_TSK_ARG" | append_conftest "functions"
                 echo "#define NV_GET_USER_PAGES_REMOTE_HAS_WRITE_AND_FORCE_ARGS" | append_conftest "functions"
                 echo "#undef NV_GET_USER_PAGES_REMOTE_HAS_LOCKED_ARG" | append_conftest "functions"
                 rm -f conftest$$.o
                 return
             fi
 
+            echo "#undef NV_GET_USER_PAGES_REMOTE_HAS_WRITE_AND_FORCE_ARGS" | append_conftest "functions"
+
+            #
             # conftest #3: check if get_user_pages_remote() has locked argument
-            
+            # Return if these arguments are present. Fall through to conftest #4
+            # if these args are absent.
+            #
             echo "$CONFTEST_PREAMBLE
             #include <linux/mm.h>
             long get_user_pages_remote(struct task_struct *tsk,
@@ -3095,13 +3102,40 @@ compile_test() {
             rm -f conftest$$.c
 
             if [ -f conftest$$.o ]; then
+                echo "#define NV_GET_USER_PAGES_REMOTE_HAS_TSK_ARG" | append_conftest "functions"
+                echo "#define NV_GET_USER_PAGES_REMOTE_HAS_LOCKED_ARG" | append_conftest "functions"
+                rm -f conftest$$.o
+                return
+            fi
+
+            #
+            # conftest #4: check if get_user_pages_remote() does not take
+            # tsk argument.
+            #
+            echo "$CONFTEST_PREAMBLE
+            #include <linux/mm.h>
+            long get_user_pages_remote(struct mm_struct *mm,
+                                       unsigned long start,
+                                       unsigned long nr_pages,
+                                       unsigned int gup_flags,
+                                       struct page **pages,
+                                       struct vm_area_struct **vmas,
+                                       int *locked) {
+                return 0;
+            }" > conftest$$.c
+
+            $CC $CFLAGS -c conftest$$.c > /dev/null 2>&1
+            rm -f conftest$$.c
+
+            if [ -f conftest$$.o ]; then
+                echo "#undef NV_GET_USER_PAGES_REMOTE_HAS_TSK_ARG" | append_conftest "functions"
                 echo "#define NV_GET_USER_PAGES_REMOTE_HAS_LOCKED_ARG" | append_conftest "functions"
                 rm -f conftest$$.o
             else
+
+                echo "#define NV_GET_USER_PAGES_REMOTE_HAS_TSK_ARG" | append_conftest "functions"
                 echo "#undef NV_GET_USER_PAGES_REMOTE_HAS_LOCKED_ARG" | append_conftest "functions"
             fi
-            echo "#undef NV_GET_USER_PAGES_REMOTE_HAS_WRITE_AND_FORCE_ARGS" | append_conftest "functions"
-
         ;;
 
         usleep_range)
@@ -4131,6 +4165,115 @@ compile_test() {
             compile_check_conftest "$CODE" "NV_PCI_DEV_HAS_SKIP_BUS_PM" "" "types"
         ;;
 
+        drm_gem_object_put_unlocked)
+            #
+            # Determine if the function drm_gem_object_put_unlocked() is present.
+            #
+            # In v5.9-rc1, commit 2f4dd13d4bb8 ("drm/gem: add
+            # drm_gem_object_put helper") removes drm_gem_object_put_unlocked()
+            # function and replace its definition by transient macro. Commit
+            # ab15d56e27be ("drm: remove transient
+            # drm_gem_object_put_unlocked()") finally removes
+            # drm_gem_object_put_unlocked() macro.
+            #
+            CODE="
+            #if defined(NV_DRM_DRMP_H_PRESENT)
+            #include <drm/drmP.h>
+            #endif
+
+            #if defined(NV_DRM_DRM_GEM_H_PRESENT)
+            #include <drm/drm_gem.h>
+            #endif
+            void conftest_drm_gem_object_put_unlocked(void) {
+                drm_gem_object_put_unlocked();
+            }"
+
+            compile_check_conftest "$CODE" "NV_DRM_GEM_OBJECT_PUT_UNLOCK_PRESENT" "" "functions"
+        ;;
+
+        drm_display_mode_has_vrefresh)
+            #
+            # Determine if the 'drm_display_mode' structure has a 'vrefresh'
+            # field.
+            #
+            # Removed by commit 0425662fdf05 ("drm: Nuke mode->vrefresh") in
+            # v5.9-rc1.
+            #
+            CODE="
+            #include <drm/drm_modes.h>
+
+            int conftest_drm_display_mode_has_vrefresh(void) {
+                return offsetof(struct drm_display_mode, vrefresh);
+            }"
+
+            compile_check_conftest "$CODE" "NV_DRM_DISPLAY_MODE_HAS_VREFRESH" "types"
+
+        ;;
+
+        drm_driver_master_set_has_int_return_type)
+            #
+            # Determine if drm_driver::master_set() returns integer value
+            #
+            # Changed to void by commit 907f53200f98 ("drm: vmwgfx: remove
+            # drm_driver::master_set() return type") in v5.9-rc1.
+            #
+            CODE="
+            #if defined(NV_DRM_DRMP_H_PRESENT)
+            #include <drm/drmP.h>
+            #endif
+
+            #if defined(NV_DRM_DRM_DRV_H_PRESENT)
+            #include <drm/drm_drv.h>
+            #endif
+
+            int conftest_drm_driver_master_set_has_int_return_type(struct drm_driver *drv,
+                struct drm_device *dev, struct drm_file *file_priv, bool from_open) {
+
+                return drv->master_set(dev, file_priv, from_open);
+            }"
+
+            compile_check_conftest "$CODE" "NV_DRM_DRIVER_SET_MASTER_HAS_INT_RETURN_TYPE" "" "types"
+        ;;
+
+        drm_driver_has_gem_free_object)
+            #
+            # Determine if the 'drm_driver' structure has a 'gem_free_object'
+            # function pointer.
+            #
+            # drm_driver::gem_free_object is removed by commit 1a9458aeb8eb
+            # ("drm: remove drm_driver::gem_free_object") in v5.9-rc1.
+            #
+            CODE="
+            #if defined(NV_DRM_DRMP_H_PRESENT)
+            #include <drm/drmP.h>
+            #endif
+
+            #if defined(NV_DRM_DRM_DRV_H_PRESENT)
+            #include <drm/drm_drv.h>
+            #endif
+
+            int conftest_drm_driver_has_gem_free_object(void) {
+                return offsetof(struct drm_driver, gem_free_object);
+            }"
+
+            compile_check_conftest "$CODE" "NV_DRM_DRIVER_HAS_GEM_FREE_OBJECT" "" "types"
+        ;;
+
+        vga_tryget)
+            #
+            # Determine if vga_tryget() is present
+            #
+            # vga_tryget() was removed by commit f369bc3f9096 ("vgaarb: mark
+            # vga_tryget static") in v5.9-rc1 (2020-08-01).
+            #
+            CODE="
+            #include <linux/vgaarb.h>
+            void conftest_vga_tryget(void) {
+                vga_tryget();
+            }"
+
+            compile_check_conftest "$CODE" "NV_VGA_TRYGET_PRESENT" "" "functions"
+        ;;
     esac
 }
 
diff --git a/kernel/nvidia-drm/nvidia-drm-drv.c b/kernel/nvidia-drm/nvidia-drm-drv.c
index 17e377d..85d9798 100644
--- a/kernel/nvidia-drm/nvidia-drm-drv.c
+++ b/kernel/nvidia-drm/nvidia-drm-drv.c
@@ -466,8 +466,8 @@ static void nv_drm_unload(struct drm_device *dev)
 
 #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
 
-static int nv_drm_master_set(struct drm_device *dev,
-                             struct drm_file *file_priv, bool from_open)
+static int __nv_drm_master_set(struct drm_device *dev,
+                               struct drm_file *file_priv, bool from_open)
 {
     struct nv_drm_device *nv_dev = to_nv_device(dev);
 
@@ -478,6 +478,22 @@ static int nv_drm_master_set(struct drm_device *dev,
     return 0;
 }
 
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0)
+static int nv_drm_master_set(struct drm_device *dev,
+                             struct drm_file *file_priv, bool from_open)
+{
+    return __nv_drm_master_set(dev, file_priv, from_open);
+}
+#else
+static void nv_drm_master_set(struct drm_device *dev,
+                              struct drm_file *file_priv, bool from_open)
+{
+     WARN_ON(__nv_drm_master_set(dev, file_priv, from_open) != 0);
+}
+#endif
+
+
 #if defined(NV_DRM_MASTER_DROP_HAS_FROM_RELEASE_ARG)
 static
 void nv_drm_master_drop(struct drm_device *dev,
@@ -677,7 +693,9 @@ static struct drm_driver nv_drm_driver = {
 #endif
                                DRIVER_GEM  | DRIVER_RENDER,
 
+#if defined(NV_DRM_DRIVER_HAS_GEM_FREE_OBJECT)
     .gem_free_object        = nv_drm_gem_free,
+#endif
 
     .ioctls                 = nv_drm_ioctls,
     .num_ioctls             = ARRAY_SIZE(nv_drm_ioctls),
diff --git a/kernel/nvidia-drm/nvidia-drm-gem.h b/kernel/nvidia-drm/nvidia-drm-gem.h
index 5691a7a..18c50ca 100644
--- a/kernel/nvidia-drm/nvidia-drm-gem.h
+++ b/kernel/nvidia-drm/nvidia-drm-gem.h
@@ -87,7 +87,13 @@ static inline void
 nv_drm_gem_object_unreference_unlocked(struct nv_drm_gem_object *nv_gem)
 {
 #if defined(NV_DRM_GEM_OBJECT_GET_PRESENT)
+
+#if defined(NV_DRM_GEM_OBJECT_PUT_UNLOCK_PRESENT)
     drm_gem_object_put_unlocked(&nv_gem->base);
+#else
+    drm_gem_object_put(&nv_gem->base);
+#endif
+
 #else
     drm_gem_object_unreference_unlocked(&nv_gem->base);
 #endif
diff --git a/kernel/nvidia-drm/nvidia-drm-utils.c b/kernel/nvidia-drm/nvidia-drm-utils.c
index 8cb2d5e..e30b2b6 100644
--- a/kernel/nvidia-drm/nvidia-drm-utils.c
+++ b/kernel/nvidia-drm/nvidia-drm-utils.c
@@ -103,7 +103,9 @@ void
 nvkms_display_mode_to_drm_mode(const struct NvKmsKapiDisplayMode *displayMode,
                                struct drm_display_mode *mode)
 {
+#if defined(NV_DRM_DISPLAY_MODE_HAS_VREFRESH)
     mode->vrefresh    = (displayMode->timings.refreshRate + 500) / 1000; /* In Hz */
+#endif
 
     mode->clock       = (displayMode->timings.pixelClockHz + 500) / 1000; /* In Hz */
 
@@ -189,7 +191,11 @@ bool drm_format_to_nvkms_format(u32 format,
 void drm_mode_to_nvkms_display_mode(const struct drm_display_mode *src,
                                     struct NvKmsKapiDisplayMode *dst)
 {
+#if defined(NV_DRM_DISPLAY_MODE_HAS_VREFRESH)
     dst->timings.refreshRate  = src->vrefresh * 1000;
+#else
+    dst->timings.refreshRate  = drm_mode_vrefresh(src) * 1000;
+#endif
 
     dst->timings.pixelClockHz = src->clock * 1000; /* In Hz */
 
diff --git a/kernel/nvidia-uvm/uvm8_tools.c b/kernel/nvidia-uvm/uvm8_tools.c
index 86dbb77..63d0b64 100644
--- a/kernel/nvidia-uvm/uvm8_tools.c
+++ b/kernel/nvidia-uvm/uvm8_tools.c
@@ -190,7 +190,6 @@ static uvm_tools_event_tracker_t *tools_event_tracker(struct file *filp)
 {
     long event_tracker = atomic_long_read((atomic_long_t *)&filp->private_data);
 
-    smp_read_barrier_depends();
     return (uvm_tools_event_tracker_t *)event_tracker;
 }
 
diff --git a/kernel/nvidia-uvm/uvm8_va_range.h b/kernel/nvidia-uvm/uvm8_va_range.h
index 8cae357..6166cc8 100644
--- a/kernel/nvidia-uvm/uvm8_va_range.h
+++ b/kernel/nvidia-uvm/uvm8_va_range.h
@@ -717,7 +717,6 @@ static uvm_va_block_t *uvm_va_range_block(uvm_va_range_t *va_range, size_t index
     // make sure that any initialization of this block by the creating thread is
     // visible to later accesses in this thread, which requires a data
     // dependency barrier.
-    smp_read_barrier_depends();
     return block;
 }
 
diff --git a/kernel/nvidia/nv.c b/kernel/nvidia/nv.c
index 15983f6..cfb2375 100644
--- a/kernel/nvidia/nv.c
+++ b/kernel/nvidia/nv.c
@@ -3872,7 +3872,9 @@ nvidia_probe
 
 #if defined(CONFIG_VGA_ARB) && !defined(NVCPU_PPC64LE)
 #if defined(VGA_DEFAULT_DEVICE)
+#if defined(NV_VGA_TRYGET_PRESENT)
     vga_tryget(VGA_DEFAULT_DEVICE, VGA_RSRC_LEGACY_MASK);
+#endif
 #endif
     vga_set_legacy_decoding(dev, VGA_RSRC_NONE);
 #endif

Offline

#29 2020-10-19 14:38:58

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: [Solved] nVidia driver and kernel 5.9

For those needing CUDA support, you can recompile linux from the official repos using ABS ( https://github.com/archlinux/svntogit-p … inux/trunk ) with this patch shown on the manjaro forums: https://forum.manjaro.org/t/nvidia-open … -9/31565/7 . The patch reverts the "remove GPL Condom" change.


My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#30 2020-10-20 20:28:24

G3ro
Member
Registered: 2020-09-24
Posts: 32

Re: [Solved] nVidia driver and kernel 5.9

It seems @loqs did not post this here, so I am doing it:

loqs wrote:

Change the license on the nvidia module if you want to save time, it will be much quicker than building a kernel.

https://gitlab.com/EULA/snippets/-/comm … 9385eafe6e

Offline

#31 2020-10-20 21:37:11

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,058

Re: [Solved] nVidia driver and kernel 5.9

G3ro wrote:

It seems @loqs did not post this here, so I am doing it:

loqs wrote:

Change the license on the nvidia module if you want to save time, it will be much quicker than building a kernel.

https://gitlab.com/EULA/snippets/-/comm … 9385eafe6e

Uh.. i've doubts you're allowed to do that from a legal perspective.

EDIT
typo

Last edited by kokoko3k (2020-10-21 05:09:36)


Help me to improve ssh-rdp !

Offline

#32 2020-10-20 21:50:22

loqs
Member
Registered: 2014-03-06
Posts: 12,134

Re: [Solved] nVidia driver and kernel 5.9

kokoko3k wrote:

Uh.. i've doubts you're allowed to do that from a legal prospective.

http://www.gnu.org/licenses/gpl-faq.html#UnreleasedMods
Or are your doubts related to compliance with the Nvidia license?
Edit:
Correct link to unrelased modifications.

Last edited by loqs (2020-10-20 21:54:16)

Offline

#33 2020-10-21 05:06:23

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,058

Re: [Solved] nVidia driver and kernel 5.9

loqs wrote:
kokoko3k wrote:

Uh.. i've doubts you're allowed to do that from a legal prospective.

http://www.gnu.org/licenses/gpl-faq.html#UnreleasedMods
Or are your doubts related to compliance with the Nvidia license?
Edit:
Correct link to unrelased modifications.

I'm not a lawyer, but yes, my first concerns are related to the Nvidia side.
Of course, in this -very peculiar- case, nvidia wont sue anyone for using his software with an 'hacked' license, but more generically speaking, i think they may have the rights to do it.
Even more, the same would apply to the fact that the 'license patch' itself is released online for anyone to read it.

Other than that, on the opposite and more realistic side, it seems to me like IS an indirect way to circumvent the purpose of the changes introduced by linux 5.9

Maybe even a lawyer would scratch his head on the issue.

(pleass excuse my english, i know)

Last edited by kokoko3k (2020-10-21 05:08:17)


Help me to improve ssh-rdp !

Offline

#34 2020-10-21 12:50:59

loqs
Member
Registered: 2014-03-06
Posts: 12,134

Re: [Solved] nVidia driver and kernel 5.9

kokoko3k wrote:

Maybe even a lawyer would scratch his head on the issue.

Agreed if someone has doubts about the legality of the suggestion they should seek legal advice from from a practicing lawyer preferably one specializing in licenses, contracts and copyright.

Offline

#35 2020-10-21 18:54:18

G3ro
Member
Registered: 2020-09-24
Posts: 32

Re: [Solved] nVidia driver and kernel 5.9

loqs wrote:
kokoko3k wrote:

Maybe even a lawyer would scratch his head on the issue.

Agreed if someone has doubts about the legality of the suggestion they should seek legal advice from from a practicing lawyer preferably one specializing in licenses, contracts and copyright.

That is always better of course smile.

But if we look at the purpose of licenses, mostly everything is still correct:
The user gets informed about the correct license (before they manually change it).
And the user has to obey that license.

So don't change the license for others big_smile. That could be problematic.
And don't provide the nvidia package with the changed license, absolutely problematic.

Still of course a "grey area".

Last edited by G3ro (2020-10-21 18:55:00)

Offline

#36 2020-10-24 21:07:15

maboleth
Member
Registered: 2020-01-03
Posts: 138

Re: [Solved] nVidia driver and kernel 5.9

I also banged my head in the virtual wall why my OpenCL didn't work. Wasted 1h on drivers, reinstalling etc. Damn you nvidia.

I have now downgraded to 5.8.14 kernel, nvidia driver and virtualbox files to older versions and ignored those packages in pacman... until they sort this out.

Offline

#37 2020-10-25 20:38:21

G3ro
Member
Registered: 2020-09-24
Posts: 32

Re: [Solved] nVidia driver and kernel 5.9

maboleth wrote:

I also banged my head in the virtual wall why my OpenCL didn't work. Wasted 1h on drivers, reinstalling etc. Damn you nvidia.

I have now downgraded to 5.8.14 kernel, nvidia driver and virtualbox files to older versions and ignored those packages in pacman... until they sort this out.

That is not an ideal solution (foremost because of the severe bluetooth security bugs):
1. Recommended by the maintainers is to use the lts kernel: "linux-lts" (and "nvidia-lts" or "nvidia-dkms").
2. A (legally questionable) alternative is to change the license of the driver manually (see above), which works fine and lets you use the 5.9 kernel.

Offline

#38 2020-10-25 21:37:34

maboleth
Member
Registered: 2020-01-03
Posts: 138

Re: [Solved] nVidia driver and kernel 5.9

G3ro wrote:
maboleth wrote:

I also banged my head in the virtual wall why my OpenCL didn't work. Wasted 1h on drivers, reinstalling etc. Damn you nvidia.

I have now downgraded to 5.8.14 kernel, nvidia driver and virtualbox files to older versions and ignored those packages in pacman... until they sort this out.

That is not an ideal solution (foremost because of the severe bluetooth security bugs):
1. Recommended by the maintainers is to use the lts kernel: "linux-lts" (and "nvidia-lts" or "nvidia-dkms").
2. A (legally questionable) alternative is to change the license of the driver manually (see above), which works fine and lets you use the 5.9 kernel.

Thanks, but I don't know how to change/patch the current driver. As for lts, it's too old kernel for me.

Offline

#39 2020-10-25 22:20:35

G3ro
Member
Registered: 2020-09-24
Posts: 32

Re: [Solved] nVidia driver and kernel 5.9

maboleth wrote:

Thanks, but I don't know how to change/patch the current driver. As for lts, it's too old kernel for me.

It's pretty easy, you need to modify the license tags in the source code files.
I use the "nvidia-dkms" package (because it contains the source code files).
It is installed/copied to "/usr/src/" and then automatically build when the kernel (or the nvidia-dkms package) is updated.

So you go into the folder and edit the licenses in the source code files:
Search for "MODULE_LICENSE", which will show in which files a license tag is.
Just like the commit in this post shows: https://bbs.archlinux.org/viewtopic.php … 6#p1932836
After that you save the files and install/update (to) the new kernel version, which will build the nvidia-module.

Last edited by G3ro (2020-10-28 20:27:15)

Offline

#40 2020-10-28 19:23:55

maboleth
Member
Registered: 2020-01-03
Posts: 138

Re: [Solved] nVidia driver and kernel 5.9

G3ro wrote:
maboleth wrote:

Thanks, but I don't know how to change/patch the current driver. As for lts, it's too old kernel for me.

It's pretty easy, I use the "nvidia-dkms" package.
It is installed to "/usr/src/" and then build when the kernel is updated.

So you go into the folder and edit the licenses in the source code files:
You can search e.g. with "ag MODULE_LICENSE", which will show in which files a license tag is.
Just like the commit in this post shows: https://bbs.archlinux.org/viewtopic.php … 6#p1932836
After that you save the files and install/update (to) the new kernel version, which will build the nvidia-module.

Thanks, though that method requires compiling every time there's an update, right? And considering this is Arch and kernel developers are fast at work, that's lots of compiling to do. :-)

Why the method of 'freezing' certain kernel/driver/virtualbox versions in pacman.conf is not that good?

Offline

#41 2020-10-28 19:55:09

G3ro
Member
Registered: 2020-09-24
Posts: 32

Re: [Solved] nVidia driver and kernel 5.9

maboleth wrote:

Thanks, though that method requires compiling every time there's an update, right? And considering this is Arch and kernel developers are fast at work, that's lots of compiling to do. :-)

Dkms modules compile automatically.
And compiling the nvidia module is very fast, so no inconvenience.
To be fair though, it might be necessary to edit the licenses for new nvidia-dkms versions.
But considering that Nvidia wants to solve this in the next month, it shouldn't occur.

maboleth wrote:

Why the method of 'freezing' certain kernel/driver/virtualbox versions in pacman.conf is not that good?

I already answered that above, and the answer is always the same.
Why should you install updates? Because of security. And security is not just for yourself, but for others as well smile.
So if you can avoid blocking updates, you should avoid it.
Sadly to many people ignore this important aspect.

Last edited by G3ro (2020-10-28 20:31:18)

Offline

#42 2020-10-28 20:04:32

maboleth
Member
Registered: 2020-01-03
Posts: 138

Re: [Solved] nVidia driver and kernel 5.9

G3ro wrote:
maboleth wrote:

Thanks, though that method requires compiling every time there's an update, right? And considering this is Arch and kernel developers are fast at work, that's lots of compiling to do. :-)

Dkms modules compile automatically.
And compiling the nvidia module is very fast, so no inconvenience.
To be fair though, it might be necessary to edit the licenses for new nvidia-dkms versions.
But considering that Nvidia want to solve this in the next month, it shouldn't occur.

maboleth wrote:

Why the method of 'freezing' certain kernel/driver/virtualbox versions in pacman.conf is not that good?

I already answered that above, and the answer is always the same.
Why should you install updates? Because of security. And security is not just for yourself, but for others as well smile.
So if you can avoid blocking updates, you should avoid it.

Thanks!

Well, I wanted to see how linux-lts behaves and so far so good! I did notice what you said about dkms package, so for virtualbox, compiling was fast and automatic.

Offline

#43 2020-10-31 12:59:04

ratcheer
Member
Registered: 2011-10-09
Posts: 792

Re: [Solved] nVidia driver and kernel 5.9

nVidia driver 455.38 is now compatible with Linux 5.9. CUDA/openCL processing is once again working.

Offline

#44 2020-10-31 13:10:56

maboleth
Member
Registered: 2020-01-03
Posts: 138

Re: [Solved] nVidia driver and kernel 5.9

Nice!! It was faster than expected. smile

Offline

#45 2020-11-09 23:22:58

MountainX
Member
Registered: 2016-02-08
Posts: 286

Re: [Solved] nVidia driver and kernel 5.9

ratcheer wrote:

nVidia driver 455.38 is now compatible with Linux 5.9. CUDA/openCL processing is once again working.

With nvidia 455.38-5 and linux 5.9.6.arch1-1 as of yesterday I am experiencing rendering artifacts in Firefox and KDE widget icons not displaying.

Temporarily switching to the LTS kernel totally solved the KDE widget icon problem, but I still cannot run Firefox with hardware acceleration turned on while using linux 5.4.75-1-lts and nvidia-lts 1:455.38-3. I have a GTX 1070 GPU.

From an earlier post:

punio wrote:

The nouveau driver seems borked as well. While the driver itself works and my DE loads up (Plasma), it is incredibly glitchy (for example, black bars across my browser window when I scroll, and quite long times switching between windows). Could there be a workaround for this driver?

This sounds like the exact thing I'm seeing in Firefox still. @punio, have you solved it?

Last edited by MountainX (2020-11-09 23:32:40)

Offline

#46 2020-11-09 23:56:58

maboleth
Member
Registered: 2020-01-03
Posts: 138

Re: [Solved] nVidia driver and kernel 5.9

^ The only thing I did notice was a slight slowness in Firefox, esp. YT while playing certain games via steam/proton. I have KDE widget icons showing nicely though.

Offline

#47 2020-11-12 18:13:06

iakremnev
Member
From: St. Petersburg
Registered: 2020-11-12
Posts: 3

Re: [Solved] nVidia driver and kernel 5.9

ratcheer wrote:

nVidia driver 455.38 is now compatible with Linux 5.9. CUDA/openCL processing is once again working.

I still experience the tainting problem with kernel version 5.9.8-arch1-1 and nvidia driver 455.38-7 as well as 5.4.77-1-lts with nvidia-lts:

# journalctl -k -b | grep -i nvidia
Nov 12 20:45:41 herman kernel: input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input5
Nov 12 20:45:41 herman kernel: input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input6
Nov 12 20:45:41 herman kernel: input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input7
Nov 12 20:45:41 herman kernel: input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input8
Nov 12 20:45:41 herman kernel: input: HDA NVidia HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input9
Nov 12 20:45:41 herman kernel: input: HDA NVidia HDMI/DP,pcm=11 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input10
Nov 12 20:45:42 herman kernel: nvidia: loading out-of-tree module taints kernel.
Nov 12 20:45:42 herman kernel: nvidia: module license 'NVIDIA' taints kernel.
Nov 12 20:45:42 herman kernel: nvidia: module verification failed: signature and/or required key missing - tainting kernel
Nov 12 20:45:42 herman kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 237
Nov 12 20:45:42 herman kernel: nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
Nov 12 20:45:42 herman kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module  455.38  Thu Oct 22 06:06:59 UTC 2020
Nov 12 20:45:42 herman kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  455.38  Thu Oct 22 05:57:59 UTC 2020
Nov 12 20:45:42 herman kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver
Nov 12 20:45:42 herman kernel: [drm] Initialized nvidia-drm 0.0.0 20160202
for 0000:01:00.0 on minor 1
Nov 12 20:45:42 herman kernel: nvidia-gpu 0000:01:00.3: i2c timeout error e0000000

My problem is black screen right after booting.

Last edited by iakremnev (2020-11-12 18:26:30)

Offline

#48 2020-11-12 19:51:47

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 11,259

Re: [Solved] nVidia driver and kernel 5.9

Tainting is normal and not a problem, create a new thread for your issue.

Offline

#49 2020-11-14 18:08:14

hamelg
Member
From: France
Registered: 2008-06-19
Posts: 121

Re: [Solved] nVidia driver and kernel 5.9

ratcheer wrote:

nVidia driver 455.38 is now compatible with Linux 5.9. CUDA/openCL processing is once again working.

Unfortunately, the 455.38 has a nasty bug.
https://forums.developer.nvidia.com/t/4 … nts/155250

I had to revert to 450.80.02 sad

Offline

#50 2020-11-14 19:01:37

loqs
Member
Registered: 2014-03-06
Posts: 12,134

Re: [Solved] nVidia driver and kernel 5.9

@hamelg have you tried applying the partial fix from http://people.freedesktop.org/~aplattne … 5.38.patch

Offline

Board footer

Powered by FluxBB