I’ve tried to switch to hybrid mode using optimus-manager and after relogging i’ve got following error about optimus-manager:
> optimus-manager
ERROR: the latest GPU setup attempt failed at Xorg pre-start hook.
Log at /var/log/optimus-manager/switch/switch-20221115T153215.log
Cannot execute command because of previous errors.
> cat /var/log/optimus-manager/switch/switch-20221115T153215.log
[6] INFO: # Xorg pre-start hook
[6] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'hybrid', 'current_mode': 'integrated'}
[6] INFO: Requested mode is: hybrid
[24] INFO: Available modules: ['nouveau', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[24] INFO: Unloading modules ['nouveau'] (if loaded)
[26] INFO: switching=none, nothing to do
[1344] INFO: Setting Nvidia PCI power state to auto
[1354] INFO: Writing "auto" to /sys/bus/pci/devices/0000:01:00.0/power/control
[1354] INFO: Writing "auto" to /sys/bus/pci/devices/0000:01:00.1/power/control
[1373] INFO: Loading module nvidia
[3658] 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' returned non-zero exit status 1.
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
[3660] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[3660] INFO: Writing state {'type': 'pre_xorg_start_failed', 'switch_id': '20221115T153215', 'requested_mode': 'hybrid'}
I’ve updated kernel to 6.0.8-1-MANJARO and still have the same problem. After reboot it’s still integrated mode.
[6] INFO: # Xorg pre-start hook
[6] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'hybrid', 'current_mode': 'integrated'}
[6] INFO: Requested mode is: hybrid
[24] INFO: Available modules: ['nouveau', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[24] INFO: Unloading modules ['nouveau'] (if loaded)
[27] INFO: switching=none, nothing to do
[1357] INFO: Setting Nvidia PCI power state to auto
[1368] INFO: Writing "auto" to /sys/bus/pci/devices/0000:01:00.0/power/control
[1368] INFO: Writing "auto" to /sys/bus/pci/devices/0000:01:00.1/power/control
[1371] INFO: Loading module nvidia
[3870] 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' returned non-zero exit status 1.
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
[3871] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[3871] INFO: Writing state {'type': 'pre_xorg_start_failed', 'switch_id': '20221116T211529', 'requested_mode': 'hybrid'}
sudo modprobe --verbose nvidia NVreg_UsePageAttributeTable=1 NVreg_DynamicPowerManagement=0x02
insmod /lib/modules/6.0.8-1-MANJARO/extramodules/nvidia.ko.xz "NVreg_DynamicPowerManagement=0x02" NVreg_UsePageAttributeTable=1 NVreg_DynamicPowerManagement=0x02
modprobe: ERROR: could not insert 'nvidia': No such device
Here is also result of inxi -Gazy, because i saw that nvidia wasn’t founded.
does it happens also with the 5.15 kernel?
if yes add this parameter: kate /etc/default/grub
and in this line: GRUB_CMDLINE_LINUX_DEFAULT inside the quotes add this parameter: ibt=off
dont remove anything from there!, just add it to existing parameters, save the file, update grub: sudo update-grub
reboot and try
if it doesnt work, post output from: pacman -Qs 'optimus|bbswitch|bumblebee' ls /etc/modprobe.d find /etc/X11/ -name "*.conf"
> pacman -Qs 'optimus|bbswitch|bumblebee'
local/optimus-manager 1.4+r12-2
Management utility to handle GPU switching for Optimus laptops (Git version)
local/optimus-manager-qt 1.6.9-1
A Qt interface for Optimus Manager that allows to configure and switch GPUs on Optimus laptops using the tray
menu
> ls /etc/modprobe.d
mhwd-gpu.conf
> find /etc/X11/ -name "*.conf"
/etc/X11/mhwd.d/nvidia.conf
/etc/X11/xorg.conf.d/00-keyboard.conf
/etc/X11/xorg.conf.d/30-touchpad.conf
did you added the parameter?
if yes, uninstall optimus: pamac remove optimus-manager optimus-manager-qt
reboot and check if the nvidia is detected: inxi -G
> pacman -Qs 'envycontrol|prim|ahci'
local/libplacebo 4.208.0-1
Reusable library for GPU-accelerated video/image rendering primitives
local/nvidia-prime 1.0-4
NVIDIA Prime Render Offload configuration and utilities
local/python-cryptography 38.0.3-1
A package designed to expose cryptographic recipes and primitives to Python developers
local/xorg-xrandr 1.5.1-2 (xorg-apps xorg)
Primitive command line interface to RandR extension
> pacman -Qs 'envycontrol|prim|acpi'
local/acpi 1.7-3
Client for battery, power, and thermal readings
local/acpid 2.0.34-1
A daemon for delivering ACPI power management events with netlink support
local/libplacebo 4.208.0-1
Reusable library for GPU-accelerated video/image rendering primitives
local/nvidia-prime 1.0-4
NVIDIA Prime Render Offload configuration and utilities
local/python-cryptography 38.0.3-1
A package designed to expose cryptographic recipes and primitives to Python developers
local/xorg-xrandr 1.5.1-2 (xorg-apps xorg)
Primitive command line interface to RandR extension