optimus-manager: GPU setup was initiated but Xorg post-start hook did not run
Hello! I’ve been optimus-manager
for a couple of months now with no issues, but lately I can’t seem to be able to switch modes.
If I run optimus-manager --switch [whatever]
, my display turns off for a couple of seconds, I get logged out and once I log back in and run optimus-manager --print-mode
, I get the following error:
ERROR: a GPU setup was initiated but Xorg post-start hook did not run.
Log at /var/log/optimus-manager/switch/switch-20201220T121244.log
[...]
Cannot execute command because of previous errors.
The log:
[29] INFO: # Xorg pre-start hook
[29] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'hybrid', current_mode': 'nvidia'}
[29] INFO: Requested mode is: hybrid
[54] INFO: Loaded extra integrated-gpu Xorg options (0 lines)
[54] INFO: Loaded extra nvidia-gpu Xorg options (0 lines)
[54] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[54] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20201220T121244', 'requested_mode': 'hybrid'}
[55] INFO: Xorg pre-start hook completed successfully.
I am using KDE Plasma with SDDM and I’m on a Dell G5 5587 with a GTX1060Max-Q running Arch. I would appreciate any help you guys can give me!
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 22
I had a similar issue, and a workaround for me was first running
and then switching works. I have to do this every time I switch though.
I found some other people with similiar issues and more info : https://github.com/Askannz/optimus-manager/issues/281 and https://bbs.archlinux.org/viewtopic.php?id=255752
My issue was that I’ve not commented out the two lines in
/etc/sddm.conf
that the wiki says to comment out:Once I’ve done that, everything works seamlessly.
Another workaround.
prime-offload
on login. Don’t forget to make it executable.~/.config/autostart
. Create a file calledprime-offload.desktop
with the following contents.In this way you don’t have to create any aliases or execute
prime-offload
every time you want to switch graphics, which should be the case in the first place.