Problem with prime-run

I don’t have a xorg.conf file in my X11 directory :confused:

cd /etc/X11 && ls -a
.  ..  mhwd.d  xinit  xorg.conf.d

You have optimus-manager? If so, then you need to switch to “hybrid” mode for prime-run to work.

@whitecastle

Looks like optimus-manager has renamed:

/etc/X11/xorg.conf.d/90-mhwd.conf.bak

you use this one:

/etc/X11/xorg.conf.d/10-optimus-manager.conf

10 has a higher priority than 90 and therefore it uses the 10-optimus-manager.conf, but there is no nvidia gpu written, but in 90-mhwd.conf.bak… do you see it?

Ok I see! Yes I didn’t remember I have optimus-manager. And Indeed I cannot switch to hybrid mode directly

optimus-manager --switch hybrid

ERROR: a GPU setup was initiated but Xorg post-start hook did not run.
Log at /var/log/optimus-manager/switch/switch-20210322T094629.log
If your login manager is GDM, make sure to follow those instructions:
https://github.com/Askannz/optimus-manager#important--gnome-and-gdm-users
If your display manager is neither GDM, SDDM nor LightDM, or if you don't use one, read the wiki:
https://github.com/Askannz/optimus-manager/wiki/FAQ,-common-issues,-troubleshooting
Cannot execute command because of previous errors.

Should I remove optimus-manager then? Or modify 10-optimus-manager.conf?

Run prime-offload and try again.

It didn’t work

What’s in /etc/optimus-manager/optimus-manager.conf?

there is no optimus-manager.conf in /etc/optimus-manager/

ls -a /etc/optimus-manager/
.   nvidia-disable.sh  xorg              xsetup-integrated.sh
..  nvidia-enable.sh   xsetup-hybrid.sh  xsetup-nvidia.sh

Do you get any output when you run prime-offload?

prime-offload
[5] INFO: # Xorg post-start hook
[1180] INFO: Running /etc/optimus-manager/xsetup-integrated.sh
[1196] INFO: Writing state {'type': 'done', 'switch_id': '20210322T094629', 'current_mode': 'integrated'}
[1197] INFO: Xorg post-start hook completed successfully.

And when you run optimus-manager --switch hybrid you get the exact same error?

Oh yes I am able to switch now

optimus-manager --switch hybrid
WARNING : no power management option is currently enabled (this is the default since v1.2). Switching between GPUs will work but you will likely experience poor battery life.
Follow instructions at https://github.com/Askannz/optimus-manager/wiki/A-guide--to-power-management-options to enable power management.

You are about to switch GPUs. This will forcibly close all graphical sessions and all your applications WILL CLOSE.
(you can pass the --no-confirm option to disable this warning)
Continue ? (y/N)

So I switched but now the display is like super slow on my external monitor

Yes, that’s a known issue. Try optimus-manager --switch nvidia.

Ok so it seems that I could switch from integrated to hybrid (I am not even sure actually, I didn’t do optimus-manager --status). But now I am not able to switch to nvidia. I just keep logging in and out but optimus-manager --status keeps printing

A GPU switch from integrated to nvidia is pending.
Log out and log back in to apply.
Optimus Manager (Client) version 1.4

Current GPU mode : integrated
GPU mode requested for next login : nvidia
GPU at startup : integrated
Temporary config path: no

maybe I do not log out correctly

Maybe I should just remove optimus-manager…

1 Like

Do you use KDE? You need an additional step when you install optimus manager to make it work.

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 DisplayCommand and the one starting with DisplayStopCommand.

Also with GNOME:

The default gdm package from the Archlinux and Manjaro repositories is not compatible with optimus-manager, so you must replace it with this patched version : gdm-prime (also replaces libgdm). The patch was written by Canonical for Ubuntu and simply adds two script entry points specifically for Prime switching. The package is otherwise identical to the official one.

So I simply uninstalled optimus-manager and now I am able to use prime-run correctly. Thank you all for your help

optimus-manager is awesome to manage GPUs, but sometimes it could be troubling. In your case uninstalling it would be the first thing to do, fix the problems on the default hybrid setup (if any) and then go back to optimus-manager if there would be still a need for it.

I wrote an optimus-manager guide that still resides on the old Manjaro forum. I haven’t ported it here because of lack of time:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.