Skip to content

Can't get my NVIDIA card to work with optimus-manager nor without it

Not downloaded yet

Disclaimer: I've been trying to get this to work for a week and I'm not a native English speaker so bear with me.

Problem

When I boot up to intel mode it works fine, but when I try switching to nvidia and run status to check my current GPU, here's what I see

ERROR: the active card is "intel" but it should be "nvidia".
Something went wrong during the last GPU setup...
Log at /var/log/optimus-manager/switch/switch-20200915T234758.log
Cannot execute command because of previous errors.

Specs

I have a ASUSX555LN:

  • i5-4210U(Intel® HD Graphics 4400)
  • GeForce 840M
  • Arch Linux
  • Xorg with lxdm and Openbox
  • optimus-manager 1.3.1
  • nvidia proprietary driver 450.66-21 from the extra repo

What I tried

  • Different switching modes (bbswitch, custom, none)
  • Adding modules to mkinitcpio and generating intiramfs image
  • Reinstalling nvidia, optimus-manager, regenerating intiramfs image
  • Adding prime-offload to /etc/lxdm/PreLogin

#!/bin/sh
/usr/bin/prime-offload

  • Adding prime-switch to /etc/lxdm/PostLogout

#!/bin/sh
sudo su
/usr/bin/prime-switch

  • Adding a kernel parameter nvidia-drm.modeset=1
  • Setting modeset to no in the [intel] and [nvidia] sections
  • Changing the driver name in [intel] from modesetting to intel
  • Changing the DRI versions in [intel] from 3 to 2
  • Opened a github issue on optimus-manager
  • Hitting my keyboard a couple of times

Logs, configs and some outputs

/etc/mkinitcpio.conf

MODULES=(i915? nvidia? nvidia_modeset? nvidia_uvm? nvidia_drm?)

/etc/optimus-manager/optimus-manager.conf

[optimus]
switching=custom
pci_power_control=no
pci_remove=no
pci_reset=no
auto_logout=yes
startup_mode=intel
startup_auto_battery_mode=intel
startup_auto_extpower_mode=nvidia
[intel]
driver=modesetting
accel=
tearfree=
DRI=3
modeset=yes
[nvidia]
modeset=yes
PAT=yes
DPI=96
ignore_abi=no
allow_external_gpus=no
options=overclocking

/var/log/optimus-manager/switch/switch-20200916T143229.log

[13] INFO: # Xorg pre-start hook
[12] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_m ode': 'intel'}
[12] INFO: Requested mode is: nvidia
[12] INFO: Checking for GDM display servers
[1078] INFO: Available modules: ['nouveau', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[1078] INFO: Unloading modules ['nouveau'] (if loaded)
[1083] INFO: Running custom power switching script /etc/optimus-manager/nvidia-enable.sh
[1129] INFO: Loading module nvidia
[2013] INFO: Loading module nvidia_drm
[2411] INFO: Loaded extra Intel Xorg options (0 lines)
[2412] INFO: Loaded extra Intel Xorg options (0 lines)
[2412] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[2412] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20200916T143229', 'requeste d_mode': 'nvidia'}
[2412] INFO: Xorg pre-start hook completed successfully.
[6] INFO: # Xorg post-start hook
[6] INFO: Running xrandr commands
[12] ERROR: Cannot setup PRIME : Failed to execute 'xrandr --setprovideroutputsource modesetting NVIDIA-0' :Could not find provider with name NVIDIA-0
[13] INFO: Running /etc/optimus-manager/xsetup-nvidia.sh
[31] INFO: Writing state {'type': 'done', 'switch_id': '20200916T143229', 'current_mode': 'nvidia'}
[32] INFO: Xorg post-start hook completed successfully.

nvidia-smi

https://i.imgur.com/rMPPkil.png

xrandr --listproviders

Providers: number : 2
Provider 0: id: 0x45 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 3 associated providers: 0 name:modesetting
Provider 1: id: 0x1e3 cap: 0x0 crtcs: 0 outputs: 0 associated providers: 0 name:modesetting

P.S: I won't reinstall Linux as a solution

Edited 16 Sep 2020. We only hold this version.

4 points13 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
4 · 100% up
Kind
Image
ID
ituvzr

Author

1
posts
8
comments
1
media
View profile

13 comments

It tells you what the error is:

[12] ERROR: Cannot setup PRIME : Failed to execute 'xrandr --setprovideroutputsource modesetting NVIDIA- 0' :Could not find provider with name NVIDIA-0

I'm not sure where it's getting "NVIDIA- 0" from, but there shouldn't be a space in "- 0", it could be that NVIDIA-0 is wrong anyway even without the space, (I don't play with Prime), but that's what the error says.

1 points

It was my formatting issue when I copied the log from vim there was a new line, so there's no space after -

1 points

I've got the same laptop (almost the same, ASUS K551L). I don't use optimus-manager, but nvidia-xrun with bbswitch... maybe you could give it a try, but previously you have to delete all the configuration files optimus-manager did set up.

If you need help with setting that up, I can post here my nvidia-xrun related configs, but if I remember correctly I didn't do much, just installed nvidia-xrun from AUR

1 points

If I won't find a solution, I'll probably switch and try nvidia-prime by itself, maybe nvidia-xrun or bumblebee. So do post your configs if it doesn't work out I'll use them in the future.

1 points

Ditch bumblebee completely, it doesn't support Vulkan.

Anyway: /etc/X11/nvidia-xorg.conf

Section "Files"
    ModulePath "/usr/lib/nvidia"
    ModulePath "/usr/lib32/nvidia"
    ModulePath "/usr/lib32/nvidia/xorg/modules"
    ModulePath "/usr/lib32/xorg/modules"
    ModulePath "/usr/lib64/nvidia/xorg/modules"
    ModulePath "/usr/lib64/xorg/modules"
EndSection

Section "ServerLayout"
    Identifier "layout"
    Screen 1 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
     Identifier "nvidia"
     Driver "nvidia"
     BusID "PCI:4:0:0"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    #  Option "AllowEmptyInitialConfiguration" "Yes"
    #  Option "UseDisplayDevice" "none"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    Option "AccelMethod" "none"
EndSection

Section "Screen"
    Identifier "intel"  
    Device "intel"
EndSection

/usr/lib/modprobe.d/nvidia-xrun.conf

blacklist nvidia
blacklist nvidia-drm
blacklist nvidia-modeset
blacklist nvidia-uvm
blacklist nouveau

There shouldn't be other config files.

2 points

That provider list makes no sense. What's in your xorg log, xorg configuration? What are those question marks in your hooks line?

In general the more you try and don't clean up afterwards/don't know the implications of how the multiple options interplay with each other the worse you make it in actually identifying what's the real culprit and the harder you are making it to get to a proper configuration.

We can try to untangle what's wrong here, though I'd personally suggest you remove optimus manager and all configuration files it/you created and start with a clean slate/the defaults.

1 points

Xorg log

xorg configuration is nothing special

01-keyboard-layout.conf

Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us,lt"
Option "XkbOptions" "grp:alt_shift_toggle"
EndSection

auto generated 10-optimus-manager.conf

Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0:2:0"
Option "DRI" "2"
EndSection

Question marks are suffixed at the end of modules to not throw errors if they are not found.

1 points

I had a i5 4210H+GTX 860M laptop (Lenovo Y50), and on a fresh install, I just install nvidia-dkms driver, optimus-manager and optimus-manager-qt. Use the optimus-manager-qt to switch between graphic cards and it will generate xorg.conf automatically for you. Give it a try.

1 points

Basically I uninstalled optimus-manager and settled for offloading with prime-run, thanks for the help, case closed.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.