-
Notifications
You must be signed in to change notification settings - Fork 208
Description
Is your feature request related to a problem? Please describe.: It appears that gamemoded is always started (I'm running NixOS with programs.gamemode.enable = true) when I "log in" with a program, for every user. Some programs don't ever use/call it though (for example: Kodi).
It seems like Bus-activatable services are a thing
This is properly set in the bus file
| SystemdService=gamemoded.service |
Quoting the docs:
Example 7. DBus services
For services that acquire a name on the DBus system bus, use Type=dbus and set BusName= accordingly. The service should not fork (daemonize). systemd will consider the service to be initialized once the name has been acquired on the system bus. The following example shows a typical DBus service:
[Unit] Description=Simple DBus Service [Service] Type=dbus BusName=org.example.simple-dbus-service ExecStart=/usr/sbin/simple-dbus-service [Install] WantedBy=multi-user.targetFor bus-activatable services, do not include a [Install] section in the systemd service file, but use the SystemdService= option in the corresponding DBus service file, for example (/usr/share/dbus-1/system-services/org.example.simple-dbus-service.service):
[D-BUS Service] Name=org.example.simple-dbus-service Exec=/usr/sbin/simple-dbus-service User=root SystemdService=simple-dbus-service.servicePlease see systemd.kill(5) for details on how you can influence the way systemd terminates the service.
Describe the solution you'd like: Either removing the WantedBy=default.target or an explanation of why gamemoded doesn't work (well) as a bus service. I've tried to search for descriptions on historical commits and issues, but couldn't find it.
References:
- 7f26122
- @kira-bruneau explicitly re-added this in NixOS/nixpkgs@caac437#diff-6a3592ba79bc0f30ae14b265677f863aeb5c5d0801b5d7151fcf617fb634d256R68-R70, which makes me suspect it's somehow important.
Describe alternatives you've considered: Just let it be. It's OK. But I'm trying to minimize running processes that I don't (currently) require. I do use (and like) gamemode. It's just usally not necessary on my system.