Unable to switch to nvidia video card
See original GitHub issueDescribe the bug
For some reason I’m unable to switch to the dedicated video card. After executing optimus-manager --switch nvidia
and re-logging in, when I run optimus-manager --status
I get this message:
ERROR: the latest GPU setup attempt failed at Xorg pre-start hook.
Log at /var/log/optimus-manager/switch/switch-20220605T194232.log
Cannot execute command because of previous errors.
This is the log mentioned in the error:
[5] INFO: # Xorg pre-start hook
[5] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': 'integrated'}
[5] INFO: Requested mode is: nvidia
[84] INFO: Available modules: ['nouveau', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[84] INFO: Unloading modules ['nouveau'] (if loaded)
[85] INFO: switching=none, nothing to do
[99] INFO: Resetting Nvidia PCI device
[99] INFO: Starting hot reset sequence
[124] INFO: Removing Nvidia from PCI bridge
[145] INFO: Writing "1" to /sys/bus/pci/devices/0000:01:00.0/remove
[147] INFO: Triggering PCI hot reset of bridge 00:01.0
[155] INFO: Rescanning PCI bus
[174] INFO: Setting Nvidia PCI power state to on
[193] INFO: Writing "on" to /sys/bus/pci/devices/0000:01:00.0/power/control
[211] INFO: Loading module nvidia
[368] ERROR: Xorg pre-start setup error
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 245, in _load_module
subprocess.check_call(
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'modprobe nvidia NVreg_UsePageAttributeTable=1 NVreg_DynamicPowerManagement=0x02' died with <Signals.SIGSEGV: 11>.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/optimus_manager/hooks/pre_xorg_start.py", line 51, in main
setup_kernel_state(config, prev_state, requested_mode)
File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 22, in setup_kernel_state
_nvidia_up(config, hybrid=(requested_mode == "hybrid"))
File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 95, in _nvidia_up
_load_nvidia_modules(config, available_modules)
File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 164, in _load_nvidia_modules
_load_module(available_modules, "nvidia", options=nvidia_options)
File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 249, in _load_module
raise KernelSetupError(f"Error running modprobe for {module}: {e.stderr}") from e
optimus_manager.kernel.KernelSetupError: Error running modprobe for nvidia: None
[369] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[369] INFO: Writing state {'type': 'pre_xorg_start_failed', 'switch_id': '20220605T194232', 'requested_mode': 'nvidia'}
System info
- Your distribution: Arch linux
- Your desktop manager: KDE
- You display manager: SDDM
- Your laptop model: Dell xps 15 (9510)
- The version of optimus-manager you are using : latest stable release (optimus-manager)
- Your custom optimus-manager configuration file
[amd]
DRI=3
driver=modesetting
tearfree=
[intel]
DRI=3
accel=
driver=intel
modeset=yes
tearfree=
[nvidia]
DPI=96
PAT=yes
allow_external_gpus=no
dynamic_power_management=fine
ignore_abi=no
modeset=yes
options=overclocking
[optimus]
auto_logout=yes
pci_power_control=yes
pci_remove=no
pci_reset=hot_reset
startup_auto_battery_mode=integrated
startup_auto_extpower_mode=nvidia
startup_mode=integrated
switching=none
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
Laptop, Cant switch between my intel gpu and nvidia gpu
SO i checked what gpu was using as display, and it was the intergrated gpu. How do you switch the intel gpu to...
Read more >[SOLVED] Laptop Not Using GPU – 2022 Tips - Driver Easy
Switch to the dedicated NVIDIA GPU: · Right-click your desktop background and select NVIDIA Control Panel from the menu. · In the left...
Read more >Switching to Your PC's Dedicated GPU (NVIDIA) | Ubisoft Help
One way to do this is by right-clicking on an empty space on the desktop and selecting NVIDIA control panel. 2. Navigate to...
Read more >Can't Switch To Nvidia Graphics Card - Tom's Guide Forum
I want to use my Nvidia GeForce GT 740M, but my HP Envy TouchSmart laptop keeps using my integrated graphics card, the Intel...
Read more >Unable to switch graphics to Nvidia On-Demand ... - Ask Ubuntu
This was the problem with the nvidia-drivers as I was using old drivers nvidia-driver-390 shipped by default with a new installation of ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Incidentally, I managed to fix the problem. I’m using a laptop with 11th intel generation, and I had a problem with virtualbox VMs. In a forum, a user suggest to add ibt=off as a kernel parameter, and this magically fixed also the problem with optimus manager 😅
Thank you for posting your solution it helped me out a bunch. Setting this kernel parameter is also documented in the Arch Wiki, it seems to effect only nvidia cards https://wiki.archlinux.org/title/NVIDIA#Installation