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