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: closed
- Created 6 years ago
- Comments: 32
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.confthat the wiki says to comment out:Once I’ve done that, everything works seamlessly.
Another workaround.
prime-offloadon login. Don’t forget to make it executable.~/.config/autostart. Create a file calledprime-offload.desktopwith the following contents.In this way you don’t have to create any aliases or execute
prime-offloadevery time you want to switch graphics, which should be the case in the first place.Same here, same setup… This is over a year later… I’ve tried the suggestions eg:
so, yeah, no luck. 😕
Welp. After couple sleepless nights I came up with a “solution”, rather the HINT.
Short answer: It’s something wrong within Plasma packets/libraries and something is needed from XFCE libraries.
Long answer: I’ve been using EndeavourOS (arch) with XFCE4 since 2022 + optimus-manager with absolutely no problems (2 optimus laptops with Intel CPU + Nvidia GPU)
I came to this thread the day I installed fresh Endeavour OS with KDE (default DE for now). I tried (gdm, lighdm, sddm) with different combinations of nvidia drivers (nvidia-dkms/open/lts etc.) - no success. I could not keep optimus-manager.service enabled or evern working after first switch because it would keep me on dm login
So I installed XFCE4 without deleting KDE.
pacman -S xfce4 xfce4-goodiesNo success, optimus-manager still bugs out.BUT drivers worked properly in default (hybrid) mode without optimus-manager installed (External monitor uses Nvidia GPU and launches all games with Nvidia GPU, -Most important: it sees both monitors now, comparing to Plasma (except Plasma’s hybrid mode that detects 2 screens, but won’t launch anything on discrete GPU unless you prime-run it individually (no smooth experience at all anyway)
Second step I deleted Plasma with it’s dependencies
pacman -Rdd plasmaand moved to XFC4 totally (+ switched to lighdm)optimus-manager now works like a charm
Both monitors are detected, games are launched from Nvidia GPU, optimus-manager.service can be enabled and boots normally with system
P.S. I am too lazy to check if dm makes any changes (if you can stay on sddm)
(ABOUT MOVING TO XFCE)
! Standard XFCE on non-fresh install won’t have
nm-connection-editor(Wifi-connections manager), better install it before deleting Plasma. If it’s too late: use nmtui after you installed nm-connection-editor delete saved connections from nmtui and connect from nm-applet (comes with nm-connection-editor) otherwise it will ask you for wifi password every time you boot.If you want normal Endeavour OS beautiful XFCE interface: [endeavouros-xfce4-theming] To get full normal setup like from fresh install
I do really hope it will help!