Nvidia Optimus Manager cant switch

I tried to switch with Optimus Manager but it seem like it cant switch to Nvidia
I got this log file

[9] INFO: # Xorg pre-start hook
[9] INFO: Previous state was: {‘type’: ‘pending_pre_xorg_start’, ‘requested_mode’: ‘nvidia’, ‘current_mode’: ‘integrated’}
[9] INFO: Requested mode is: nvidia
[94] INFO: Available modules: [‘nouveau’]
[94] INFO: Unloading modules [‘nouveau’] (if loaded)
[98] INFO: switching=none, nothing to do
[128] INFO: Loading module nvidia
[128] ERROR: Xorg pre-start setup error
Traceback (most recent call last):
File “/usr/lib/python3.9/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.9/site-packages/optimus_manager/kernel.py”, line 22, in setup_kernel_state
_nvidia_up(config, hybrid=(requested_mode == “hybrid”))
File “/usr/lib/python3.9/site-packages/optimus_manager/kernel.py”, line 95, in _nvidia_up
_load_nvidia_modules(config, available_modules)
File “/usr/lib/python3.9/site-packages/optimus_manager/kernel.py”, line 164, in _load_nvidia_modules
_load_module(available_modules, “nvidia”, options=nvidia_options)
File “/usr/lib/python3.9/site-packages/optimus_manager/kernel.py”, line 241, in _load_module
raise KernelSetupError(
optimus_manager.kernel.KernelSetupError: module nvidia is not available for current kernel. Is the corresponding package installed ?
[129] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[129] INFO: Writing state {‘type’: ‘pre_xorg_start_failed’, ‘switch_id’: ‘20210522T222332’, ‘requested_mode’: ‘nvidia’}

Kernel: 5.10.11-zen2-1-zen x86_64 bits: 64 compiler: gcc v: 10.2.0  
parameters: BOOT_IMAGE=/boot/vmlinuz-linux-zen  
root=UUID=86f158a6-5101-4d61-9e80-b244eabef395 ro quiet apparmor=1
security=apparmor udev.log_priority=3
Desktop: KDE Plasma 5.21.5 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM  
Distro: Manjaro Linux base: Arch Linux  
Type: Laptop System: LENOVO product: 20378 v: Lenovo Y50-70 serial: <filter>  
Chassis: type: 10 v: Lenovo Y50-70 serial: <filter>  
Mobo: LENOVO model: Lenovo Y50-70 v: 31900058WIN serial: <filter>  
UEFI-[Legacy]: LENOVO v: 9ECN43WW(V3.03) date: 08/12/2015  
ID-1: BAT1 charge: 41.2 Wh (100.0%) condition: 41.2/54.8 Wh (75.2%)  
volts: 8.1 min: 7.4 model: LENOVO PABAS0241231 type: Li-ion serial: <filter>  
status: Full  
RAM: total: 7.68 GiB used: 3.42 GiB (44.5%)  
RAM Report: permissions: Unable to run dmidecode. Root privileges required.  
Info: Dual Core model: Intel Core i5-4210H bits: 64 type: MT MCP                                                   
arch: Haswell family: 6 model-id: 3C (60) stepping: 3 microcode: 28 cache:                                         
L2: 3 MiB bogomips: 23148  
Speed: 1157 MHz min/max: 800/3500 MHz Core speeds (MHz): 1: 1157 2: 1130  
3: 1224 4: 1142  
Flags: abm acpi aes aperfmperf apic arat arch_perfmon avx avx2 bmi1 bmi2 bts  
clflush cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm
dts epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu fsgsbase
fxsr ht ibpb ibrs ida invpcid invpcid_single lahf_lm lm mca mce md_clear mmx
monitor movbe msr mtrr nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm
pdpe1gb pebs pge pln pni popcnt pse pse36 pti pts rdrand rdtscp rep_good
sdbg sep smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2
tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx vnmi vpid x2apic xsave
xsaveopt xtopology xtpr
Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled  
Type: l1tf  
mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable  
Type: mds mitigation: Clear CPU buffers; SMT vulnerable  
Type: meltdown mitigation: PTI  
Type: spec_store_bypass  
mitigation: Speculative Store Bypass disabled via prctl and seccomp  
Type: spectre_v1  
mitigation: usercopy/swapgs barriers and __user pointer sanitization  
Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,  
IBRS_FW, STIBP: conditional, RSB filling
Type: srbds mitigation: Microcode  
Type: tsx_async_abort status: Not affected  
Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: Lenovo  
driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:0416 class-ID: 0300  
Device-2: NVIDIA GM107M [GeForce GTX 960M] vendor: Lenovo driver: N/A  
alternate: nouveau bus-ID: 01:00.0 chip-ID: 10de:139b class-ID: 0302                                               
Device-3: Acer Lenovo EasyCamera type: USB driver: uvcvideo bus-ID: 3-6:4  
chip-ID: 5986:055e class-ID: 0e02 serial: <filter>  
Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver:                                                    
loaded: modesetting alternate: fbdev,intel,vesa display-ID: :0 screens: 1                                          
Screen-1: 0 s-res: 3840x1080 s-dpi: 96 s-size: 1016x285mm (40.0x11.2")  
s-diag: 1055mm (41.5")  
Monitor-1: eDP-1 res: 1920x1080 hz: 60 dpi: 142 size: 344x193mm (13.5x7.6")  
diag: 394mm (15.5")  
Monitor-2: HDMI-1 res: 1920x1080 hz: 60 dpi: 94 size: 521x293mm (20.5x11.5")  
diag: 598mm (23.5")  
OpenGL: renderer: Mesa DRI Intel HD Graphics 4600 (HSW GT2)  
v: 4.5 Mesa 21.0.3 compat-v: 3.0 direct render: Yes  
Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio  
vendor: Lenovo driver: snd_hda_intel v: kernel bus-ID: 00:03.0  
chip-ID: 8086:0c0c class-ID: 0403  
Device-2: Intel 8 Series/C220 Series High Definition Audio vendor: Lenovo  
driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8c20  
class-ID: 0403  
Sound Server-1: ALSA v: k5.10.11-zen2-1-zen running: yes  
Sound Server-2: JACK v: 0.125.0 running: no  
Sound Server-3: PulseAudio v: 14.2 running: yes  
Sound Server-4: PipeWire v: 0.3.28 running: yes  
Device-1: Intel Wireless 3160 driver: iwlwifi v: kernel port: 4000                                                 
bus-ID: 08:00.0 chip-ID: 8086:08b4 class-ID: 0280  
IF: wlp8s0 state: up mac: <filter>  
IP v4: <filter> type: dynamic noprefixroute scope: global  
broadcast: <filter>  
IP v6: <filter> type: noprefixroute scope: link  
Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet  
vendor: Lenovo driver: r8169 v: kernel port: 3000 bus-ID: 09:00.0                                                  
chip-ID: 10ec:8168 class-ID: 0200  
IF: enp9s0 state: down mac: <filter>  
WAN IP: <filter>  
Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8                                        
bus-ID: 3-7:5 chip-ID: 8087:07dc class-ID: e001  
Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends  
Message: No logical block device data found.  
Message: No RAID data found.  
Local Storage: total: 1.14 TiB used: 139.97 GiB (12.0%)  
SMART Message: Unable to run smartctl. Root privileges required.  
ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: MZ7TE256HMHP-000L2  
size: 238.47 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s  
rotation: SSD serial: <filter> rev: 6L0Q scheme: MBR  
ID-2: /dev/sdb maj-min: 8:16 type: USB vendor: Seagate model: BUP Slim SL                                          
size: 931.51 GiB block-size: physical: 4096 B logical: 512 B  
serial: <filter> rev: 0304 scheme: GPT  
Message: No optical or floppy data found.  
ID-1: / raw-size: 179.87 GiB size: 176.05 GiB (97.87%)  
used: 84.5 GiB (48.0%) fs: ext4 dev: /dev/sda3 maj-min: 8:3 label: N/A  
uuid: 86f158a6-5101-4d61-9e80-b244eabef395  
ID-2: /run/media/henrymkn/F8125AE1125AA502 raw-size: 58.54 GiB  
size: 58.54 GiB (100.00%) used: 55.47 GiB (94.7%) fs: ntfs dev: /dev/sda2  
maj-min: 8:2 label: N/A uuid: F8125AE1125AA502  
Alert: No swap data was found.  
ID-1: /dev/sda1 maj-min: 8:1 size: 50 MiB fs: ntfs label: System Reserved                                          
uuid: 5886528E86526C8E  
ID-2: /dev/sdb1 maj-min: 8:17 size: 931.51 GiB fs: ntfs label: Nytt volum                                          
uuid: 361EAA641EAA1D3D  
Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0                                                      
speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900  
Hub-2: 1-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0                                            
speed: 480 Mb/s chip-ID: 8087:8008 class-ID: 0900  
Hub-3: 2-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0                                                      
speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900  
Hub-4: 2-1:2 info: Intel Integrated Rate Matching Hub ports: 8 rev: 2.0                                            
speed: 480 Mb/s chip-ID: 8087:8000 class-ID: 0900  
Hub-5: 3-0:1 info: Full speed (or root) Hub ports: 14 rev: 2.0                                                     
speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900  
Device-1: 3-1:2 info: Corsair STRAFE RGB Gaming Keyboard type: Keyboard,HID  
driver: hid-generic,usbhid interfaces: 3 rev: 2.0 speed: 12 Mb/s  
power: 500mA chip-ID: 1b1c:1b20 class-ID: 0300 serial: <filter>  
Device-2: 3-2:3 info: Seagate RSS LLC Backup Plus Portable Drive  
type: Mass Storage driver: uas interfaces: 1 rev: 2.1 speed: 480 Mb/s                                              
power: 100mA chip-ID: 0bc2:ab24 class-ID: 0806 serial: <filter>  
Device-3: 3-6:4 info: Acer Lenovo EasyCamera type: Video driver: uvcvideo  
interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 5986:055e                                             
class-ID: 0e02 serial: <filter>  
Device-4: 3-7:5 info: Intel Bluetooth wireless interface type: Bluetooth  
driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA                                                   
chip-ID: 8087:07dc class-ID: e001  
Hub-6: 3-9:6 info: Super Top 4-Port hub ports: 4 rev: 2.0 speed: 480 Mb/s  
power: 100mA chip-ID: 14cd:8601 class-ID: 0900  
Device-1: 3-9.1:7 info: Nintendo Wii U GameCube Controller Adapter type: HID  
driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 12 Mb/s  
power: 500mA chip-ID: 057e:0337 class-ID: 0300 serial: <filter>  
Device-2: 3-9.4:8 info: SteelSeries ApS SteelSeries Rival 300 Gaming Mouse  
type: HID,Mouse driver: hid-generic,usbhid interfaces: 3 rev: 1.1  
speed: 12 Mb/s power: 200mA chip-ID: 1038:1710 class-ID: 0300  
Hub-7: 4-0:1 info: Full speed (or root) Hub ports: 6 rev: 3.0 speed: 5 Gb/s                                        
chip-ID: 1d6b:0003 class-ID: 0900  
System Temperatures: cpu: 63.0 C mobo: N/A  
Fan Speeds (RPM): N/A  
Processes: 213 Uptime: 39m wakeups: 1 Init: systemd v: 247 tool: systemctl  
Compilers: gcc: 10.2.0 clang: 11.1.0 Packages: 1410 pacman: 1407 lib: 466                                          
flatpak: 0 snap: 3 Shell: Bash v: 5.1.8 running-in: konsole inxi: 3.3.04```

Hello and welcome to the formum. I am not very good at solving errors like that. But I know the people that can help will want a little more information, and you can read about how to provide that info in this link here: How to provide good information

At the bottom of the log I see this:

optimus_manager.kernel.KernelSetupError: module nvidia is not available for current kernel. Is the corresponding package installed 

so you can at least check if Nvidia is properly installed, to do that, open up a terminal and put in

pamac list | grep nv

That should get people with more knowledge than I do with a place where to start solving your issue.

mostly I have


Mine looks like this

convertlit                         1.8-10                      extra      143,6 kB
double-conversion                  3.1.5-2                     extra      172,6 kB
gwenview                           21.04.1-1                   extra      10,6 MB
konversation                       21.04.1-1                   extra      14,8 MB
kunitconversion                    5.82.0-1                    extra      10,8 MB
lib32-nvidia-utils                 465.31-1                    multilib   113,5 MB
linux510-nvidia                    465.31-2                    extra      26,9 MB
linux512-nvidia                    465.31-2                    extra      26,9 MB
mhwd-nvidia                        465.31-1                    core       1,7 kB
mhwd-nvidia-390xx                  390.143-1                   core       1,9 kB
networkmanager-openvpn             1.8.14-1                    extra      1,3 MB
nvidia-prime                       1.0-4                       extra      112 bæti
nvidia-utils                       465.31-1                    extra      412,2 MB
opencl-nvidia                      465.31-1                    extra      77,0 MB
openvdb                            8.0.1-4                     community  100,7 MB
openvpn                            2.5.2-1                     extra      1,6 MB

But like I said, I am not an expert. I am also running kernel 5.12
Which optimus-manager are you using, are you using the one from Manjaro repo or from AUR?

I am using from Manjaro repo
the only thing missing is


Might be the culprit.

it didnt fix it
but I get this error

WARNING : no power management option is currently enabled (this is the default since v1.2). Switching between GPUs will work but you will likely experience poor battery life.
Follow instructions at https://github.com/Askannz/optimus-manager/wiki/A-guide--to-power-management-options to enable power management.

modinfo: ERROR: Module nvidia not found.
WARNING : the nvidia module does not seem to be available for the current kernel. It is likely the Nvidia driver was not properly installed. GPU switching will probably fail,
 continue anyway ? (y/N)

I do think I installed Nvidia driver properly

Oh I fixed by switching kernals

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.