Kernel 4.16-rc1 Breaks latest drivers - 'Unknown symbol swiotlb_map_sg_attrs'

NVIDIA Linux x86_64 driver 396.18(beta)

works “as is” as there’s new

NV_IS_EXPORT_SYMBOL_PRESENT_swiotlb_map_sg_attrs

check around the swiotlb_map_sg_attrs usage within

common/inc/nv-linux.h

And even this time(like earlier

Nvidia driver v390.(25|42|48)

) I have manually built it using

clang/LLVM for clang/LLVM-built kernel v4.16.1(latest stable) for Ubuntu 17.10 x86_64.

Cheers

Specifics

exp@exp:~$ 
exp@exp:~$ nvidia-smi
Thu Apr 12 00:20:14 2018       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 396.18                 Driver Version: 396.18                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 860M    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   52C    P0    N/A /  N/A |    690MiB /  4046MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
exp@exp:~$ 
exp@exp:~$ cat /proc/version 
Linux version 4.16.1 (exp@exp) (clang version 5.0.0-3 (tags/RELEASE_500/final)) #1 SMP Sun Apr 8 07:57:50 PDT 2018
exp@exp:~$ 
exp@exp:~$ 

exp@exp:~$ ~/nvidia-driver-compiler.sh 
++ head -1
+++ uname -r
++ eclang /lib/modules/4.16.1/kernel/drivers/video/nvidia.ko
+++ strings -a /lib/modules/4.16.1/kernel/drivers/video/nvidia.ko
+++ grep 'clang version'
clang version 5.0.0-3 (tags/RELEASE_500/final)
++ head -1
+++ uname -r
++ eclang /lib/modules/4.16.1/kernel/drivers/video/nvidia-drm.ko
+++ strings -a /lib/modules/4.16.1/kernel/drivers/video/nvidia-drm.ko
+++ grep 'clang version'
clang version 5.0.0-3 (tags/RELEASE_500/final)
++ head -1
+++ uname -r
++ eclang /lib/modules/4.16.1/kernel/drivers/video/nvidia-modeset.ko
+++ strings -a /lib/modules/4.16.1/kernel/drivers/video/nvidia-modeset.ko
+++ grep 'clang version'
clang version 5.0.0-3 (tags/RELEASE_500/final)
++ head -1
+++ uname -r
++ eclang /lib/modules/4.16.1/kernel/drivers/video/nvidia-uvm.ko
+++ strings -a /lib/modules/4.16.1/kernel/drivers/video/nvidia-uvm.ko
+++ grep 'clang version'
clang version 5.0.0-3 (tags/RELEASE_500/final)
exp@exp:~$ 
exp@exp:~$ 

exp@exp:~$ ~/nvidia_driver_modules_version.sh 
++ grep '^version='
+++ uname -r
++ strings -a /lib/modules/4.16.1/kernel/drivers/video/nvidia.ko
version=396.18
++ grep '^version='
+++ uname -r
++ strings -a /lib/modules/4.16.1/kernel/drivers/video/nvidia-drm.ko
version=396.18
++ grep '^version='
+++ uname -r
++ strings -a /lib/modules/4.16.1/kernel/drivers/video/nvidia-uvm.ko
++ grep '^version='
+++ uname -r
++ strings -a /lib/modules/4.16.1/kernel/drivers/video/nvidia-modeset.ko
version=396.18
exp@exp:~$ 
exp@exp:~$ 

exp@exp:~$ 
exp@exp:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 17.10
Release:	17.10
Codename:	artful
exp@exp:~$ 
exp@exp:~$

Hello,

I have the same problem with driver 390.48 on kernel 4.16.1 (opensuse tumbleweed).

Does anyone know how to fix this?

AFAIK you have to update the driver. 396.18 fixes the issue.
Or you have to patch the kernel, as shown above.

And 396.18 works for new kernel 4.17.0-rc1 also. And that it’s 10-15% faster than before.
Though it’s beta, I have found no issues so far.

EDIT: I mean OpenCL calculation is faster. As for graphics, I am not sure.

I tried to use the patch form mlau for the 390.48 Driver with the --apply-patch option,
but I was asked
file to patch:

which is the file to patch?

The file to patch is kernel/common/inc/nv-linux.h

and thanks to mlau!

Just to clarify, does your (anyone) GUI render completely unusable with 390.48 driver and 4.16 kernel? Just curious, because nobody have told it before. Because my Debian boots with black screen, but X starts in few minutes automatically. After that it is completely usable and everything, including nvidia stuff, seems to work. Anyway, I decided to stick with 4.15 kernel for a while.

That’s been fixed in 390.59 and 396.24. Just unmask and upgrade.
Edit: I was answering a different post being displayed to me due the forum software freaking out. Though kind of fitting.
Using the original driver, it simply wouldn’t compile but distros have patched drivers.

This patch: https://bugzilla.redhat.com/attachment.cgi?id=1425704
from here: 1570493 – please add a function to add kernel module to a whitelist
should fix the issue.

To forum moderators and admins: The above impostor with the username (thelukester) going by the name Luke Benes and email is a spammer and scammer spreading negativity with his garbage talk and trying to devalue my above research work. He needs to be blocked and banned immediately. He is frustrated to the core since he wasn’t able to steal my research work from me. He has sent me couple of emails with that name and email id talking all the nonsense about my above research work. And this guy’s frustration and insecurity are at the peak, since this guy has gone to all of my other published places and has commented negatively about my above research work in the same exact manner. This guy has no idea about my research work but still out of frustration, stupidity and idiocy, he is talking negative about my LinkedIn, resume, etc. So, I am reporting the above impostor/scammer/spammer to be immediately banned and blocked from this forum and his above comment to be deleted.

Cheers

Hello raghavanil4m,

I am looking into this now. Thanks for posting.

Best,
Tom

Hi Tom,

Thanks for taking the quick right action to ban him. He needs to be banned from GeForce forum as well where he has spammed in the same manner over here(https://forums.geforce.com/default/topic/1039280/geforce-drivers/success-clang-built-nvidia-390-25-gtx-geforce-860m-driver-on-clang-built-linux-kernel-4-15-7/post/5972383/#5972383) with another fake profile having the username(slacka123).

Thanks,
Raghavan