However, when I try to launch optimus, this what I get :
$ optimus-manager --switch integrated
ERROR: a GPU setup was initiated but Xorg post-start hook did not run.
Log at /var/log/optimus-manager/switch/switch-20230202T225208.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
This might not be related to Gnome, but I need to start somewhere. Does anyone know what I might try to do to fix that ? I’ve followed the steps of the tutorial (with gdm-prime and removing the #,etc.)
You can check this post. You can switch in the login screen (select bottom right settings icon) and choose between xorg/X11 or Wayland. You should try Xorg.
Ok. Gnome defaults to Wayland (and one can select Xorg) unless you have Nvidia graphics, then it uses Xorg/X11 per default and no Wayland option is displayed. As I recall.
I was just checking, I think you can exclude Wayland as your problem as you are running the right session, as you can see in the hardware output above.
Honestly I only had problems with hybrid Intel/Nvidia, Optimus etc. and decided to switch to only Nvidia GPU when necessary in the bios settings (select only discrete GPU). Downside it uses more battery then.
Edit: If you want to go that route (using only discrete GPU) you need to blacklist the nouveau driver else you may boot into black screen.
The default gdm package from the Archlinux 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.
Gnome launches Wayland sessions by default, which are incompatible with optimus-manager. To force Xorg sessions, You need to edit the file /etc/gdm/custom.conf and remove the # before the line #WaylandEnable=false.
Because nouveau may conflict with Nvidia driver and load instead. You can try first switching to Nvidia only (from hybrid to discrete) in bios. Try rebooting and see if it works.
If not, here how to do it in Grub.
If you use systemd boot (default on recent eos Cassini iso), I don’t know how to proceed.
Backup your stuff first. If you boot to black screen, no panic, you can undo this and/or always switch to TTY and troubleshoot things. Additional infos…
Remember, Nvidia and Wayland do not work well together if at all.Thats why on Pop OS for example you are automatically brought into Xorg session at login with Nvidia graphics.
As I was looking at Steam because I had trouble launching gales with proton, I’ve tried running Steam from the terminal as I’ve read it may give me additional data in case of errors.
And it seems that Xorg with not be working well, although I don’t understand why
This, for example, was what the terminal told me when I tried to launch steam-runtime :
Could not connect to X session manager: None of the authentication protocols specified are supported
Could not connect to X session manager: None of the authentication protocols specified are supported
Xlib: sequence lost (0x10000 > 0x127) in reply type 0x21!
Xlib: sequence lost (0x10000 > 0x17f) in reply type 0xc!
(steam:37481): Gtk-WARNING **: gtk_disable_setlocale() must be called before gtk_init()
vkCreateInstance failed with error -1
BInit - Unable to initialize Vulkan!
local (potentially out of sync) copy of roaming config loaded - 379 bytes.
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe
BRefreshApplicationsInLibrary 1: 1ms
roaming config store loaded successfully - 379 bytes.
migrating temporary roaming config store
And also, the terminal repeats this indefinitely at the end :
Xlib: sequence lost (0x10000 > 0x2a0c) in reply type 0xc!
Xlib: sequence lost (0x10000 > 0x2a0f) in reply type 0xc!
Xlib: sequence lost (0x10000 > 0x2a0c) in reply type 0xc!
Xlib: sequence lost (0x10000 > 0x2a0f) in reply type 0xc!
Now, I’m really beginning to learn how to read logs like this and my only hint is that there is a problem here ^^'. But I cannot get what ? Is it possible that I’m missing something for Xorg to run normally ? Or is this completely unrelated to the original problem ?
My point was only that Nvidia and Wayland are a no go, or at least it was like that in the past ± two years. Nvidia hybrid can be a pain to troubleshoot. It’s good you are courageous and patient to fix it!
Recently I was surprised when trying to run my nvidia 540M card from Waylnad that it works.
And maybe for the subject author’s card, could you try using a bumblebee? I don’t want to be misunderstood, just asking