Open karaolidis opened 3 years ago
currently having the same issue, I get the same error message when just running
optimus-manager
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
Thanks, that worked, but is there a way to automate this command? Would a simple alias for prime-offload && optimus-manager --switch whatever
work?
Sure, I don't see why not :smile:
Cool, I'll try setting that up, thanks for the support!
No problem :100:
Why is this closed? Have you found an actual solution @Nikas36 ? I do experience the same issue. Thanks @Hvassaa for this workaround. But running the post-hook manually and having to browse the issues to find a workaround isn't an actual fix.
I'm using patched gdm-prime
& libgdm-prime
and sometimes optimus-manager commands work once, but most of the time I have to manually execute prime-offload
first.
Looks like hooks are only partially working even with patched gdm - and according to this thread even with sddm hooks seem to be broken.
Update: Thanks for reopening.
Just fyi: I just tested again with both lightdm
and sddm
on Manjaro and those two worked without any issues.
So my issue seems to be only with the gdm-prime patches, which doesn't seem to work. So probably not related.
I will switch from gdm to lightdm which is a reasonable workaround for me.
@jbbr what brand is your computer? Mine is a Dell XPS 15" 7590, and I noticed @Nikas36 had a Dell as well. I meant to do some more digging but forgot.
@Hvassaa Mine is Dell as well (XPS 15'' 9560). Wouldn't think this is an hardware issue though. On my laptop power control works well when using bbswitch method. Everything is working with lightdm and sddm right now - only patched gdm behaves as if it's not patched (hooks are not executed). My issue seems to be different to this, as the OP was using sddm.
same problem here. Have to prime-offload
every single time.
MSI GL63 9SD here
After I execute prime-offload
and optimus-manager --switch [whatever]
, it comes up with the same error message:
ERROR: a GPU setup was initiated but Xorg post-start hook did not run.
[...]
Cannot execute command because of previous errors.
Environment: optimus-manager: 1.3.1 gdm-prime, libgdm-prime: 3.38.2 host: MSI GL72 6QE
----- update -----
I checked out my nvidia-smi
and found out that the switch was successful.
After I logged back in, I have to execute prime-offload
again before I optimus-manager --status
Same issue on my Lenovo X1 Extreme Gen2 running ArchLinux with GDM. Fortunately the offload/switch trick is a temporary solution.
Same issue on a Dell XPS 15 9560 using Manjaro with GDM. Again, using prime-offload before trying to switch fixes the issue. Also using patched gdm-prime and libgdm-prime (3.38.2).
I am experiencing the same thing. I am using GDM-Prime and whenever I boot up I am met with a warning notification saying 'Warning: You are not running GDM-PRIME' even though I indeed am. I am on an Asus laptop with regular Arch Linux. (Edit: Also forced GDM to boot with Xorg instead of Wayland as instructed. No change.)
Running prime-offload
first works.
Here is a way to run this command and the GPU switch to Nvidia in a single command, for people unfamiliar with alaising commands:
~/.bashrc
in a text editor.alias gpuNV='prime-offload && optimus-manager --switch nvidia'
source ~/.bashrc
in terminal.Now you should be able to use the command gpuNV
to switch to Nvidia without running prime-offload first.
Another workaround.
prime-offload
on login. Don't forget to make it executable.
#!/bin/bash
sleep 2 prime-offload &> /dev/null
2. Under `~/.config/autostart`. Create a file called `prime-offload.desktop` with the following contents.
[Desktop Entry]
Type=Application
Exec=
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.
I have the same issue but when i do prime-offload i glxinfo still says my main gpu is the igpu (btw this is a lenovo legion y530)
I've found that in my Archlinux installation the problem was that SDDM changed the name of its default "local configuration file", which are configuration files stored in /etc/sddm.conf.d/, to "default.conf". This involves that the one installed by optimus-manager in the same folder and named "20-optimus-manager.conf" its overwritten. I've resolved by renaming "default.conf" to "10-default.conf".
I'm also having ha same issue. Running ArcoLinux on Dell Vostro 7500.. with the patched gdm-prim/libdgm-prime. I've had no issues what so ever so far until today when it keeps sending me directly into the black screen and I have to go into tty from there, no matter what I do get Xorg errors. I'm gonna switch to lightdm
to see if that will work better for me.
So far I've tried many things all day and I'm already sick of it. The 'prime-offload` doesn't do the trick trick for me.
I'm also having the same issue on Lenovo legion 5 AMD+NVIDIA laptop. The "prime-offload" before "optimus-manager" runs the command successfully and also says it will switch to hybrid or Nvidia next login but it doesn't and after a reboot sane issue arises without any change in "/etc/X11/xorg.conf.d/10-optimus-manager.conf". Does anybody have any ideas on what to do next?
I'm also having the same issue on Lenovo legion 5 AMD+NVIDIA laptop. The "prime-offload" before "optimus-manager" runs the command successfully and also says it will switch to hybrid or Nvidia next login but it doesn't and after a reboot sane issue arises without any change in "/etc/X11/xorg.conf.d/10-optimus-manager.conf". Does anybody have any ideas on what to do next?
Yes same setup and same issue
My issue was that I've not commented out the two lines in /etc/sddm.conf
that the wiki says to comment out:
Manjaro ships with a default configuration for SDDM (the default login manager for KDE) which overrides some keys needed by optimus-manager. To use optimus-manager, you need to edit the file /etc/sddm.conf and simply put a # before the line starting with DisplayCommandand the one starting with DisplayStopCommand.
Once I've done that, everything works seamlessly.
$ optimus-manager --status
Optimus Manager (Client) version 1.4
Current GPU mode : integrated
GPU mode requested for next login : no change
GPU at startup : auto
Temporary config path: no
My issue was that I've not commented out the two lines in
/etc/sddm.conf
that the wiki says to comment out:Manjaro ships with a default configuration for SDDM (the default login manager for KDE) which overrides some keys needed by optimus-manager. To use optimus-manager, you need to edit the file /etc/sddm.conf and simply put a # before the line starting with DisplayCommandand the one starting with DisplayStopCommand.
Once I've done that, everything works seamlessly.
$ optimus-manager --status Optimus Manager (Client) version 1.4 Current GPU mode : integrated GPU mode requested for next login : no change GPU at startup : auto Temporary config path: no
This worked for me, many thanks. I need to read more carefully next time.
I'm also having the same issue on Lenovo legion 5 AMD+NVIDIA laptop. The "prime-offload" before "optimus-manager" runs the command successfully and also says it will switch to hybrid or Nvidia next login but it doesn't and after a reboot sane issue arises without any change in "/etc/X11/xorg.conf.d/10-optimus-manager.conf". Does anybody have any ideas on what to do next?
Same here, same setup.. This is over a year later.. I've tried the suggestions eg:
Manjaro ships with a default configuration for SDDM (the default login manager for KDE) which overrides some keys needed by optimus-manager. To use optimus-manager, you need to edit the file /etc/sddm.conf and simply put a # before the line starting with DisplayCommandand the one starting with DisplayStopCommand.
so, yeah, no luck. :/
I'm also having the same issue on Lenovo legion 5 AMD+NVIDIA laptop. The "prime-offload" before "optimus-manager" runs the command successfully and also says it will switch to hybrid or Nvidia next login but it doesn't and after a reboot sane issue arises without any change in "/etc/X11/xorg.conf.d/10-optimus-manager.conf". Does anybody have any ideas on what to do next?
Same here, same setup.. This is over a year later.. I've tried the suggestions eg:
Manjaro ships with a default configuration for SDDM (the default login manager for KDE) which overrides some keys needed by optimus-manager. To use optimus-manager, you need to edit the file /etc/sddm.conf and simply put a # before the line starting with DisplayCommandand the one starting with DisplayStopCommand.
so, yeah, no luck. :/
Same here, same setup.
AMD+NVIDIA, Manjaro KDE
tried also with prime-offload
prime-offload && optimus-manager --switch hybrid
Switching to mode : hybrid
/bin/sh: line 1: i3-msg: command not found
/bin/sh: line 1: openbox: command not found
/bin/sh: line 1: awesome-client: command not found
/bin/sh: line 1: bspc: command not found
/bin/sh: line 1: qtile: command not found
/bin/sh: line 1: herbstclient: command not foun
and nothing happens
optimus-manager --status
A GPU switch from integrated to hybrid is pending.
Log out and log back in to apply.
Optimus Manager (Client) version 1.5
Current GPU mode : integrated
GPU mode requested for next login : hybrid
GPU at startup : integrated
Temporary config path: no
none of the above worked it just spits out [Xx_JXHN_xX@archlinux ~]$ prime-offload && optimus-manager --switch nvidia ERROR: the latest GPU setup attempt failed at Xorg pre-start hook. Log at /var/log/optimus-manager/switch/switch-20241005T140822.log Error parsing config file /var/lib/optimus-manager/tmp/config_copy.conf. Falling back to default config /usr/share/optimus-manager/optimus-manager.conf. Error is : File contains no section headers. file: '/var/lib/optimus-manager/tmp/config_copy.conf', line: 2 'switching=none\n' Cannot execute command because of previous errors. [Xx_JXHN_xX@archlinux ~]$
@THXRXAPXR Yours seems different: https://github.com/Askannz/optimus-manager/issues/583
Welp. After couple sleepless nights I came up with a "solution", rather the HINT.
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-goodies
No 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 plasma
and moved to XFC4 totally (+ switched to lighdm)
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!
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 runoptimus-manager --print-mode
, I get the following error:The log:
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!