Can't get my NVIDIA card to work with optimus-manager nor without it
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
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.
About this post
- Posted
- Archived
- Edited
- Score
- 4 · 100% up
- Kind
- Image
- ID
- ituvzr
13 comments
It tells you what the error is:
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.
It was my formatting issue when I copied the log from vim there was a new line, so there's no space after -
Are you sure it's NVIDIA-0?
What's the output of
xrandr --listproviders?On my machine it's 'NVIDIA-G0'
I've got the same laptop (almost the same, ASUS K551L). I don't use
optimus-manager, butnvidia-xrunwithbbswitch... 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-xrunrelated configs, but if I remember correctly I didn't do much, just installednvidia-xrunfrom AURIf 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.
Ditch
bumblebeecompletely, it doesn't support Vulkan.Anyway:
/etc/X11/nvidia-xorg.conf/usr/lib/modprobe.d/nvidia-xrun.confThere shouldn't be other config files.
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.
Xorg log
xorg configuration is nothing special
auto generated 10-optimus-manager.conf
Question marks are suffixed at the end of modules to not throw errors if they are not found.
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.
Basically I uninstalled optimus-manager and settled for offloading with prime-run, thanks for the help, case closed.