question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GPU setup was initiated but Xorg post-start hook did not run

See original GitHub issue

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!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:21

github_iconTop GitHub Comments

35reactions
Hvassaacommented, Dec 25, 2020

I had a similar issue, and a workaround for me was first running

prime-offload

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

3reactions
mrkvncommented, Jan 22, 2021

Another workaround.

  1. Create a script to launch prime-offload on login. Don’t forget to make it executable.
#!/bin/bash

# not sure why but needs to sleep before launching, otherwise, it doesn't work.
sleep 2
prime-offload &> /dev/null
  1. Under ~/.config/autostart. Create a file called prime-offload.desktop with the following contents.
[Desktop Entry]
Type=Application
Exec=<insert-path-to-script-here>/prime-offload.sh
Name=Prime Offload
Comment=Required for Optimus Prime Graphics switching

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"a GPU setup was initiated but Xorg post-start hook did not run ...
I installed Optimus manager and cant run it. It gives that specific error when I try to switch or print modes.
Read more >
optimus manager the latest GPU setup attempt failed at Xorg ...
ERROR : a GPU setup was initiated but Xorg post-start hook did not run. Log at /var/log/optimus-manager/switch/switch-20200516T172801.log
Read more >
Optimus Manager Trouble - Graphics & Display
ERROR : a GPU setup was initiated but Xorg post-start hook did not run. ... If your login manager is GDM, make sure...
Read more >
Can't figure out how to install nvidia drivers - Newbie
ERROR : a GPU setup was initiated but Xorg post-start hook did not run. Log at /var/log/optimus-manager/switch/switch-20220808T230430.log If ...
Read more >
(FIX) Optimus-Manager GNOME broken out of the box
If you run Optimus-Manager you get the following error message: "ERROR: a GPU setup was initiated but Xorg post-start hook did not run....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found