You are not logged in.

#1 2026-07-06 17:43:05

BrokenK
Member
Registered: 2026-07-06
Posts: 7

optimus-manager command not running and displays a error mesag[SOLVED]

here are logs and error message

GPU setup failed: Xorg pre-start hook failed
Log at: /var/log/optimus-manager/switch/switch-20260706T155645.log
/var/log/optimus-manager/switch/switch-20260706T155645.log: line 1: [38]: command not found
/var/log/optimus-manager/switch/switch-20260706T155645.log: line 2: [39]: command not found
/var/log/optimus-manager/switch/switch-20260706T155645.log: line 3: [40]: command not found
/var/log/optimus-manager/switch/switch-20260706T155645.log: line 4: [93]: command not found
/var/log/optimus-manager/switch/switch-20260706T155645.log: line 5: [94]: command not found
/var/log/optimus-manager/switch/switch-20260706T155645.log: line 6: [100]: command not found
/var/log/optimus-manager/switch/switch-20260706T155645.log: line 7: [152]: command not found
/var/log/optimus-manager/switch/switch-20260706T155645.log: line 8: [198]: command not found
/var/log/optimus-manager/switch/switch-20260706T155645.log: line 9: [199]: command not found
/var/log/optimus-manager/switch/switch-20260706T155645.log: line 10: [230]: command not found
/var/log/optimus-manager/switch/switch-20260706T155645.log: line 11: [836]: command not found
/var/log/optimus-manager/switch/switch-20260706T155645.log: line 12: syntax error near unexpected token `most'
/var/log/optimus-manager/switch/switch-20260706T155645.log: line 12: `Traceback (most recent call last):

Last edited by BrokenK (2026-07-11 12:14:06)

Offline

#2 2026-07-06 21:41:43

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,290

Re: optimus-manager command not running and displays a error mesag[SOLVED]

What's your GPU? You don't need optimus-manager for Turing+ cards, the built in PRIME should have proper power saving out of the box.

Offline

#3 2026-07-07 17:49:30

BrokenK
Member
Registered: 2026-07-06
Posts: 7

Re: optimus-manager command not running and displays a error mesag[SOLVED]

V1del wrote:

What's your GPU? You don't need optimus-manager for Turing+ cards, the built in PRIME should have proper power saving out of the box.

I am on a laptop with NVIDIA 1050 and Intel® UHD Graphics 630. I got absolutely no idea how to change them without optimus manager, and everything just uses integrated graphics. It is displayed in lspci command and it is the only dedicated graphics component

Offline

#4 2026-07-07 17:58:56

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,290

Re: optimus-manager command not running and displays a error mesag[SOLVED]

Right in that case optimus-manager could be valid, you installed nvidia-580xx-dkms/utils from the AUR for this card? Generally command not found read like a bunch of deps missing,  you installed optimus-manager via optimus-manager-git from the AUR or....?

Offline

#5 2026-07-07 18:24:27

BrokenK
Member
Registered: 2026-07-06
Posts: 7

Re: optimus-manager command not running and displays a error mesag[SOLVED]

V1del wrote:

Right in that case optimus-manager could be valid, you installed nvidia-580xx-dkms/utils from the AUR for this card? Generally command not found read like a bunch of deps missing,  you installed optimus-manager via optimus-manager-git from the AUR or....?

I just tried to install this driver, still doesn't work. Yes, I have installed optimus-manager via optimus-manager-git from AUR

Offline

#6 2026-07-07 20:06:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,991

Re: optimus-manager command not running and displays a error mesag[SOLVED]

still doesn't work.

Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855

GPU setup failed: Xorg pre-start hook failed

Are you running X11 at all?

loginctl session-status

It is displayed in lspci command and it is the only dedicated graphics component

lspci -knnd ::0300

Offline

#7 2026-07-08 11:23:42

BrokenK
Member
Registered: 2026-07-06
Posts: 7

Re: optimus-manager command not running and displays a error mesag[SOLVED]

Are you running X11 at all?

I have absolutely no idea on how to find out, if it was the command

loginctl session-status

here are the command logs.

3 - brokenk (1000)
  Since: Wed 2026-07-08 10:12:34 UTC; 3min 34s ago
  State: active
 Leader: 2183 (gdm-session-wor)
   Seat: seat0; vc2
    TTY: tty2
 Remote: no
Service: gdm-password
   Type: wayland
  Class: user
   Idle: no
   Unit: session-3.scope
         ├─2183 "gdm-session-worker [pam/gdm-password]"
         ├─2419 /usr/lib/gdm-wayland-session /usr/bin/gnome-session
         └─2434 /usr/lib/gnome-session-init-worker gnome

