Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't run the daemon #12

Closed
leillo1975 opened this issue Apr 10, 2018 · 11 comments
Closed

I can't run the daemon #12

leillo1975 opened this issue Apr 10, 2018 · 11 comments

Comments

@leillo1975
Copy link

@leillo1975 leillo1975 commented Apr 10, 2018

When I execute "sudo ./bootstrap.sh" I have the following error:
Failed to connect to bus: Non hai tal ficheiro ou directorio (in English: There is no such file or directory)

You can see the process in terminal:

sudo ./bootstrap.sh
+ meson --prefix=/usr build -Dwith-systemd-user-unit-dir=/etc/systemd/user
Trying to run Meson on a build directory that has already been configured.
If you want to build it, just run your build command (e.g. ninja) inside the
build directory. Meson will autodetect any changes in your setup and regenerate
itself as required. Though it shouldn't be necessary, running ninja reconfigure
will force Meson to regenerate the build files.

If you want to change option values, use 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/leo/gamemode/data/gamemoded.1 to /usr/share/man/man1
Installing /home/leo/gamemode/build/data/gamemoded.service to /etc/systemd/user
Installing /home/leo/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
Failed to connect to bus: Non hai tal ficheiro ou directorio

I use Ubuntu 17.10

@CasperAlant

This comment has been minimized.

Copy link

@CasperAlant CasperAlant commented Apr 10, 2018

Run without sudo. Only use ./bootstrap.sh.

@leillo1975

This comment has been minimized.

Copy link
Author

@leillo1975 leillo1975 commented Apr 10, 2018

Without sudo:

+ meson --prefix=/usr build -Dwith-systemd-user-unit-dir=/etc/systemd/user
Trying to run Meson on a build directory that has already been configured.
If you want to build it, just run your build command (e.g. ninja) inside the
build directory. Meson will autodetect any changes in your setup and regenerate
itself as required. Though it shouldn't be necessary, running ninja reconfigure
will force Meson to regenerate the build files.

If you want to change option values, use meson configure instead.
+ cd build
+ ninja
ninja: error: opening build log: Permission denied

@CasperAlant

This comment has been minimized.

Copy link

@CasperAlant CasperAlant commented Apr 10, 2018

The files you created when you ran sudo ./bootstrap is now owned by root and is preventing you from running the installer normally.
Suggestions:

  1. Try completing the installation manually:
systemctl --user daemon-reload
systemctl --user enable gamemoded
systemctl --user start gamemoded
systemctl --user status gamemoded
  1. Clean up. Remove the installer directory and reclone. Also remove any files created by the installer:
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/casper/Projects/gamemode/data/gamemoded.1 to /usr/share/man/man1
Installing /home/casper/Projects/gamemode/build/data/gamemoded.service to /etc/systemd/user
Installing /home/casper/Projects/gamemode/build/data/com.feralinteractive.GameMode.policy to /usr/share/polkit-1/actions

Also, I literally started using this library 20 minutes ago, so please take anything I say with a grain of salt.

@CasperAlant

This comment has been minimized.

Copy link

@CasperAlant CasperAlant commented Apr 10, 2018

Ignore my second suggestion. First one should work.

@leillo1975

This comment has been minimized.

Copy link
Author

@leillo1975 leillo1975 commented Apr 10, 2018

It works, thanks a lot!. Now when I use it with a game the governor is set in performance

@lemmy04

This comment has been minimized.

Copy link

@lemmy04 lemmy04 commented Apr 10, 2018

do i see this right? the daemon has to be built and run by the user who will run games?

... that is so not unix...

Please make it possible to install and run the daemon system wide, and have some control which users can talk to it, for example by limiting to members of a certain group.

@ikeydoherty

This comment has been minimized.

Copy link
Contributor

@ikeydoherty ikeydoherty commented Apr 10, 2018

@lemmy04 it is installable as a system wide daemon, operating on the system or user dbus socket, allowing it to run as root or user. Access control can be implemented manually with other measures such as confinement, or LSMs such as SMACK and SELinux, which I would argue fall well out of the scope of this daemon.

Also let's not pretend we're talking about UNIX here, this is for Linux.

@ikeydoherty

This comment has been minimized.

Copy link
Contributor

@ikeydoherty ikeydoherty commented Apr 10, 2018

Further, if you wanna run as a system wide "systemd-less" daemon, you can compile with -Dwith-systemd=false: https://github.com/FeralInteractive/gamemode/blob/master/meson_options.txt#L1

Note however you're better off just running with the defaults. You can tweak the CLI args to run it as you wish, but then lifecycle management is much more difficult. With the defaults you get a usermode daemon that you can start/stop easily with systemctl and log integration, and a minimised risk of privilege escalation as only the cpugovctl helper is actually run with an elevated uid.

Plus, user configs are becoming a thing. :)

@lemmy04

This comment has been minimized.

Copy link

@lemmy04 lemmy04 commented Apr 10, 2018

how do you tell it to install system wide, and use the system bus? on openSUSE when i build the "normal way" i get the same "no such file or directory" error when i try to start the daemon...

@mgrep

This comment has been minimized.

Copy link

@mgrep mgrep commented Apr 10, 2018

What advantage does this have in OpenSuse over the following command ?

sudo cpupower frequency-set -g performance

@mdiluz

This comment has been minimized.

Copy link
Contributor

@mdiluz mdiluz commented Apr 11, 2018

Closing this off as I have merged #13

@lemmy04 That sounds like a different issue to be reported separately.

@mgrep this will do that automatically for each game and will put the governor back afterward to save on energy. More details in the README

@mdiluz mdiluz closed this Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.