On a laptop with a 940M GPU. It seems it's not a fermi architecture so I installed the regular driver (not 390xx)
inxi -b
System: Host: remi-pc Kernel: 4.14.48-2-MANJARO x86_64 bits: 64 Desktop: N/A
Distro: Manjaro Linux 17.1.10 Hakoila
Machine: Type: Laptop System: ASUSTeK product: UX303LB v: 1.0 serial: <root required>
Mobo: ASUSTeK model: UX303LB v: 1.0 serial: <root required> UEFI: American Megatrends v: UX303LB.206
date: 08/24/2015
Battery: ID-1: BAT0 charge: 44.3 Wh condition: 45.2/50.1 Wh (90%)
CPU: Dual Core: Intel Core i5-5200U type: MT MCP speed: 1197 MHz min/max: 500/2700 MHz
Graphics: Card-1: Intel HD Graphics 5500 driver: i915 v: kernel
Card-2: NVIDIA GM108M [GeForce 940M] driver: nvidia v: 396.24
Display: x11 server: N/A driver: intel resolution: <xdpyinfo missing>
OpenGL: renderer: N/A v: N/A
Network: Card-1: Intel Wireless 7265 driver: iwlwifi
Drives: HDD Total Size: 238.47 GiB used: 33.88 GiB (14.2%)
Info: Processes: 161 Uptime: 2h 05m Memory: 7.70 GiB used: 1.76 GiB (22.8%) Shell: bash inxi: 3.0.10
inxi -G
Graphics: Card-1: Intel HD Graphics 5500 driver: i915 v: kernel
Card-2: NVIDIA GM108M [GeForce 940M] driver: nvidia v: 396.24
Display: x11 server: N/A driver: intel resolution: <xdpyinfo missing>
OpenGL: renderer: N/A v: N/A
optirun inxi -G
Graphics: Card-1: Intel HD Graphics 5500 driver: i915 v: kernel
Card-2: NVIDIA GM108M [GeForce 940M] driver: nvidia v: 396.24
Display: x11 server: N/A driver: intel resolution: <xdpyinfo missing>
OpenGL: renderer: GeForce 940M/PCIe/SSE2 v: 4.6.0 NVIDIA 396.24
primusrun inxi -G
sh: line 1: 2028 Segmentation fault (core dumped) /sbin/glxinfo 2> /dev/null
Graphics: Card-1: Intel HD Graphics 5500 driver: i915 v: kernel
Card-2: NVIDIA GM108M [GeForce 940M] driver: nvidia v: 396.24
Display: x11 server: N/A driver: intel resolution: <xdpyinfo missing>
Message: No advanced graphics data found on this system.
optirun glxgears
works
primusrun glxgears
Error: couldn't get an RGB, Double-buffered visual
primusrun steam
....
WORKS ? ... I have tried it numerous times, I don't understand... Maybe after I reinstalled the driver...
However launching a game (even with "primusrun %command%" in the launch option) still doesn't work
edit: well it worked only once
primusrun steam
Running Steam on manjarolinux 17.1.10 64-bit
STEAM_RUNTIME is enabled automatically
Pins up-to-date!
Installing breakpad exception handler for appid(steam)/version(1528497815)
Installing breakpad exception handler for appid(steam)/version(1528497815)
Failed to load steamui.so - dlerror(): /usr/lib32/primus/libGL.so.1: symbol _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEjjPKcj version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
Thanks for reading!