[arch-general] No nVidia support on Apparmor kernel
Hey there, I've used the ABS to compile a kernel with the CONFIG_AUDIT=y and CONFIG_SECURITY_APPARMOR=y options enabled. Apparmor and audit work just fine, but when I tried to start a game, I failed. The following errors occur only when using the apparmor enabled kernel (independently of kernel boot parameters to enable/disable apparmor). $ lsmod | grep nvidia $ modprobe nvidia modprobe: FATAL: Module nvidia not found. $ glxgears Xlib: extension "GLX" missing on display ":0". Error: couldn't get an RGB, Double-buffered visual $ glxinfo name of display: :0 Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Error: couldn't find RGB GLX visual or fbconfig Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Anything that doesn't require fancy graphics works (though libreoffice and some other programs complain anyway). The configuration files are much alike (diff attached) with only apparmor and audit options changed, and a few others presumably by `make config`. I also tried to use `make nconfig` in the PKGBUILD to change them, to the same effect. By following the wiki, I eventually found this out: $ ls /lib/modules/extra* /lib/modules/extramodules-4.2-apparmor: version /lib/modules/extramodules-4.2-ARCH: bbswitch.ko.gz nvidia.ko.gz nvidia-uvm.ko.gz version $ modprobe -c > ARCH.modprobe-c # with default kernel loaded $ modprobe -c > apparmor.modprobe-c # with compiled kernel loaded $ # ^^^-- diff attached to this message The diffs of these files clearly show the apparmor kernel seems to have no nvidia support, while the compile time configuration files show no difference in this matter. Using insmod doesn't work, as those extra modules are compiled for another kernel (error "Invalid module format"). But how are they there? I couldn't find any information on EXTRA modules in the wiki, never heard about them. Seems they are compiled separately: $ pacman -Qo /lib/modules/extramodules-4.2-ARCH/* /usr/lib/modules/extramodules-4.2-ARCH/bbswitch.ko.gz pertence a bbswitch 0.8-37 /usr/lib/modules/extramodules-4.2-ARCH/nvidia.ko.gz pertence a nvidia 355.11-3 /usr/lib/modules/extramodules-4.2-ARCH/nvidia-uvm.ko.gz pertence a nvidia 355.11-3 /usr/lib/modules/extramodules-4.2-ARCH/version pertence a linux 4.2.2-1 I guess at least now I know it's not some weird compilation option I forgot about... Might as well put the compiled kernel in the AUR. I doubt nvidia is giving away source code to compile that... Is this a dead end? Or perhaps the guys with nvidia and OpenSUSE found a way? How can I get that nvidia extra module to work on ? And why is it an "extra"? Wait, now I think of it, maybe I can make this work. Maybe I can get this to work with ABS, by pointing to the correct headers to the nvidia package. I will post this now because possibly someone else knows best, and if I end up solving my own problem, at least the solution becomes available for anyone looking for it. I found the answer to 60% of my original questions regarding this problem, while writing this email, if I don't post this now I may never do. I hope you're okay with this. Note: I sent this a while ago, got an error that it was too large, so now I used diff -c3 on the original attachments. Thanks for your time, João Miguel
That’s just how extra modules work: they are not kernel built-in (hence the name extra), and must be build using the kernel headers corresponding to the running kernel. Both nvidia and bbswitch can be compiled for any custom kernel, I suggest that you take a look at DKMS (search for that in the wiki) and corresponding bbswitch-dkms and nvidia-dkms package (not sure about the name, but must be something like this). Bruno Le 14 octobre 2015 17:42:13 GMT+02:00, "João Miguel" <jmcf125@openmailbox.org> a écrit :
Hey there,
I've used the ABS to compile a kernel with the CONFIG_AUDIT=y and CONFIG_SECURITY_APPARMOR=y options enabled. Apparmor and audit work just fine, but when I tried to start a game, I failed. The following errors occur only when using the apparmor enabled kernel (independently of kernel boot parameters to enable/disable apparmor).
$ lsmod | grep nvidia $ modprobe nvidia modprobe: FATAL: Module nvidia not found. $ glxgears Xlib: extension "GLX" missing on display ":0". Error: couldn't get an RGB, Double-buffered visual $ glxinfo name of display: :0 Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Error: couldn't find RGB GLX visual or fbconfig Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0".
Anything that doesn't require fancy graphics works (though libreoffice and some other programs complain anyway).
The configuration files are much alike (diff attached) with only apparmor and audit options changed, and a few others presumably by `make config`. I also tried to use `make nconfig` in the PKGBUILD to change them, to the same effect.
By following the wiki, I eventually found this out:
$ ls /lib/modules/extra* /lib/modules/extramodules-4.2-apparmor: version
/lib/modules/extramodules-4.2-ARCH: bbswitch.ko.gz nvidia.ko.gz nvidia-uvm.ko.gz version $ modprobe -c > ARCH.modprobe-c # with default kernel loaded $ modprobe -c > apparmor.modprobe-c # with compiled kernel loaded $ # ^^^-- diff attached to this message
The diffs of these files clearly show the apparmor kernel seems to have no nvidia support, while the compile time configuration files show no difference in this matter.
Using insmod doesn't work, as those extra modules are compiled for another kernel (error "Invalid module format"). But how are they there? I couldn't find any information on EXTRA modules in the wiki, never heard about them. Seems they are compiled separately:
$ pacman -Qo /lib/modules/extramodules-4.2-ARCH/* /usr/lib/modules/extramodules-4.2-ARCH/bbswitch.ko.gz pertence a bbswitch 0.8-37 /usr/lib/modules/extramodules-4.2-ARCH/nvidia.ko.gz pertence a nvidia 355.11-3 /usr/lib/modules/extramodules-4.2-ARCH/nvidia-uvm.ko.gz pertence a nvidia 355.11-3 /usr/lib/modules/extramodules-4.2-ARCH/version pertence a linux 4.2.2-1
I guess at least now I know it's not some weird compilation option I forgot about... Might as well put the compiled kernel in the AUR.
I doubt nvidia is giving away source code to compile that... Is this a dead end? Or perhaps the guys with nvidia and OpenSUSE found a way?
How can I get that nvidia extra module to work on ? And why is it an "extra"?
Wait, now I think of it, maybe I can make this work. Maybe I can get this to work with ABS, by pointing to the correct headers to the nvidia package. I will post this now because possibly someone else knows best, and if I end up solving my own problem, at least the solution becomes available for anyone looking for it. I found the answer to 60% of my original questions regarding this problem, while writing this email, if I don't post this now I may never do. I hope you're okay with this.
Note: I sent this a while ago, got an error that it was too large, so now I used diff -c3 on the original attachments.
Thanks for your time, João Miguel
By the way, if you decide to switch to bbswitch-dkms + nvidia-dkms, you will probably face the same issue I faced yesterday with the nvidia card not powering off. In this case I would suggest you to take a look at this thread: https://bbs.archlinux.org/viewtopic.php?id=189032 Simon Le 14. 10. 15 17:51, Bruno Pagani a écrit :
That’s just how extra modules work: they are not kernel built-in (hence the name extra), and must be build using the kernel headers corresponding to the running kernel.
Both nvidia and bbswitch can be compiled for any custom kernel, I suggest that you take a look at DKMS (search for that in the wiki) and corresponding bbswitch-dkms and nvidia-dkms package (not sure about the name, but must be something like this).
Bruno
Le 14 octobre 2015 17:42:13 GMT+02:00, "João Miguel" <jmcf125@openmailbox.org> a écrit :
Hey there,
I've used the ABS to compile a kernel with the CONFIG_AUDIT=y and CONFIG_SECURITY_APPARMOR=y options enabled. Apparmor and audit work just fine, but when I tried to start a game, I failed. The following errors occur only when using the apparmor enabled kernel (independently of kernel boot parameters to enable/disable apparmor).
$ lsmod | grep nvidia $ modprobe nvidia modprobe: FATAL: Module nvidia not found. $ glxgears Xlib: extension "GLX" missing on display ":0". Error: couldn't get an RGB, Double-buffered visual $ glxinfo name of display: :0 Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Error: couldn't find RGB GLX visual or fbconfig Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0".
Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0". Xlib: extension "GLX" missing on display ":0".
Anything that doesn't require fancy graphics works (though libreoffice and some other programs complain anyway).
The configuration files are much alike (diff attached) with only apparmor and audit options changed, and a few others presumably by `make config`. I also tried to use `make nconfig` in the PKGBUILD to change them, to the same effect.
By following the wiki, I eventually found this out:
$ ls /lib/modules/extra* /lib/modules/extramodules-4.2-apparmor: version
/lib/modules/extramodules-4.2-ARCH: bbswitch.ko.gz nvidia.ko.gz nvidia-uvm.ko.gz version $ modprobe -c > ARCH.modprobe-c # with default kernel loaded $ modprobe -c > apparmor.modprobe-c # with compiled kernel loaded $ # ^^^-- diff attached to this message
The diffs of these files clearly show the apparmor kernel seems to have no nvidia support, while the compile time configuration files show no difference in this matter.
Using insmod doesn't work, as those extra modules are compiled for another kernel (error "Invalid module format"). But how are they there? I couldn't find any information on EXTRA modules in the wiki, never heard about them. Seems they are compiled separately:
$ pacman -Qo /lib/modules/extramodules-4.2-ARCH/* /usr/lib/modules/extramodules-4.2-ARCH/bbswitch.ko.gz pertence a bbswitch 0.8-37 /usr/lib/modules/extramodules-4.2-ARCH/nvidia.ko.gz pertence a nvidia 355.11-3 /usr/lib/modules/extramodules-4.2-ARCH/nvidia-uvm.ko.gz pertence a nvidia 355.11-3 /usr/lib/modules/extramodules-4.2-ARCH/version pertence a linux 4.2.2-1
I guess at least now I know it's not some weird compilation option I forgot about... Might as well put the compiled kernel in the AUR.
I doubt nvidia is giving away source code to compile that... Is this a dead end? Or perhaps the guys with nvidia and OpenSUSE found a way?
How can I get that nvidia extra module to work on ? And why is it an "extra"?
Wait, now I think of it, maybe I can make this work. Maybe I can get this to work with ABS, by pointing to the correct headers to the nvidia package. I will post this now because possibly someone else knows best, and if I end up solving my own problem, at least the solution becomes available for anyone looking for it. I found the answer to 60% of my original questions regarding this problem, while writing this email, if I don't post this now I may never do. I hope you're okay with this.
Note: I sent this a while ago, got an error that it was too large, so now I used diff -c3 on the original attachments.
Thanks for your time, João Miguel
By the way, if you decide to switch to bbswitch-dkms + nvidia-dkms, you will probably face the same issue I faced yesterday with the nvidia card not powering off. In this case I would suggest you to take a look at this thread: https://bbs.archlinux.org/viewtopic.php?id=189032 Thanks, but though I do have the bbswitch module, I'm currently not currently using (and haven't used in a long time) the integrated graphics card, just the nVidia card for everything, it has much better performance in the games I play for some reason (don't know why - closed source :-/ ).
That reminds me, I should probably uninstall the bbswitch package... All the best, João Miguel
participants (3)
-
Bruno Pagani
-
João Miguel
-
Simon Brulhart