Jul 08 10:12:35 archlinux gdm-password][2183]: gkr-pam: unlocked login keyring
Jul 08 10:12:35 archlinux systemd[1]: Started Session 3 of User brokenk.
Jul 08 10:12:36 archlinux gnome-session-i[2434]: Starting GNOME session target: gnome-session@gnome.target
lspci -knnd ::0300

command displayed this

00:02.0 VGA compatible controller [0300]: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630] [8086:3e9b]
	Subsystem: Lenovo Device [17aa:3a2d]
	Kernel driver in use: i915
	Kernel modules: i915
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107M [GeForce GTX 1050 3 GB Max-Q] [10de:1c91] (rev a1)
	Subsystem: Lenovo Device [17aa:3a2d]
	Kernel modules: nouveau, nvidia_drm, nvidia

Last edited by BrokenK (2026-07-08 11:24:10)

Offline

#8 2026-07-08 13:34:40

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,991

Re: optimus-manager command not running and displays a error mesag[SOLVED]

You're running gnome + GDM on wayland and currently nothing is driving the nvidia GPU (might be b/o of optimus mananger)

GPU setup failed: Xorg pre-start hook failed

is therefore hardly surprising, there is no X11

If you ignore all error messages, can you successfully switch between IGP, GPU and hybrid mode?

Offline

#9 2026-07-08 16:16:10

BrokenK
Member
Registered: 2026-07-06
Posts: 7

Re: optimus-manager command not running and displays a error mesag[SOLVED]

If you ignore all error messages, can you successfully switch between IGP, GPU and hybrid mode?

Running

optimus-manager --switch nvidia

,

optimus-manager --switch integrated

,

optimus-manager --switch hybrid

gives the exact same error message, as if I just ran

optimus-manager

Offline

#10 2026-07-08 18:47:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,991

Re: optimus-manager command not running and displays a error mesag[SOLVED]

seth wrote:

If you ignore all error messages, can you successfully switch between IGP, GPU and hybrid mode?

Of course you'll see "errors" about Xorg if there's no xorg…

Offline

#11 2026-07-09 09:42:26

BrokenK
Member
Registered: 2026-07-06
Posts: 7

Re: optimus-manager command not running and displays a error mesag[SOLVED]

Of course you'll see "errors" about Xorg if there's no xorg…

The problem is that there IS xorg, it was one of the first things I did to try and fix this problem.

Offline

#12 2026-07-09 10:19:09

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,246

Re: optimus-manager command not running and displays a error mesag[SOLVED]

Then the issue might be gdm/gnome related.

Install something simple that doesn't use wayland and GTK like twm .
Boot your system to multi-user.target to prevent gdm from messing things up.
login to console as user and run startx .

Post the output and xorg log .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#13 2026-07-09 10:22:50

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,290

Re: optimus-manager command not running and displays a error mesag[SOLVED]

Gnome doesn't support xorg anymore, you'd need to run a different environment.

That said I'm not sure you're seeing seth's argument. If you don't look at the errors but e.g. at lspci and kernel logs, does the nvidia driver disappear from loaded modules (and showing the kernel modules in use: line) when switching to iGPU and relevantly show up again when switching to hybrid?

Also, maybe take a few steps back. What is your end goal in this setup? Do you want to be able to use the nvidia card on-demand for e.g. games, do you care about battery life and thus need it to be disabled when not playing games, or does it not matter if the driver would be theoretically active all the time? If the latter you can drop optimus-manager entirely and just rely on the default PRIME setup and everything should just work, albeit due to the card not being eligible for runtime suspend at potentially increased power draw even while idle.

FWIW on an even older setup than yours with a Maxwell dedicated card I'm actually still using bbswitch and bumblebee because I don't want to have to kill my session for the occasional switch over.

Offline

#14 2026-07-09 15:14:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,991

Re: optimus-manager command not running and displays a error mesag[SOLVED]

THe pre-boot hooks aren't surprising, depending on what aspects of X11 you've installed
This stuff here

/var/log/optimus-manager/switch/switch-20260706T155645.log: line 1: [38]: command not found

However looks like the opimus-manager script is totally garbled, please upload the AUR package you built somewhere and post that link.

Sanity check: did you do anything like symlinking /usr/bin/python to /bin/bash or /bin/sh to /usr/bin/fish or something like that?

Offline

#15 2026-07-11 12:03:02

BrokenK
Member
Registered: 2026-07-06
Posts: 7

Re: optimus-manager command not running and displays a error mesag[SOLVED]

Ok, so the problem was that my ssd was absolutely destroyed, so I had to replace it. After I reinstalled Arch I had installed a different environment, and just did not install the drivers for the integrated graphics, and that surprisingly worked. It is solved ig

Offline

Board footer

Powered by FluxBB