optimus-manager works fine yesterday. But today I upgrade my system by yay, I cant switch my gpu to nvidia.
Here is the output:
$ optimus-manager ✔
Traceback (most recent call last):
File "/usr/bin/optimus-manager", line 33, in <module>
sys.exit(load_entry_point('optimus-manager==1.4', 'console_scripts', 'optimus-manager')())
File "/usr/bin/optimus-manager", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
File "/usr/lib/python3.9/importlib/metadata.py", line 524, in distribution
return Distribution.from_name(distribution_name)
File "/usr/lib/python3.9/importlib/metadata.py", line 187, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: optimus-manager
I found some upgrade history in pamac, is there something breaking the dependencies?
i got the 1.4-3 version and that’s the one that broke it for me.
the Nvidia card doesn’t work and trying to switch to another card in optimus manager-qt brings an error:
unable to connect to optimus manager daemon:
no such file or directory.
systemctl status optimus-manager.service
optimus-manager.service - Optimus Manager Commands Daemon
Loaded: loaded (/usr/lib/systemd/system/optimus-manager.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2021-12-18 17:43:19 IST; 44min ago
Process: 575 ExecStartPre=/usr/bin/python3 -u -m optimus_manager.hooks.pre_daemon_start (code=exited, status=1/FAILURE)
Process: 659 ExecStartPre=/usr/bin/python3 -u -m optimus_manager.hooks.pre_xorg_start (code=exited, status=1/FAILURE)
Process: 665 ExecStart=/usr/bin/python3 -u -m optimus_manager.daemon (code=exited, status=1/FAILURE)
Process: 677 ExecStopPost=/usr/bin/python3 -u -m optimus_manager.hooks.post_daemon_stop (code=exited, status=1/FAILURE)
Main PID: 665 (code=exited, status=1/FAILURE)
CPU: 135ms
systemd[1]: Starting Optimus Manager Commands Daemon...
python3[575]: /usr/bin/python3: Error while finding module specification for 'optimus_manager.hooks.pre_daemon_start' >
python3[659]: /usr/bin/python3: Error while finding module specification for 'optimus_manager.hooks.pre_xorg_start' (M>
systemd[1]: Started Optimus Manager Commands Daemon.
python3[665]: /usr/bin/python3: Error while finding module specification for 'optimus_manager.daemon' (ModuleNotFoundE>
systemd[1]: optimus-manager.service: Main process exited, code=exited, status=1/FAILURE
python3[677]: /usr/bin/python3: Error while finding module specification for 'optimus_manager.hooks.post_daemon_stop' >
systemd[1]: optimus-manager.service: Control process exited, code=exited, status=1/FAILURE
systemd[1]: optimus-manager.service: Failed with result 'exit-code'.
it is not,
i’ve been using it for around a year now with no issues.
this things happen, and a huge amount of people need it.
this might give you more info:
right now there seem to be an issue with optimus manager.
some people managed to fix it with suggested solutions and others not.(something to do with python)
for now you can wait for a fix to come.
and yes,you install optimus manager and then optimus-manager-qt will use it,but i don’t know/think the order matters.
From now on that’s where one will need to install it from. I cannot test it properly and there are too many incompatibilities, see the README. It also needs gdm-prime on GNOME which is ony in the AUR. Either it can be supported and we add everything to the repos or none at all.
And now I have my two monitor working fine :D. I think this solution work temporary while Manjaro Team fix package.
$optimus-manager --status
Optimus Manager (Client) version 1.4
Current GPU mode : nvidia
GPU mode requested for next login : no change
GPU at startup : nvidia
Temporary config path: no
$sudo pacman -Ss optimus-manager
[sudo] password for cybernoob:
community/optimus-manager 1.4-3 [installed: 1.4-1]
Management utility to handle GPU switching for Optimus laptops
$systemctl status optimus-manager
● optimus-manager.service - Optimus Manager Commands Daemon
Loaded: loaded (/usr/lib/systemd/system/optimus-manager.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2021-12-18 15:56:34 -03; 6min ago
Process: 591 ExecStartPre=/usr/bin/python3 -u -m optimus_manager.hooks.pre_daemon_start (code=exited, status=0/SUCCESS)
Process: 692 ExecStartPre=/usr/bin/python3 -u -m optimus_manager.hooks.pre_xorg_start (code=exited, status=0/SUCCESS)
Main PID: 1255 (python3)
Tasks: 1 (limit: 18496)
Memory: 62.3M
CPU: 2.197s
CGroup: /system.slice/optimus-manager.service
└─1255 /usr/bin/python3 -u -m optimus_manager.daemon
dic 18 15:56:32 tesla python3[692]: [738] INFO: switching=none, nothing to do
dic 18 15:56:32 tesla python3[692]: [786] INFO: Loading module nvidia
dic 18 15:56:32 tesla python3[692]: [1073] INFO: Loading module nvidia_drm
dic 18 15:56:34 tesla python3[692]: [2852] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
dic 18 15:56:34 tesla python3[692]: [2852] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20211218T155631', 'requested_mode': 'nvidia'}
dic 18 15:56:34 tesla python3[692]: [2852] INFO: Xorg pre-start hook completed successfully.
dic 18 15:56:34 tesla systemd[1]: Started Optimus Manager Commands Daemon.
dic 18 15:56:34 tesla python3[1255]: [1] INFO: # Commands daemon
dic 18 15:56:34 tesla python3[1255]: [1] INFO: Opening UNIX socket
dic 18 15:56:34 tesla python3[1255]: [1] INFO: Awaiting commands
i was finally able to atleast install optimus-manager 1.4.3 from aur and went past the black screen that i was getting for days but now i am not able to enable the optimus-manager.service.
Ishaan,
while here you see no answers, you can also go to https://aur.archlinux.org/ find your package there, read comments, leave your comments there, subscribe to updates.
optimus-manager works perfectly. I had problems after the last update (2016-12-16) and it stopped working, but I did the following:
I have made the necessary changes related to Python 3.10, as described here: https://www.reddit.com/r/archlinux/comments/rf6c84/psa_python_310_is_in_core_rebuild_your_aur/
Then I installed and configured optimus-manager 1.4.3 from AUR.
The video switches to Nvidia when the laptop is plugged in and to Intel when it is on battery. It works without a problem with a second monitor, as it was before update.
I think there’s something else here, optimus-manager 1.4-3 should not have been pushed to Stable (maybe it was by mistake?) when only 2 days ago we found in the testing branch that it should be rebuild vs. python 3.10 to work correctly and when we knew that this time
I use Manjaro mainly for the Optimus Manager. Because OM is and will probably always be buggy sounds to me now as if I had bet on the wrong horse with Manjaro.
No … nothing to do with ‘compatibility’ … more just the nature of the thing itself.
I think its a solution to a problem that doesnt exist, and its implemented poorly.