optimus manager not switching properly

i have followd the guide in Guide: Install and configure optimus-manager for hybrid GPU setups (Intel/NVIDIA)

but when i trie to switch to nvedia using the command
optimus-manager --switch nvidia
i am logged out, and when i log in i see that i am still using intel

optimus-manager --status

Optimus Manager (Client) version 1.2.2

Current GPU mode : intel
GPU mode requested for next login : nvidia
GPU mode for next startup : nvidia
Temporary config path: no

when i checked the logs i found the below

journalctl -u optimus-manager.service
-- Logs begin at Tue 2020-03-10 21:59:23 +03, end at Sat 2020-03-14 11:43:10 +03. --
Mar 14 11:19:23 abdullkah-pc systemd[1]: Starting Optimus Manager Commands Daemon...
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: 2020-03-14 11:19:23 AM +0300 ====================
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Optimus Manager (Setup script) version 1.2.2
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Setting up boot
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Removing config copy
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: removing last acpi_call state (if any)
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Copying user config
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Cleaning up leftover Xorg conf
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Loading config
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Reading startup mode
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: No kernel parameter set for startup, reading from file
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Startup mode is : intel
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Writing startup mode to requested GPU mode
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Writing requested mode
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Initial GPU setup
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Checking for GDM display servers
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Available kernel modules : ['nouveau', 'nvidia', 'nvidia_drm', 'nvidia_modeset']
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Setting up base state
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Unloading modules ['nvidia_drm', 'nvidia_modeset', 'nvidia'] (if loaded)
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Unloading modules ['nouveau'] (if loaded)
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Running /etc/optimus-manager/nvidia-enable.sh
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: ERROR : cannot run /etc/optimus-manager/nvidia-enable.sh. Continuing anyways. Error is : Failed to execute '/etc/optimus-manager/nvidia-enable.sh' : bash: /etc/optimus-manager/nvidia-enable.sh: No such file or directory
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Setting up Intel state
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Running /etc/optimus-manager/nvidia-disable.sh
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: ERROR : cannot run /etc/optimus-manager/nvidia-disable.sh. Continuing anyways. Error is : Failed to execute '/etc/optimus-manager/nvidia-disable.sh' : bash: /etc/optimus-manager/nvidia-disable.sh: No such file or directory
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Loaded extra Intel Xorg options (0 lines)
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Loaded extra Nvidia Xorg options (0 lines)
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Cannot setup GPU : Xorg setup error : Cannot write Xorg conf at /etc/X11/xorg.conf.d/10-optimus-manager.conf
Mar 14 11:19:23 abdullkah-pc prime-switch-boot[669]: Cleaning up Xorg config and exiting.
Mar 14 11:19:23 abdullkah-pc systemd[1]: Started Optimus Manager Commands Daemon.
Mar 14 11:19:23 abdullkah-pc python3[970]: Optimus Manager (Daemon) version 1.2.2
Mar 14 11:19:23 abdullkah-pc python3[970]: Automatic log cropping
Mar 14 11:19:23 abdullkah-pc python3[970]: Opening UNIX socket
Mar 14 11:19:23 abdullkah-pc python3[970]: Awaiting commands
Mar 14 11:21:02 abdullkah-pc python3[970]: Received command : {
Mar 14 11:21:02 abdullkah-pc python3[970]:     "args": {
Mar 14 11:21:02 abdullkah-pc python3[970]:         "mode": "nvidia"
Mar 14 11:21:02 abdullkah-pc python3[970]:     },
Mar 14 11:21:02 abdullkah-pc python3[970]:     "type": "switch"
Mar 14 11:21:02 abdullkah-pc python3[970]: }
Mar 14 11:21:02 abdullkah-pc python3[970]: Writing requested GPU mode nvidia
Mar 14 11:21:44 abdullkah-pc python3[970]: Received command : {
Mar 14 11:21:44 abdullkah-pc python3[970]:     "args": {
Mar 14 11:21:44 abdullkah-pc python3[970]:         "content": "[intel]\nDRI=3\naccel=\ndriver=modesetting\nmodeset=yes\ntearfree=\n\n[nvidia]\nDPI=96\nPAT=yes\nignore_abi=no\nmodeset=yes\noptions=overclocking\n\n[optimus]\nauto_logout=yes\npci_power_control=no\npci_remove=no\npci_reset=no\nswitch>
Mar 14 11:21:44 abdullkah-pc python3[970]:     },
Mar 14 11:21:44 abdullkah-pc python3[970]:     "type": "user_config"
Mar 14 11:21:44 abdullkah-pc python3[970]: }
Mar 14 11:21:44 abdullkah-pc python3[970]: Replacing user config at /etc/optimus-manager/optimus-manager.conf with provided content

so i noticed that /etc/optimus-manager/nvidia-enable.sh: No such file or directory was causing the problem, but i have no idea how to fix it.

EDIT:
so after reading the log so more i notceid this line
Cannot setup GPU : Xorg setup error : Cannot write Xorg conf at /etc/X11/xorg.conf.d/10-optimus-manager.conf
i had renamed this directory based on step 4 of the guide, so i undid the rename and now it works fine.

optimus-manager --status              

Optimus Manager (Client) version 1.2.2

Current GPU mode : nvidia
GPU mode requested for next login : nvidia
GPU mode for next startup : nvidia
Temporary config path: no

hope this helps someone in the futrue

2 Likes

so after reading the log so more i notceid this line
Cannot setup GPU : Xorg setup error : Cannot write Xorg conf at /etc/X11/xorg.conf.d/10-optimus-manager.conf
i had renamed this directory based on step 4 of the guide, so i undid the rename and now it works fine.

optimus-manager --status              

Optimus Manager (Client) version 1.2.2

Current GPU mode : nvidia
GPU mode requested for next login : nvidia
GPU mode for next startup : nvidia
Temporary config path: no

hope this helps someone in the futrue

1 Like

Done, thank you for letting me know :slight_smile:

1 Like

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

Forum kindly sponsored by