Failed to execute 'xrandr --setprovideroutputsource modesetting NVIDIA-0'
when switching from intel to nvidia, optimus-manager --status says ERROR: the active card is "intel" but it should be "nvidia"..
System info
- ArchLinux
- bspwm
- emptty (using startup script similar to xinitrc)
- optimus-manager 1.3.1
/etc/optimus-manager/optimus-manager.conf:
[intel]
DRI=3
accel=
driver=intel
modeset=yes
tearfree=
[nvidia]
DPI=96
PAT=yes
allow_external_gpus=no
ignore_abi=yes
modeset=yes
options=overclocking, triple_buffer
[optimus]
auto_logout=yes
pci_power_control=no
pci_remove=no
pci_reset=no
startup_auto_battery_mode=intel
startup_auto_extpower_mode=nvidia
startup_mode=intel
switching=bbswitch
Logs
optimus-manager --status:
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-20200915T113742.log
Cannot execute command because of previous errors.
/var/log/optimus-manager/switch/switch-20200915T113742.log:
[9] INFO: # Xorg pre-start hook
[9] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': 'intel'}
[9] INFO: Requested mode is: nvidia
[9] INFO: Checking for GDM display servers
[812] INFO: Available modules: ['nouveau', 'bbswitch', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[812] INFO: Unloading modules ['nouveau'] (if loaded)
[816] INFO: Loading module bbswitch
[820] INFO: Setting GPU power to ON via bbswitch
[925] INFO: Loading module nvidia
[1687] INFO: Loading module nvidia_drm
[2165] INFO: Loaded extra Intel Xorg options (0 lines)
[2165] INFO: Loaded extra Intel Xorg options (0 lines)
[2165] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[2165] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20200915T113742', 'requested_mode': 'nvidia'}
[2166] INFO: Xorg pre-start hook completed successfully.
[5] INFO: # Xorg post-start hook
[5] INFO: Running xrandr commands
[10] ERROR: Cannot setup PRIME : Failed to execute 'xrandr --setprovideroutputsource modesetting NVIDIA-0' :
Could not find provider with name NVIDIA-0
[10] INFO: Running /etc/optimus-manager/xsetup-nvidia.sh
[22] INFO: Writing state {'type': 'done', 'switch_id': '20200915T113742', 'current_mode': 'nvidia'}
[22] INFO: Xorg post-start hook completed successfully.
xrandr --listproviders:
Provider 0: id: 0x46 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 4 outputs: 3 associated providers: 0 name:Intel
Provider 1: id: 0x203 cap: 0x0 crtcs: 0 outputs: 0 associated providers: 0 name:modesetting
- Does
lsmodshot thenvidiamodule loaded ? - Does it work if you boot directly into Nvidia mode ?
- Does it work if you set
switching=nonein the config file ?
Not the OP but have a very similar issue.
`
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-20201026T145526.log
Cannot execute command because of previous errors.
~ >>> cat /var/log/optimus-manager/switch/switch-20201026T145526.log [1]
[12] INFO: # Xorg pre-start hook
[12] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': None}
[12] INFO: Requested mode is: nvidia
[12] INFO: Checking for GDM display servers
[912] INFO: Available modules: ['nouveau', 'acpi_call', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[912] INFO: Unloading modules ['nouveau'] (if loaded)
[937] INFO: Loading module nvidia
[1768] INFO: Loading module nvidia_drm
[3952] INFO: Loaded extra Intel Xorg options (0 lines)
[3953] INFO: Loaded extra Intel Xorg options (0 lines)
[3953] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[3953] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20201026T145526', 'requested_mode': 'nvidia'}
[3953] INFO: Xorg pre-start hook completed successfully.
[4] INFO: # Xorg post-start hook
[4] INFO: Running xrandr commands
[8] ERROR: Cannot setup PRIME : Failed to execute 'xrandr --setprovideroutputsource modesetting NVIDIA-0' :
Could not find provider with name NVIDIA-0
[8] INFO: Running /etc/optimus-manager/xsetup-nvidia.sh
[14] INFO: Writing state {'type': 'done', 'switch_id': '20201026T145526', 'current_mode': 'nvidia'}
[14] INFO: Xorg post-start hook completed successfully.
xrandr --listproviders
Provider 0: id: 0x43 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 1 associated providers: 1 name:modesetting
Provider 1: id: 0x23d cap: 0x2, Sink Output crtcs: 4 outputs: 3 associated providers: 1 name:NVIDIA-G0
lsmod |grep nvidia
nvidia_drm 61440 2
nvidia_modeset 1216512 3 nvidia_drm
nvidia 27713536 104 nvidia_modeset
drm_kms_helper 282624 2 nvidia_drm,i915
drm 643072 9 drm_kms_helper,nvidia_drm,i915
Doesn't boot into Nvidia.
Doesn't work with switching = none
nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.28 Driver Version: 455.28 CUDA Version: 11.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce GTX 165... Off | 00000000:01:00.0 On | N/A |
| N/A 43C P5 8W / N/A | 70MiB / 3911MiB | 23% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1482 G /usr/lib/Xorg 69MiB |
+-----------------------------------------------------------------------------+
@rross101 restart in hybrid or intel mode and try switching over. If nothing changes grep dmesg for messages about the nvidia module and show the relevant commands and output.
Greetings, I have the similar problem. Hybrid and Intel only modes work fine. The nvidia mode doesn't work when I try to switch from one of those modes to nvidia I get the following .log:
[7] INFO: # Xorg pre-start hook
[8] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': 'hybrid'}
[8] INFO: Requested mode is: nvidia
[8] INFO: Checking for GDM display servers
[1490] INFO: Loaded extra Intel Xorg options (0 lines)
[1490] INFO: Loaded extra Intel Xorg options (0 lines)
[1491] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[1491] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20210120T170946', 'requested_mode': 'nvidia'}
[1491] INFO: Xorg pre-start hook completed successfully.
X.Org X Server 1.20.10
X Protocol Version 11, Revision 0
Build Operating System: Linux Arch Linux
Current Operating System: Linux flagship 5.10.7-arch1-1 #1 SMP PREEMPT Wed, 13 Jan 2021 12:02:01 +0000 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=1df74bc3-a831-40b9-a469-f7ba330744e1 rw net.ifnames=0 loglevel=3 quiet
Build Date: 14 December 2020 12:10:29PM
Current version of pixman: 0.40.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/username/.local/share/xorg/Xorg.0.log", Time: Wed Jan 20 17:09:47 2021
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
(II) modeset(G0): Initializing kms color map for depth 24, 8 bpc.
Could not find provider with name NVIDIA-G0
[4] INFO: # Xorg post-start hook
[4] INFO: Running xrandr commands
[12] INFO: Running /etc/optimus-manager/xsetup-nvidia.sh
[26] INFO: Writing state {'type': 'done', 'switch_id': '20210120T170946', 'current_mode': 'nvidia'}
[26] INFO: Xorg post-start hook completed successfully.
dropbox: locating interpreter
dropbox: logging to /tmp/dropbox-antifreeze-Jd4BOo
dropbox: initializing
dropbox: initializing python 3.7.9
dropbox: setting program path '/opt/dropbox/dropbox'
dropbox: setting python path '/opt/dropbox:/opt/dropbox/python-packages.zip'
dropbox: python initialized
dropbox: running dropbox
dropbox: setting args
dropbox: enabling allocator metrics
dropbox: applying overrides
Can't update tray state: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
dropbox: running main script
dropbox: load fq extension '/opt/dropbox/cryptography.hazmat.bindings._constant_time.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/cryptography.hazmat.bindings._openssl.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/cryptography.hazmat.bindings._padding.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/psutil._psutil_linux.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/psutil._psutil_posix.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/apex._apex.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/tornado.speedups.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/wrapt._wrappers.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/PyQt5.QtWidgets.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/PyQt5.QtCore.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/opt/dropbox/PyQt5.QtGui.cpython-37m-x86_64-linux-gnu.so'
Can't update tray state: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
dropbox: locating interpreter
dropbox: logging to /tmp/dropbox-antifreeze-qVZSRs
dropbox: initializing
dropbox: initializing python 3.7.9
dropbox: setting program path '/home/username/.dropbox-dist/dropbox-lnx.x86_64-113.4.507/dropbox'
dropbox: setting python path '/home/username/.dropbox-dist/dropbox-lnx.x86_64-113.4.507:/home/username/.dropbox-dist/dropbox-lnx.x86_64-113.4.507/python-packages.zip'
dropbox: python initialized
dropbox: running dropbox
dropbox: setting args
dropbox: enabling allocator metrics
dropbox: applying overrides
dropbox: running main script
dropbox: load fq extension '/home/username/.dropbox-dist/dropbox-lnx.x86_64-113.4.507/cryptography.hazmat.bindings._constant_time.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/username/.dropbox-dist/dropbox-lnx.x86_64-113.4.507/cryptography.hazmat.bindings._openssl.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/username/.dropbox-dist/dropbox-lnx.x86_64-113.4.507/cryptography.hazmat.bindings._padding.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/username/.dropbox-dist/dropbox-lnx.x86_64-113.4.507/psutil._psutil_linux.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/username/.dropbox-dist/dropbox-lnx.x86_64-113.4.507/psutil._psutil_posix.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/username/.dropbox-dist/dropbox-lnx.x86_64-113.4.507/apex._apex.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/username/.dropbox-dist/dropbox-lnx.x86_64-113.4.507/tornado.speedups.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/username/.dropbox-dist/dropbox-lnx.x86_64-113.4.507/wrapt._wrappers.cpython-37m-x86_64-linux-gnu.so'
Can't update tray state: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }
dropbox: load fq extension '/home/username/.dropbox-dist/dropbox-lnx.x86_64-113.4.507/PyQt5.QtWidgets.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/username/.dropbox-dist/dropbox-lnx.x86_64-113.4.507/PyQt5.QtCore.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/username/.dropbox-dist/dropbox-lnx.x86_64-113.4.507/PyQt5.QtGui.cpython-37m-x86_64-linux-gnu.so'
dropbox: load fq extension '/home/username/.dropbox-dist/dropbox-lnx.x86_64-113.4.507/PyQt5.QtDBus.cpython-37m-x86_64-linux-gnu.so'
xrandr --listproviders gives the following results
Providers: number : 2
Provider 0: id: 0x43 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 1 associated providers: 1 name:modesetting
Provider 1: id: 0x2b5 cap: 0x2, Sink Output crtcs: 4 outputs: 5 associated providers: 1 name:NVIDIA-G0
dmesg gives
(Lenovo Thinkpad P15 Gen 1 with NVIDIA Quadro T2000 and Intel i7-10750H)
Edit @Askannz should I open a new separate ticket/issue?
Sup folks. This case is 3+ years old, and a lot has changed(kernel, nvidia drivers and optimus-manager).
Please keep track of the optimus-manager-git package.
Cheers.