nestriness / nestri

[Experimental] An open-source, self-hosted Geforce Now alternative
https://nestri.io
GNU Affero General Public License v3.0
1.49k stars 25 forks source link

[🐛 Bug] Enigo causes gamescope to quit #67

Open wanjohiryan opened 4 months ago

wanjohiryan commented 4 months ago

I am getting an error, whereby, if the warp-input server is connected to the frontend, and running /usr/games/gamescope cannot start.

The error i get is:

netris@f303b471529c:~$ /usr/games/gamescope -- vkcube
wlserver: [backend/headless/backend.c:68] Creating headless backend
gamescope: ../src/wlserver.cpp:1413: void wlserver_key(uint32_t, bool, uint32_t): Assertion `wlserver.wlr.virtual_keyboard_device != nullptr' failed.
Aborted

And after disconnecting from the input session, you get:

wlserver: [wayland] error: XDG_RUNTIME_DIR is invalid or not set in the environment

You have to ait long enough for the warp-input server to go into the "retry loop" before you can start gamescope.

djpremier commented 4 months ago

Hi @wanjohiryan,

For reference: https://github.com/ValveSoftware/gamescope/issues/661 https://github.com/ValveSoftware/gamescope/issues/497

wanjohiryan commented 4 months ago

Hi @djpremier

Those are really nice references. From your link[1] I believe it has to be something to do with gamescope cannot "read" the fake keyboard and mouse input from enigo.

So, a patch would be to kill warp-input each time gamescope is called. Or figure out how to run it in privileged mode.