Optimus Manager Trouble

I hit a wall when trying to make optimus manager to work, when I try to run optimus-manager I get the following error. I’m attempting to use the proprietary driver.

ERROR: a GPU setup was initiated but Xorg post-start hook did not run.
Log at /var/log/optimus-manager/switch/switch-20201209T125039.log
If your login manager is GDM, make sure to follow those instructions:
GitHub - Askannz/optimus-manager: A Linux program to handle GPU switching on Optimus laptops.
If your display manager is neither GDM, SDDM nor LightDM, or if you don’t use one, read the wiki:
FAQ, common issues, troubleshooting · Askannz/optimus-manager Wiki · GitHub

Cannot execute command because of previous errors.

This is the log the error refers:

[105] INFO: # Xorg pre-start hook

[105] INFO: Previous state was: {‘type’: ‘pending_pre_xorg_start’, ‘requested_mode’: ‘intel’, ‘current_mode’: None}

[105] INFO: Requested mode is: intel

[105] INFO: Checking for GDM display servers

[872] INFO: Available modules: [‘nouveau’, ‘bbswitch’, ‘acpi_call’, ‘nvidia’, ‘nvidia_drm’, ‘nvidia_modeset’, ‘nvidia_uvm’]

[872] INFO: Unloading modules [‘nvidia_drm’, ‘nvidia_modeset’, ‘nvidia_uvm’, ‘nvidia’] (if loaded)

[878] INFO: Loading module bbswitch

[884] INFO: Setting GPU power to OFF via bbswitch

[990] INFO: Loaded extra Intel Xorg options (0 lines)

[991] INFO: Loaded extra Intel Xorg options (0 lines)

[991] INFO: Found MHWD-generated Xorg config file at /etc/X11/xorg.conf.d/90-mhwd.conf. Removing.

[992] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf

[992] INFO: Writing state {‘type’: ‘pending_post_xorg_start’, ‘switch_id’: ‘20201209T103956’, ‘requested_mode’: ‘intel’}

[993] INFO: Xorg pre-start hook completed successfully.

System Information

Kernel: 5.9.11-3-MANJARO
Shell: bash 5.0.18
DE: GNOME 3.38.1
WM: Mutter
CPU: Intel i5-7200U (4) @ 3.100GHz
GPU: NVIDIA GeForce 940MX
GPU: Intel HD Graphics 620

I have the same problem with slightly different log output:

12] INFO: # Xorg pre-start hook
[12] INFO: Previous state was: {‘type’: ‘pending_pre_xorg_start’, ‘requested_mode’: ‘intel’, ‘current_mode’: None}
[12] INFO: Requested mode is: intel
[12] INFO: Checking for GDM display servers
[355] INFO: Available modules: [‘nouveau’, ‘nvidia’, ‘nvidia_drm’, ‘nvidia_modeset’, ‘nvidia_uvm’]
[355] INFO: Unloading modules [‘nvidia_drm’, ‘nvidia_modeset’, ‘nvidia_uvm’, ‘nvidia’] (if loaded)
[373] INFO: Loaded extra Intel Xorg options (0 lines)
[374] INFO: Loaded extra Intel Xorg options (0 lines)
[374] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[374] INFO: Writing state {‘type’: ‘pending_post_xorg_start’, ‘switch_id’: ‘20201231T123055’, ‘requested_mode’: ‘intel’}
[374] INFO: Xorg pre-start hook completed successfully.
[3] INFO: # Xorg post-start hook
[3] INFO: Running /etc/optimus-manager/xsetup-intel.sh
[263] INFO: Writing state {‘type’: ‘done’, ‘switch_id’: ‘20201231T123055’, ‘current_mode’: ‘intel’}
[265] INFO: Xorg post-start hook completed successfully.
[7] INFO: # Xorg pre-start hook
[7] INFO: Previous state was: {‘type’: ‘done’, ‘switch_id’: ‘20201231T123055’, ‘current_mode’: ‘intel’}
[7] INFO: Requested mode is: intel
[7] INFO: Checking for GDM display servers
[36] INFO: Loaded extra Intel Xorg options (0 lines)
[36] INFO: Loaded extra Intel Xorg options (0 lines)
[37] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[37] INFO: Writing state {‘type’: ‘pending_post_xorg_start’, ‘switch_id’: ‘20201231T123055’, ‘requested_mode’: ‘intel’}
[37] INFO: Xorg pre-start hook completed successfully.

I followed these instructions when setting up optimus-manager: Guide: Install and configure optimus-manager for hybrid GPU setups (Intel/NVIDIA) - Tutorials - Manjaro Linux Forum

It has worked fine before, but for reasons unknown to me it just stopped working. After the last major Manjaro stable update of Dec 30 2020 I uninstalled and reinstalled optimus-manager following the aforementioned guide, but to no avail.

Kernel: 5.10.2-2
DE: GNOME 3.38.2
WM: X11
CPU: Intel i7-10510U
GPU: NVidia GeForce MX250 (GP108M)
GPU: Intel UHD Graphics 620

Looks like there’s a fix (for GDM at least): Can't switch due to Key Error, and manager in inconsistent state · Issue #350 · Askannz/optimus-manager · GitHub

I’m not sure when the fix will be rolled out though

I have been unable to switch between Intel and Nvidia drivers as when I try to switch to Nvidia driver using the terminal command “Optimus-manager --switch Nvidia” it shows the following error
"ERROR: the latest GPU setup attempt failed at Xorg pre-start hook.
Log at /var/log/optimus-manager/switch/switch-20210205T122415.log
Config parsing : error in option “dri” in section [intel] : invalid value “0”
Config parsing : unknown section [amd]. Ignoring.

Cannot execute command because of previous errors."
please help

These indicate problems with the configuration. Please check if you have a valid configuration file.

same in my gnome

the instructions on how to fix it foresee such an error … but why following the instructions cannot fix it …on XFCE working normal