nVidia 940MX on new laptop

Howdy folks, I’vebeen using openSuSE for years on AMD/Radeon hardware, but after a crash the best I could get on short notice is the HP Envy m7-n109dx. It has an Intel CPU and nVidia graphics card, the 940MX. It’s supposed tobe pretty good, but I’m looking at pixelation just on kpatience!

Does anyone know how to get this video card working?

Opening nvidia-settings tells me I’m not using the nvidia card and should run nvidia-xconfig. When I do that, it generates a xorg.conf file (details below) with which X won’t start.

If I’m not using the nvidia card and still have graphics at all, I infer that I must have a hybrid system, so I installed bumblebee (and blacklisted nouveau as directed). Bumblebee says it’s on, but switching off seems to make no difference (cat/proc/acpi/bbswitch, or tee /proc/acpi/bbswitch <<<off).

FYI, I took the SSD out of my old computer, which had 42.1, installed in new computer and ran the update to 42.2, which seemed to sort out driver issues for all the other hardware (notably sound). I have not yet tried a clean install.

Thanks in advance if you can help, and if you can only help if you have additional info, I am at your disposal. Here’s some of what I think you’ll need:

APPENDIX 1: Relevant packages

A search in YaST Software Management for installed packages with “nvidia” string yields:

bumblebee
libdrm_nouveau2
libdrm_nouveau2-32bit
nvidia-computeG04
nvidia-gfxG04-kmp-default
nvidia-glG04
x11-video-nvidiaG04
xf86-video-nouveau
xf86-video-nv

A search for“bumblebee” string yields:

bbswitch
bbswitch-kmp-default
bumblbee
primus
primus-32bit

APPENDIX 2: Outputof command “nvidia-xconfig”

WARNING:Unable to locate/open X configuration file.

