Error: gamemode not work in ubuntu 16.04
`bruno@brunobook:~/.gamemode/gamemode$ ./bootstrap.sh
- meson --prefix=/usr build -Dwith-systemd-user-unit-dir=/etc/systemd/user Directory already configured, exiting Meson. Just run your build command (e.g. ninja) and Meson will regenerate as necessary. If ninja fails, run ninja reconfigure to force Meson to regenerate.
If build failures persist, manually wipe your build directory to clear any stored system data.
To change option values, run meson configure instead.
- cd build
- ninja ninja: no work to do.
- set +x Install to /usr? [Yy] y
- sudo ninja install [0/1] Installing files. Installing lib/libgamemode.so to /usr/lib/x86_64-linux-gnu/libgamemode.so Installing lib/libgamemodeauto.so to /usr/lib/x86_64-linux-gnu/libgamemodeauto.so Installing daemon/gamemoded to /usr/bin/gamemoded Installing daemon/cpugovctl to /usr/libexec/cpugovctl Installing gamemode_client.h to /usr/include/ Installing /home/bruno/.gamemode/gamemode/data/gamemoded.1 to /usr/share/man/man1 Installing /home/bruno/.gamemode/gamemode/build/data/gamemoded.service to /etc/systemd/user Installing /home/bruno/.gamemode/gamemode/build/data/com.feralinteractive.GameMode.policy to /usr/share/polkit-1/actions
- set +x Enable and run the daemon? [Yy] y
- systemctl --user daemon-reload
- systemctl --user enable gamemoded
- systemctl --user start gamemoded Failed to start gamemoded.service: Unit dbus.socket is not loaded properly: Invalid argument. See user logs and 'systemctl --user status gamemoded.service' for details. bruno@brunobook:~/.gamemode/gamemode$ systemctl --user status gamemoded.service ● gamemoded.service - gamemoded Loaded: loaded (/etc/systemd/user/gamemoded.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Ter 2018-04-10 11:15:17 -03; 1h 6min ago Main PID: 1337 (code=exited, status=1/FAILURE)
Abr 10 11:15:17 brunobook systemd[1330]: Starting gamemoded... Abr 10 11:15:17 brunobook /usr/bin/gamemoded[1337]: Note: No config file found [gamemode.ini] in working directory or in [/usr/share/gamemode/] Abr 10 11:15:17 brunobook /usr/bin/gamemoded[1337]: governor is set to [performance] Abr 10 11:15:17 brunobook systemd[1330]: gamemoded.service: Main process exited, code=exited, status=1/FAILURE Abr 10 11:15:17 brunobook systemd[1330]: Failed to start gamemoded. Abr 10 11:15:17 brunobook systemd[1330]: gamemoded.service: Unit entered failed state. Abr 10 11:15:17 brunobook systemd[1330]: gamemoded.service: Failed with result 'exit-code'. `
apt-get install dbus-user-session
I cant remember what service you need to restart, so simply reboot and it should work.
Not work. Result:
`gamemoded.service - gamemoded Loaded: loaded (/etc/systemd/user/gamemoded.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Ter 2018-04-10 15:04:44 -03; 48s ago Process: 1368 ExecStart=/usr/bin/gamemoded -l (code=exited, status=1/FAILURE) Main PID: 1368 (code=exited, status=1/FAILURE)
Abr 10 15:04:44 brunobook systemd[1347]: Starting gamemoded... Abr 10 15:04:44 brunobook /usr/bin/gamemoded[1368]: governor is set to [performance] Abr 10 15:04:44 brunobook systemd[1347]: gamemoded.service: Main process exited, code=exited, status=1/FAILURE Abr 10 15:04:44 brunobook systemd[1347]: Failed to start gamemoded. Abr 10 15:04:44 brunobook systemd[1347]: gamemoded.service: Unit entered failed state. Abr 10 15:04:44 brunobook systemd[1347]: gamemoded.service: Failed with result 'exit-code'. bruno@brunobook:~$ LD_PRELOAD=/usr/$LIB/libgamemodeauto.so glxgears gamemodeauto: Could not call method on bus: No route to host`
Abr 10 15:04:44 brunobook /usr/bin/gamemoded[1368]: governor is set to [performance]
Abr 10 15:04:44 brunobook systemd[1347]: gamemoded.service: Main process exited, code=exited, status=1/FAILURE
Something is going wrong between these two prints, but it would appear we didn't print out what...
From the dbus-monitor, this is what I get:
error time=1525715588.235701 sender=org.freedesktop.DBus -> destination=:1.574 error_name=org.freedesktop.DBus.Error.ServiceUnknown reply_serial=2
string "The name com.feralinteractive.GameMode was not provided by any .service files"
signal time=1525715588.236549 sender=org.freedesktop.DBus -> destination=:1.574 serial=51 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
The service is running as expected:
systemctl --user status gamemoded
Output:
systemctl --user status gamemoded
● gamemoded.service - gamemoded
Loaded: loaded (/etc/systemd/user/gamemoded.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2018-05-07 20:35:58 EAT; 26min ago
Main PID: 3082 (gamemoded)
Status: "GameMode is ready to be activated."
CGroup: /user.slice/user-1000.slice/[email protected]/gamemoded.service
└─3082 /usr/bin/gamemoded -l
May 07 20:35:58 phantom systemd[3076]: Starting gamemoded...
May 07 20:35:58 phantom /usr/bin/gamemoded[3082]: governor is set to [powersave]
May 07 20:35:58 phantom /usr/bin/gamemoded[3082]: Successfully initialised bus with name [com.feralinteractive.GameMode]...
May 07 20:35:58 phantom systemd[3076]: Started gamemoded.
May 07 20:41:59 phantom systemd[3076]: Started gamemoded.
May 07 21:02:45 phantom systemd[3076]: Started gamemoded.
Platform information:
lsb_release -a
LSB Version: core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:printing-9.20160110ubuntu0.2-amd64:printing-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
I think I remember some distributions patching out the user session bus of systemd... Or the user mode of systemd altogether. Maybe this is part of the problem?