Optimus manager doesn't works after update

Hi, I have a problem with optimus-manager and optimus-manager-qt. Both of these programs worked perfectly before last update of kernel. When I just type optimus manager I have this error:

ERROR: the latest GPU setup attempt failed at Xorg pre-start hook.
Log at /var/log/optimus-manager/switch/switch-20220526T092223.log
Cannot execute command because of previous errors.

When I run systemctl status optimus-manager.service Output is:

● optimus-manager.service - Optimus Manager Commands Daemon
     Loaded: loaded (/usr/lib/systemd/system/optimus-manager.service; enabled; vendor preset: disabled)
     Active: active (running) since Thu 2022-05-26 09:22:23 CEST; 8min ago
    Process: 658 ExecStartPre=/usr/bin/python3 -u -m optimus_manager.hooks.pre_daemon_start (code=exited, status=0/SUCCESS)
    Process: 732 ExecStartPre=/usr/bin/python3 -u -m optimus_manager.hooks.pre_xorg_start (code=exited, status=1/FAILURE)
   Main PID: 785 (python3)
      Tasks: 1 (limit: 18988)
     Memory: 13.1M
        CPU: 296ms
     CGroup: /system.slice/optimus-manager.service
             └─ 785 /usr/bin/python3 -u -m optimus_manager.daemon

kvě 26 09:22:23 aurelius-msi python3[732]:     _load_module(available_modules, "nvidia", options=nvidia_options)
kvě 26 09:22:23 aurelius-msi python3[732]:   File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 241, in _load_module
kvě 26 09:22:23 aurelius-msi python3[732]:     raise KernelSetupError(
kvě 26 09:22:23 aurelius-msi python3[732]: optimus_manager.kernel.KernelSetupError: module nvidia is not available for current kernel. Is the corresponding package installed ?
kvě 26 09:22:23 aurelius-msi python3[732]: [144] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
kvě 26 09:22:23 aurelius-msi python3[732]: [144] INFO: Writing state {'type': 'pre_xorg_start_failed', 'switch_id': '20220526T092223', 'requested_mode': 'hybrid'}
kvě 26 09:22:23 aurelius-msi systemd[1]: Started Optimus Manager Commands Daemon.
kvě 26 09:22:23 aurelius-msi python3[785]: [1] INFO: # Commands daemon
kvě 26 09:22:23 aurelius-msi python3[785]: [1] INFO: Opening UNIX socket
kvě 26 09:22:23 aurelius-msi python3[785]: [1] INFO: Awaiting commands

I tried to reinstall nvidia drivers. Nvidia drivers I have:

local/egl-wayland 2:1.1.9+r3+g582b2d3-1
    EGLStream-based Wayland external platform
local/lib32-libvdpau 1.5-1
    Nvidia VDPAU library
local/lib32-nvidia-utils 510.73.05-1
    NVIDIA drivers utilities (32-bit)
local/libvdpau 1.5-1
    Nvidia VDPAU library
local/libxnvctrl 510.73.05-1
    NVIDIA NV-CONTROL X extension
local/linux414-nvidia 510.73.05-1 (linux414-extramodules)
    NVIDIA drivers for linux.
local/mhwd-nvidia 510.73.05-1
    MHWD module-ids for nvidia 510.73.05
local/mhwd-nvidia-390xx 390.151-1
    MHWD module-ids for nvidia 390.151
local/mhwd-nvidia-470xx 470.129.06-1
    MHWD module-ids for nvidia 470.129.06
local/nvidia-prime 1.0-4
    NVIDIA Prime Render Offload configuration and utilities
local/nvidia-utils 510.73.05-1
    NVIDIA drivers utilities

version of Manjaro: 5.15.41-1-MANJARO
I tried to run prime-offload prime-run and so on. In /etc/sddm.conf I commented 2 lines in xorg config:

#DisplayCommand=/usr/share/sddm/scripts/Xsetup
#DisplayStopCommand=/usr/share/sddm/scripts/Xstop

but nothing works. can someone kindly help me in this situation?
Thank you in advance

this:

module nvidia is not available for current kernel. Is the corresponding package installed ?

post output from:
mhwd-kernel -li && mhwd -l && mhwd -li

output from mhwd-kernel -li && mhwd -l && mhwd -li

Currently running: 5.15.41-1-MANJARO (linux515)
The following kernels are installed in your system:
   * linux414
   * linux515
> 0000:01:00.0 (0300:10de:1f11) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.12.18               false            PCI
          video-nvidia            2021.12.18               false            PCI
    video-nvidia-470xx            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> 0000:00:02.0 (0300:8086:3e9b) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI
video-hybrid-intel-nvidia-470xx-prime            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime            2021.12.18               false            PCI
     video-modesetting            2020.01.13                true            PCI


Warning: No installed USB configs!

hm, everything looks ok … try reinstalling optimus:
pamac remove optimus-manager optimus-manager-qt
reboot
install again:
pamac build optimus-manager optimus-manager-qt
reboot and test

I tried it but it still have same error:

ERROR: the latest GPU setup attempt failed at Xorg pre-start hook.
Log at /var/log/optimus-manager/switch/switch-20220526T102313.log
Cannot execute command because of previous errors.

When I tried sudo pacman -Syu or yay -Syu I have system up to date, but it still doesn’t works despite it worked very well before 4 days.

install the 5.17.9-1 kernel from system settings/kernel, reboot, select it in grub menu and test with it

2 Likes

Thank you so much, it works now.

but why does it not work with the 5.15? you could try uninstalling the 5.15 from system settings, then install it again, reboot, select it, and try again with it

Hey folks! I had the same issue and changing an older kernel to 5.17.9.-1 helped me too. Thanks for everyone"s efforts here.

I ran into the same issue but just installing the linux517-nvidia package fixed it for me

Kernel: 5.17.15-1-MANJARO
Dell XPS 15 (optimus)

Ran into the same issue this morning, following jamethy’s suggestion installing linux518-nvidia fixed the optimus-manager issue switching into hybrid mode for external monitor output.

sudo pacman -S linux518-nvidia
systemctl reboot
prime-offload && optimus-manager --switch hybrid

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