optirun logs me out with the 4.10.0 kernel, but did not with the 4.9.x series kernel

Hi,

For a reason that escapes me, even though I was able to get optirun to work with the 4.9.x kernel (although with some work and with some apps stubornly refusing to be run with, for details see this thread (for apps refusing to run with optirun) and this thread for details on how I managed to get optirun to work at all) when I run:


optirun glxgears

with the 4.10.0 kernel I am logged out of KDE Plasma 5 and sent to the SDDM login screen. So I can be as helpful as possible here is my:

lspci -k

output:


00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06)
        Subsystem: Hewlett-Packard Company Device 1966
        Kernel modules: ie31200_edac
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
        Subsystem: Hewlett-Packard Company Device 1966
        Kernel driver in use: i915
        Kernel modules: i915
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
        Subsystem: Hewlett-Packard Company Device 1966
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
        Subsystem: Hewlett-Packard Company Device 1966
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
        Subsystem: Hewlett-Packard Company Device 1966
        Kernel driver in use: mei_me
        Kernel modules: mei_me
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
        Subsystem: Hewlett-Packard Company Device 1966
        Kernel driver in use: ehci-pci
        Kernel modules: ehci_pci
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
        Subsystem: Hewlett-Packard Company Device 1966
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:1c.6 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #7 (rev d5)
        Kernel driver in use: pcieport
        Kernel modules: shpchp
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)
        Subsystem: Hewlett-Packard Company Device 1966
        Kernel driver in use: ehci-pci
        Kernel modules: ehci_pci
00:1f.0 ISA bridge: Intel Corporation HM87 Express LPC Controller (rev 05)
        Subsystem: Hewlett-Packard Company Device 1966
        Kernel driver in use: lpc_ich
        Kernel modules: lpc_ich
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)
        Subsystem: Hewlett-Packard Company Device 1966
        Kernel driver in use: ahci
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
        Subsystem: Hewlett-Packard Company Device 1966
        Kernel driver in use: i801_smbus
        Kernel modules: i2c_i801
01:00.0 3D controller: NVIDIA Corporation GK208M [GeForce GT 740M] (rev a1)
        Subsystem: Hewlett-Packard Company Device 219c
        Kernel driver in use: nouveau
        Kernel modules: nouveau
07:00.0 Network controller: Broadcom Limited BCM4352 802.11ac Wireless Network Adapter (rev 03)
        Subsystem: Hewlett-Packard Company Device 2154
        Kernel driver in use: wl
        Kernel modules: bcma, wl
09:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01)
        Subsystem: Hewlett-Packard Company Device 1966
        Kernel driver in use: rtsx_pci
        Kernel modules: rtsx_pci
0f:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
        Subsystem: Hewlett-Packard Company Device 1966
        Kernel driver in use: r8169
        Kernel modules: r8169

and these lines are what is most worrying to me:


01:00.0 3D controller: NVIDIA Corporation GK208M [GeForce GT 740M] (rev a1)
        Subsystem: Hewlett-Packard Company Device 219c
        Kernel driver in use: nouveau
        Kernel modules: nouveau

as I have blacklisted nouveau and installed nvidia-bumblebee with zypper (which I understand includes a modprobe blacklist configuration file, namely, /etc/modprobe.d/51-blacklist-nouveau.conf, which should automatically blacklist nouveau for me anyway!). I have re-run:


sudo mkinitrd

at least twice since I upgraded to the 4.10.0 kernel and rebooted and still it does not seem to have helped. Anyone have any ideas why? By-the-way I have the dkms systemd service enabled (with

systemctl enable dkms

), I have also enabled bumblebeed (even though I was originally afraid to as I thought it might slow my PC down, but I have overcome that fear and found my PC is just as fast as ever :). If there is something I was supposed to do that I am missing then I don’t know what it is.

Thanks for your time,
Brenton

Running:


systemctl status dkms

returns:


● dkms.service - Dynamic Kernel Modules System
   Loaded: loaded (/usr/lib/systemd/system/dkms.service; enabled; vendor preset: disabled)
   Active: active (exited) since Tue 2017-02-28 13:17:17 AEST; 2h 12min ago
 Main PID: 1238 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/dkms.service


