nvidia drivers not working and optimus not switching

Goal:

  • I have a notebook with intel graphics and an mx150. I would like to shift all rendering to the mx150 as intel gpu is currently bottle-necked by my setup.

problem:

  • I am attempting to use optimus-manager to swtich to nvidia gpu. It is not currently activating that gpu and its drivers are not being registered.
#inxi -Fxxcz
System:    Host: david-laptop Kernel: 5.4.18-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0 
           Desktop: KDE Plasma 5.17.5 tk: Qt 5.14.1 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Laptop System: Acer product: Aspire A515-51G v: V1.12 serial: <filter> 
           Mobo: KBL model: Charmander_KL v: V1.12 serial: <filter> UEFI: Insyde v: 1.12 date: 11/08/2017 
Battery:   ID-1: BAT1 charge: 12.7 Wh condition: 43.4/48.9 Wh (89%) volts: 14.4/15.2 model: COMPAL PABAS0241231 
           serial: <filter> status: Discharging 
CPU:       Topology: Quad Core model: Intel Core i7-8550U bits: 64 type: MT MCP arch: Kaby Lake rev: A 
           L2 cache: 8192 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 32012 
           Speed: 799 MHz min/max: 400/1800 MHz Core speeds (MHz): 1: 800 2: 800 3: 791 4: 800 5: 800 6: 800 
           7: 800 8: 800 
Graphics:  Device-1: Intel UHD Graphics 620 vendor: Acer Incorporated ALI driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:5917 
           Device-2: NVIDIA GP108M [GeForce MX150] vendor: Acer Incorporated ALI driver: N/A bus ID: 01:00.0 
           chip ID: 10de:1d10 
           Display: x11 server: X.Org 1.20.7 driver: modesetting compositor: kwin_x11 resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel UHD Graphics 620 (Kabylake GT2) v: 4.6 Mesa 19.3.3 compat-v: 3.0 
           direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Acer Incorporated ALI driver: snd_hda_intel 
           v: kernel bus ID: 00:1f.3 chip ID: 8086:9d71 
           Device-2: Lenovo type: USB driver: hid-generic,snd-usb-audio,usbhid bus ID: 1-2.4.2.3:13 
           chip ID: 17ef:3063 
           Sound Server: ALSA v: k5.4.18-1-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Acer Incorporated ALI 
           driver: r8169 v: kernel port: 3000 bus ID: 02:00.1 chip ID: 10ec:8168 
           IF: enp2s0f1 state: down mac: <filter> 
           Device-2: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter vendor: Lite-On 
           driver: ath10k_pci v: kernel port: 3000 bus ID: 03:00.0 chip ID: 168c:0042 
           IF: wlp3s0 state: up mac: <filter> 
           Device-3: Lenovo type: USB driver: r8152 bus ID: 2-2.1:5 chip ID: 17ef:3062 
           IF: enp0s20f0u2u1 state: down mac: <filter> 
           IF-ID-1: docker0 state: down mac: <filter> 
Drives:    Local Storage: total: 238.47 GiB used: 109.38 GiB (45.9%) 
           ID-1: /dev/sda vendor: SK Hynix model: HFS256G39TND-N210A size: 238.47 GiB speed: 6.0 Gb/s 
           serial: <filter> 
Partition: ID-1: / size: 224.77 GiB used: 109.38 GiB (48.7%) fs: ext4 dev: /dev/sda2 
           ID-2: swap-1 size: 8.80 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda3 
Sensors:   System Temperatures: cpu: 54.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 246 Uptime: 19m Memory: 7.65 GiB used: 3.21 GiB (41.9%) Init: systemd v: 242 Compilers: 
           gcc: 9.2.0 Shell: zsh v: 5.7.1 running in: konsole inxi: 3.0.37 

