gamemode
gamemode copied to clipboard
Gamemode fails to start on Gentoo Linux
Describe the bug
Running gamemoded -t
fails with: ERROR: gamemode_query_status failed to return other client connected (expected 1)!
Running a game with gamemode either causes a crash or a memory leak.
To Reproduce
Run gamemoded -t
or start a game with gamemode.
Expected behavior Gamemode shouldn't fail.
System Info (please complete the following information):
- OS and version: Gentoo Linux, kernel: 5.16.0-gentoo
- GameMode Version: 1.6.1 and 9999 (pulled directly from github)
Additional context
Full output of gamemoded -t
:
: Loading config
Loading config file [/usr/share/gamemode/gamemode.ini]
: Running tests
:: Basic client tests
:: Passed
:: Dual client tests
gamemode request succeeded and is active
Quitting by request...
:: Passed
:: Gamemoderun and reaper thread tests
ERROR: gamemode_query_status failed to return other client connected (expected 1)!
...Waiting for child to quit...
...Waiting for reaper thread (reaper_frequency set to 5 seconds)...
:: Supervisor tests
:: Passed
: Client tests failed, skipping feature tests
: Tests Failed!
Same issue for me.
OS and version: Gentoo Linux, kernel: 5.15.11-gentoo
GameMode Version: 1.6.1
I get the same error on my system. When I add gamemode to Proton, the game starts with a black screen and nothing else.
gamemode version: v1.6.1
$ cat /proc/version Linux version 5.9.16-zen (root@laptop) (gcc (Gentoo 10.3.1_p20211126 p0) 10.3.1 20211126, GNU ld (Gentoo 2.37_p1 p1) 2.37) #2 ZEN SMP PREEMPT Wed Jan 12 15:42:34 EST 2022
Same issue on Artix Linux. Kernel: 5.16.8-xanmod1-1 Gamemode: 1.6.1-1
Same issue on Tumbleweed Gamemode: 1.6.1-25.32 Kernel: 5.16.15-1
I got it to reproduce (kernel 5.15.48-gentoo-dist, gamemode 1.6.1) and will see if I can try to debug the issue.
update: I'm not very skilled with gdb so this might be very slow. update2: on a vm it's surprisingly annoying to have to deal with mouse desync update3: i gave up, complications between gdb and vm mouse desync and everything, and anyway people may have already found the cause (see below)
I get the same thing even after building with elogind and using 1.7
This is probably because systemd is a requirement to bulid gamemode, but building with elogind should fix that so I expect that there are just errors in the build process. There are still some things to try out though so I'll continue experimenting.
"Maybe you have missing a dbus user session, how are you running your wm/DE? with a DM? xinitrc? If with xinitrc, make sure the last line is exec dbus-run-session
I tried it and it still does not work on my system.
cc @chewi @kakra
FWIW both 1.6.1 and 1.7 have been working fine for me on Gentoo. I use it regularly. My system uses elogind.
I get exactly the same output from env -u DBUS_SESSION_BUS_ADDRESS gamemoded -t
, which effectively nobbles the D-Bus environment. In short, either you're not using D-Bus or you're not running in a D-Bus environment. If the DBUS_SESSION_BUS_ADDRESS
variable is not present from running via dbus-run-session
or similar (most desktops will do this for you) then this is just not going to work. Plenty of other things will be broken too.
@chewi It works fine here in Gentoo: running gamemode-simulate-game
successfully triggers the service via dbus. But I don't use elogind
but rather systemd
with dbus-broker
installed and properly configured.
But I can image that the graphical session is not properly launching a session bus but maybe a user bus? I think the latter configuration mode has been deprecated for a while.
# busctl --user list | grep gamemode
:1.222 819559 gamemoded kakra :1.222 [email protected] - -
:1.223 819559 gamemoded kakra :1.223 [email protected] - -
:1.224 819559 gamemoded kakra :1.224 [email protected] - -
com.feralinteractive.GameMode 819559 gamemoded kakra :1.222 [email protected] - -
On Gentoo, there should be an executable file /etc/X11/xinit/xinitrc.d/80-dbus
which launches the dbus session. Depending on how you start your session, it may work more or less well (e.g. graphical login vs. startx from text console).
BTW I can confirm that using dbus-run-session sway instead of sway works fine.
On Aug 7, 2022, at 7:03 AM, Kai Krakow @.***> wrote:
@chewi It works fine here in Gentoo: running gamemode-simulate-game successfully triggers the service via dbus. But I don't use elogind but rather systemd with dbus-broker installed and properly configured.
But I can image that the graphical session is not properly launching a session bus but maybe a user bus? I think the latter configuration mode has been deprecated for a while.
busctl --user list | grep gamemode
:1.222 819559 gamemoded kakra :1.222 @.*** - - :1.223 819559 gamemoded kakra :1.223 @.*** - - :1.224 819559 gamemoded kakra :1.224 @.*** - - com.feralinteractive.GameMode 819559 gamemoded kakra :1.222 @.*** - - On Gentoo, there should be an executable file /etc/X11/xinit/xinitrc.d/80-dbus which launches the dbus session. Depending on how you start your session, it may work more or less well (e.g. graphical login vs. startx from text console).
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.