jorgicio / jorgicio-gentoo-overlay

Gentoo Overlay made by Jorgicio.
100 stars 50 forks source link

x11-misc/optimus-manager: can't work in Gentoo #241

Closed PetrusZ closed 4 years ago

PetrusZ commented 4 years ago

I'm using lightdm and i3. optimus-manager can't switch gpu.

➜ optimus-manager --status
ERROR: a GPU setup was initiated but Xorg post-start hook did not run.
Log at /var/log/optimus-manager/switch/switch-20200624T234730.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.

And there is something wrong with /etc/lightdm.conf.d/20-optimus-manager.conf:

➜ ag display-setup-script= /etc/lightdm.conf.d
/etc/lightdm.conf.d/20-optimus-manager.conf
4:display-setup-script=/sbin/prime-offload

prime-offload is in /usr/bin/prime-offload, instead of /sbin/prime-offload.

But even after set the right path in /etc/lightdm.conf.d/20-optimus-manager.conf, the error still same with before.

PetrusZ commented 4 years ago

lightdm.conf.d/20-optimus-manager.conf install to wrong path too.

jorgicio commented 4 years ago

Hi. I tried to fix what I could.

While doing that, I read what is mentioned in the optimus-manager git repo. Quoting:

Only Archlinux and Archlinux-based distributions (such as Manjaro) are supported for now. Only Xorg sessions are supported (no Wayland).

I don't know what they manage the power in respect of Gentoo, but anyways, I'll leave this issue opened just in case it's still failing.

PetrusZ commented 4 years ago

Thanks @jorgicio . I can confirm optimus-manager works on my system. I have modified it a little to fit my amd iGPU need.

However, I have some questions about files in x11-misc/optimus-manager/files/scripts. Where those file come from? I checked arch optimus-manager package, but didn't see those files. And what does those files do?

jorgicio commented 4 years ago

Those scripts are taken from 1.2.2 of optimus-manager because since 1.3, those scripts are removed, although being referienced in the desktop manager config files and the systemD service. So I added them back just in case.

Those scripts allow to run the binaries easily.

PetrusZ commented 4 years ago

OK, thanks again. Close this issue for now.