# mhwd -li
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-440xx-prime            2019.10.25               false            PCI
╰> inxi -G
Graphics:  Device-1: Intel UHD Graphics 620 driver: i915 v: kernel 
           Device-2: NVIDIA GP108M [GeForce MX150] driver: nvidia v: 440.59 
           Display: x11 server: X.Org 1.20.7 driver: modesetting resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel UHD Graphics 620 (Kabylake GT2) v: 4.6 Mesa 19.3.3 

Things i have done (in order of least to most stupid:

  • tried running sudo mhwd -a pci 0300
  • uninstalled previous drivers 418xx as they are out of date for linux54 kernel
  • tried manually installing new drivers
  • regretted manually installing new drivers and removed everything from them
  • broke kde by trying to use automatic nvidia config tool

other things i have done:

  • uninstalled bumblebee
  • installed correct drivers using mhwd
  • removed automatic nvidia config files

I am not sure if what I am wanting to do is dumb or I should have just tried to do it wit bumblebee. If anyone can help it would be greatly appreciated as its never nice having lag as soon as i open up more than one application.

With those drivers you use:
prime-run application
if you want that that application to use the dGPU (nvidia).
For optimus-switch you must follow the exact instructions + since you are on KDE Plasma, you have to follow the SDDM step from those intructions.

And for optimus-manager those instructions.

Do not mix them!!!

1 Like

If you already havevideo-hybrid-intel-nvidia-440xx-prime then you are ready to switch to optimus-manager. Just ignore the point of disabling Bumblebee as you don't have it, which is good.

Nothing has really changed since then: Install drivers for Nvidia GeForce GTX 1050 without bumblebee

1 Like

Prime run does not appear to be working

╰> prime-run code
                                                                        
╰> nvidia-smi    
Thu Feb 20 09:27:14 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.59       Driver Version: 440.59       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce MX150       Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   46C    P0    N/A /  N/A |      0MiB /  2002MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

I also followed the optimus-manager tutorials including running https://github.com/dglt1/optimus-switch-sddm and the switch still didnt work.

╰> glxinfo | grep vendor
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: Intel Open Source Technology Center

when the laptop boots the asus logo flashes a few times as if its trying to use the integrated gpu but it wont load

running optimus-manager --swtich nvidia also still goes back to the intel gpu

You either use optimus-switch or optimus-manager ... not a mix of the two.

Clearly no nvidia module loaded. No matter what you gonna use, basic steps are:

  1. Uninstall all configs in except for video-linux or video-modesetting.
  2. Uninstall bumblebee primus and optimus-manager or optimus-switch.
  3. Check /etc/X11/xorg.conf.d for residual configs (90-mhwd.conf and 00-keyboard.conf are the only allowed there at this point).
  4. Proceed with an option (O-M, O-S, just MHWD's Prime) of your choice.

As others said, you should use only one method, optimus-switch or optimus-manager, so creating a clear base to install one of them is the first, common step.

If you decide to install and configure optimus-manager and the switch won't work, it's often some issue with DM. You need to check optimus-manager and your DM logs to find what is the culprit. The other reason might be the switcher, nouveau or bbswitch or maybe ACPI call. It all depends on hardware and the package setup.

For me nouveau works, but many notify issues with it and use bbswitch. Of course, you need to have bbswitch in the system in the first place. I saw many users trying to use bbswitch without having one. For some ACPI call may be enough and work the best.

There are many options to test and not all of them will produce good results. Although guides to optimus-switch and optimus-manager are straight forward, you are expected to configure them further if the need arise and match it for your hardware. For troubleshooting, looking through logs is crucial so you wouldn't attempt to fix things blindly.

Below I'm presenting some ways to obtain logs:

general boot info and potential problems:
journalctl -b -p3

optimus-manager logs:
journalctl -u optimus-manager.service

DM logs based on GDM (modify command for your DM):
journalctl -u gdm.service

Xorg log at:
/var/log/Xorg.xxx.log
or
~/.local/share/xorg/Xorg.xxx.log .

Kernel logs :
journalctl -k

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by