Feb 28 13:16:44 linux-jiu4 systemd[1]: Starting Dynamic Kernel Modules System...
Feb 28 13:16:53 linux-jiu4 dkms.systemd[1238]: Kernel preparation unnecessary for this kernel.  Skipping...
Feb 28 13:16:54 linux-jiu4 dkms.systemd[1238]: Building module:
Feb 28 13:16:56 linux-jiu4 dkms.systemd[1238]: cleaning build area...
Feb 28 13:17:17 linux-jiu4 dkms.systemd[1238]: 'make' KERNEL_UNAME=4.10.0-1-default modules..........(bad exit status: 2)
Feb 28 13:17:17 linux-jiu4 dkms.systemd[1238]: Error! Bad return status for module build on kernel: 4.10.0-1-default (x86_64)
Feb 28 13:17:17 linux-jiu4 dkms.systemd[1238]: Consult /var/lib/dkms/nvidia/375.26/build/make.log for more information.
Feb 28 13:17:17 linux-jiu4 systemd[1]: Started Dynamic Kernel Modules System.

and /var/lib/dkms/nvidia/375.26/build/make.log has the contents: http://paste2.org/ZjEUW2mZ.

I tried rebuilding nvidia-bumblebee for the latest Long Lived NVIDIA branch release (375.39) but when dkms tried to build it, it failed returning the error:


  CC [M]  /var/lib/dkms/nvidia/375.39/build/nvidia/nv-frontend.o
  CC [M]  /var/lib/dkms/nvidia/375.39/build/nvidia/nv-instance.o
  CC [M]  /var/lib/dkms/nvidia/375.39/build/nvidia/nv.o
  CC [M]  /var/lib/dkms/nvidia/375.39/build/nvidia/nv-acpi.o
  CC [M]  /var/lib/dkms/nvidia/375.39/build/nvidia/nv-chrdev.o
  CC [M]  /var/lib/dkms/nvidia/375.39/build/nvidia/nv-cray.o
  CC [M]  /var/lib/dkms/nvidia/375.39/build/nvidia/nv-dma.o
  CC [M]  /var/lib/dkms/nvidia/375.39/build/nvidia/nv-gvi.o
  CC [M]  /var/lib/dkms/nvidia/375.39/build/nvidia/nv-i2c.o
  CC [M]  /var/lib/dkms/nvidia/375.39/build/nvidia/nv-mempool.o
  CC [M]  /var/lib/dkms/nvidia/375.39/build/nvidia/nv-mmap.o
  CC [M]  /var/lib/dkms/nvidia/375.39/build/nvidia/nv-p2p.o
  CC [M]  /var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.o
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c: In function ‘nvidia_cpu_callback’:
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:213:14: error: ‘CPU_DOWN_FAILED’ undeclared (first use in this function)
         case CPU_DOWN_FAILED:
              ^~~~~~~~~~~~~~~
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:213:14: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:220:14: error: ‘CPU_DOWN_PREPARE’ undeclared (first use in this function)
         case CPU_DOWN_PREPARE:
              ^~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:15:0:
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c: In function ‘nv_init_pat_support’:
/var/lib/dkms/nvidia/375.39/build/common/inc/nv-linux.h:391:34: error: implicit declaration of function ‘register_cpu_notifier’ -Werror=implicit-function-declaration]
 #define register_hotcpu_notifier register_cpu_notifier
                                  ^
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:258:17: note: in expansion of macro ‘register_hotcpu_notifier’
             if (register_hotcpu_notifier(&nv_hotcpu_nfb) != 0)
                 ^~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c: In function ‘nv_teardown_pat_support’:
/var/lib/dkms/nvidia/375.39/build/common/inc/nv-linux.h:388:36: error: implicit declaration of function ‘unregister_cpu_notifier’ -Werror=implicit-function-declaration]
 #define unregister_hotcpu_notifier unregister_cpu_notifier
                                    ^
/var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.c:283:9: note: in expansion of macro ‘unregister_hotcpu_notifier’
         unregister_hotcpu_notifier(&nv_hotcpu_nfb);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-4.10.0-1/scripts/Makefile.build:296: /var/lib/dkms/nvidia/375.39/build/nvidia/nv-pat.o] Error 1
make[2]: *** [/usr/src/linux-4.10.0-1/Makefile:1500: _module_/var/lib/dkms/nvidia/375.39/build] Error 2
make[2]: Leaving directory '/usr/src/linux-4.10.0-1-obj/x86_64/default'
make[1]: *** [Makefile:150: sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-4.10.0-1'
make: *** [Makefile:81: modules] Error 2

Using the absolute latest NVIDIA release 378.13 returns the exact same error when DKMS builds it.

I found a fix. If you want this fix to, just use my OBS repo https://build.opensuse.org/package/show/X11:Bumblebee/nvidia-bumblebee.

Hmm, following the link only shows a repo page with the last changes two months old, and two comments (from you?), pointing back to here :frowning:
So how did you fix it?

Rofl, sorry, wrong link! Here is the fixed package https://build.opensuse.org/package/show/home:fusion809/nvidia-bumblebee