Optimus-manager won't switch

After i deleted /etc/X11/xorg.conf Optimus manager doesn’t want to switch at all after optimus-manager --switch nvidia anyway, My default card when start is Integrated and Optimus manager is working fine when I start my pc but after the switch to Nvidia Optimus manager don’t work and when I want to back to integrated it tells me :
optimus-manager --switch integrated

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

so i can’t back to integrated and Nvidia doesn’t work so every time I reboot my pc,

  • i tried to reinstall Nvidia card multiple time
  • i tried to reinstall optimus-manager and optimus-manager-qt
  • tried to change the kernal version

so any help ?

other informations:
mhwd -l

> 0000:03:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2016.04.20                true            PCI


> 0000:01:00.0 (0300:10de:1c20) 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-hybrid-intel-nvidia-390xx-bumblebee            2021.12.18               false            PCI
          video-nvidia            2021.12.18               false            PCI
    video-nvidia-470xx            2021.12.18               false            PCI
    video-nvidia-390xx            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:591b) 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-hybrid-intel-nvidia-390xx-bumblebee            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

mhwd -li

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


Warning: No installed USB configs!

thanks.

You have to remove the video-linux
sudo mhwd -r pci video-linux

reinstall the hybrid driver like this:
sudo mhwd -f -i pci video-hybrid-intel-nvidia-470xx-prime

reboot the system

Also, don’t create or remove system files and folders randomly if you are not sure about the outcome.

1 Like

I deleted the file because I saved some Nvidia settings for my external display that’s why, but when I rebooted my system it stuck on the black screen that’s why I removed the saved file.

still have the same problem : (

mhwd -li                                                                                       ✔ 


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