Packagexorg-server was not found in the pkg-config search path.
Perhapsyou should add the directory containing `xorg-server.pc’
to thePKG_CONFIG_PATH environment variable
No package ‘xorg-server’ found
New X configuration file written to ‘/etc/X11/xorg.conf’

A note regarding xorg-server: I installed the package xorg-x11-devel, but the output of this command didn’t change.

APPENDIX 3: Content of the “xorg.conf” file created by command “nvidia-xconfig”

#nvidia-xconfig: X configuration file generated by nvidia-xconfig
#nvidia-xconfig: version 367.57 (buildmeister@swio-display-x64-rhel04-13) Mon Oct 3 21:42:19 PDT2016

Section"ServerLayout"
Identifier “Layout0”
Screen 0 “Screen0”
InputDevice “Keyboard0” “CoreKeyboard”
InputDevice “Mouse0” “CorePointer”
EndSection

Section"Files"
EndSection

Section"InputDevice"
#generated from data in “/etc/sysconfig/mouse”
Identifier “Mouse0”
Driver “mouse”
Option “Protocol” “IMPS/2”
Option “Device” “/dev/input/mice”
Option “Emulate3Buttons” “yes”
Option “ZAxisMapping” “4 5”
EndSection

Section"InputDevice"
#generated from default
Identifier “Keyboard0”
Driver “kbd”
EndSection

Section"Monitor"
Identifier “Monitor0”
VendorName “Unknown”
ModelName “Unknown”
HorizSync 28.0 - 33.0
VertRefresh 43.0 - 72.0
Option “DPMS”
EndSection

Section"Device"
Identifier “Device0”
Driver “nvidia”
VendorName “NVIDIA Corporation”
EndSection

Section"Screen"
Identifier “Screen0”
Device “Device0”
Monitor “Monitor0”
DefaultDepth 24
SubSection “Display”
Depth 24
EndSubSection
EndSection

More info: driver version from nVidia repo is 367.57-18.2, per YaST.

Do not use the normal NVIDIA driver you must use the nvidia-bumblebee driver on optinus based hardware (Intel_NVIDIA GPU)

Before install of the bumblebee nvidia driver you MUST remove the normal driver completely.

Thanks for the reply, gogalthorpe, but I’m not entirely sure what you mean. If I mark bumblebee for installation in YaST’s software manager, it insists on the other nvidia packages.

Since original post, I tried replacing driver version 3.67 from community nVidia repo with version 3.75 from BumblebeeProject repo, but the behavior is the same (except that bumblebee project’s version took away the “nvidia-settings” program).

I don’t have an optimus machine so someone with actual hardware needs to jump in

Okay, my main technical problem is that my eyes get worse as I age. Re-reading the bumblebee instructions, I caught some typos, and now things are moving in the right direction, but I’m still having problems.

  1. The command “nvidia-settings” yields nvidia-settings: error while loading shared libraries: libnvidia-ml.so.1: cannot open shared object file: No such file or directory
    It seems this library is in the static nvidia driver package, but not in the bumblebee version. I think I need nvidia-settings in order to use my projector.

  2. Suspend works, but then my laptop won’t wake up. I’ve read elsewhere that this is a problem with the video driver.

  3. I don’t seem able to select the nvidia card for normal operation, i.e. many KDE compositing effects don’t work.

A pretty good guide for installing bumblebee is found here:https://forums.opensuse.org/showthread.php/505270-ultimate-tutorial-installing-Bumblebee-driver-for-SUSE
I used it without problems for installing bumblebee on Leap 42.2.
Only difference: I don’t add option “nouveau.modeset=0” to bootloader as advised in point 4) of this guide.

Usually you don’t need a xorg.conf file for using bumblebee - I don’t have one, but it’s a laptop without any exterior monitor here.

If you have a working bumblebee configuration and you call nvidia-settings from normal KDE menu, you are using the Intel graphics at that moment -
Nvidia graphics card is switched off and can’t be configurated therefore.
You have to call nvidia-settings from a console with

optirun nvidia-settings

, to activate the Nvidia graphics before configurating it.

I don’t have to use nvidia-settings at all.

You can try tinkering with nvidia-settings, but if that doesn’t work right I would advise to start with the guide I linked above
and also remove xorg.conf together with all prior nvidia installations as described in that guide.

Are we sure this is an Optimus system, I can’t find anything stating that on the net. So what’s the output of:

/sbin/lspci | grep -E "VGA|3D"

If it has both a NVIDIA and Intel GPU it is almost certainly Optimus. Then Manufacturers are very bad about exposing this fact. If not optimus then there should be a switch in the BIOS (UEFI) that allows the switch of GPU.

So what’s the output of: /sbin/lspci | grep -E “VGA|3D”

Hi, hank_se. It’s

00:02.0 VGA compatible controller: Intel Corporation Device 5916 (rev 02)
04:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940MX] (rev ff)

Thanks, Brunolab.

Actually, I did follow the guide you linked, but on my first try, I typed some things wrong. Like “enable bumblebee” instead of “enable bumblebeed”. On a second pass, I got bumblebee working for optirun, but when I optirun nvidia-settings, I get that error about the library it can’t find. When I look in YaST software management for what provides that file, I find nvidia-computeG04, and that’s incompatible with nvidia-bumblebee.

Searching these forums, I see that if I want to run 3D graphics all the time, then I need something called suse-prime that evidently doesn’t work with KDE on 42.2. I can live without 3d, but what’s killing me is that when my laptop goes to sleep, it doesn’t wake back up, and I lose my work. I need SOME video driver that wakes from suspend.

This confused me at first, because the specs just said nvidia. I thought all I had to do was add the nvidia repo and update, and that did install nvidia packages but didn’t activate the nvidia GPU.

So it’s an Optimus system. About the nvidia-settings command it has to be run like this:

optirun -b none nvidia-settings -c :8

This is about all I can contribute as I’m no longer on an Optimus system, thank God.

lspci is short hand for list PCI ie things connected to the PCI bus of the machine | grep -E “vga|3D” says pipe the output of the lspci command through a program grep that acts a a filter and only show lines with vga or 3D in them.

So you look for all hardware that controls the VGA (graphics)

>So it’s an Optimus system. About the nvidia-settings command it has to be run like this:
>optirun -b none nvidia-settings -c :8

Doesn’t matter how I run it; it can’t find the library.

>This is about all I can contribute as I’m no longer on an Optimus system, thank God.

I’m beginning to understand that sentiment. However I expect I’ll need to make the best of this for years to come. I’ve been using openSuSE since version 9, but at this point I’m starting to wonder if there’s a distro that’s better for this hardware.

>2) Suspend works, but then my laptop won’t wake up. I’ve read elsewhere that this is a problem with the video driver.

Correcttion: The laptop wakes up, but the screen stays black. If I hit ctrl-alt-F1 and carefully type my login credentials, then I can enter a command. Anyone know if there’s a command to turn the screen back on?

Thanks. I’m basically an end-user of linux as a tool, not a tool-maker, and visit this forum mainly when I get a new computer (like now). That’s thankfully rare, but it means I forget half of what I learned in the last pass.

Hi
Add your voice (and logs) to 187761 – Nvidia GPU unusable after suspend.

The problem is that NVIDIA does not support this Frankengrapics hybrid on Linux. I don’t think any distro has got it totally licked. The problem is how NVIDIA Linux driver handles the X-stack. It replaces pieces with it’s own things and thus breaks any other driver that needs the stack.

Before tackling anything else you need to first be absolutely sure that bumblebee is working.

Are you using sleep or hibernate. Suspend is kind of nebulas

Check the BIOS (UEFI) and see if you can turn off either of the GPU. If so it can make life easier

>The problem is that NVIDIA does not support this Frankengrapics hybrid on Linux.

It’s not entirely clear that it works much better under Windows, but at least it’s pre-installed.

>Before tackling anything else you need to first be absolutely sure that bumblebee is working.

It is. “optirun glxspheres” works fine.

>Are you using sleep or hibernate. Suspend is kind of nebulas

Suspend is what the KDE exit menu calls it. That should be suspend-to-ram, right?

>Check the BIOS (UEFI) and see if you can turn off either of the GPU.

Tried that. No such luck.