The platform profile lives in /sys/firmware/acpi/platform_profile. The
desiredprof and defaultprof options correspond to the values for the
platform profile set when gamescope begins and ends, respectively.
HACK: The platform profile may restrict what values the governor can
take, so we choose to set the governor before the platform profile in
order to store the correct default governor, and restore the platform
profile before the governor. This is done to maximize correctness after
restoration, but it can cause issues if the previous platform profile
restricts the governor.
TODO: Save all the state we care about before any of it is changed. In
thsi case, we should set (and restore) the platform profile before the
governor.
Attribute the contributions made by members of the community, but avoid
unweildy and inconsistent copyright notices at the top of each file.
Existing contributor copyright notices have been left as-is.
Systemd commit [bf1b9ae487b65b1cb1639b222724fab95e508cf5](bf1b9ae487) (present in Systemd v254 and later) effectively broke gamemodelist as the process map for the `systemd --user` process became unreadable. After this change gamemodelist would exit with an error like the following:
```
awk: fatal: cannot open file `/proc/2281/maps' for reading: Permission denied
```
To work around this let's add a hook to the awk statement to skip any files that can't be read.
ClosesFeralInteractive/gamemode#456
Fixes this warning:
```
WARNING: You should add the boolean check kwarg to the run_command call.
It currently defaults to false,
but it will default to true in future releases of meson.
See also: https://github.com/mesonbuild/meson/issues/9300
```
Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
* New utility: gamemodelist
While trying out gamemode on Ubuntu 18.04 I had trouble figuring out
whether or not my games were running with gamemode enabled. I wrote this
utility which prints all processes loaded with the gamemode shared
library.
- [x] Added utility to `data/` folder.
- [x] Update meson installer.
- [x] Included section 1 manual.
- [x] Updated README for Ubuntu 18.04 build instructions. Steam supports
Ubuntu 18.04.
I'm open to feedback and generally this should work for any distrobution
since it makes use of the Linux `/proc` filesystem. [Learn more about
`/proc`][1].
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/filesystems/proc.rst?h=v5.15.12
Add a trivial gamemode.conf file, which creates the gamemode group.
v2: git add gamemode.conf (d'oh)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Honor prefix for installing gamemoderun to properly work in cross
environment so it can be installed in e.g. /usr/x86_64-pc-linux-gnu/bin
instead of /usr/bin like it's already done for gamemoded.