677 Commits

Author SHA1 Message Date
Henrik Holst
32a0b5b636 added the cpu core parking/pinning settings
added the cpu core parking/pinning settings to gamemode-config.c
2023-12-04 14:18:38 +00:00
Henrik Holst
520dc85ac3 updated meson.build to build common-cpu
added build info for common-cpu to meson
2023-12-04 14:18:38 +00:00
Henrik Holst
82206534dc Added common-cpu.c and common-cpu.h
Added common files for the cpu core parking/pinning functionality
2023-12-04 14:18:38 +00:00
Ahsan Fayaz
1f28880509 Update copyright year and project list
PolyMC died and most of the active devs created a fork, Prism Launcher
2023-05-23 11:37:01 +01:00
8lendzior
8cfc345312 issue #384, #399
I have fixed the issues by implementing this change before running the script
2023-03-02 11:27:44 +00:00
Hugo Locurcio
7cf59587ce Document some configuration files not allowing [gpu] changes
This also reorders the list from highest to lowest priority,
which is generally more commonly used.
2023-03-02 11:25:52 +00:00
MrAkells
f5882d5158 Update README.md 2023-03-02 11:25:25 +00:00
James Le Cuirot
06f01938a9 Fix typo in gamemodelist man page 2022-10-04 15:44:23 +01:00
James Le Cuirot
71f4b875ce Only install gamemoderun if shared libgamemodeauto is built
Otherwise emit a warning.
2022-10-04 15:44:23 +01:00
James Le Cuirot
b103bfdd60 Don't force installation of static libgamemodeauto
Defining the library with `library` rather than `both_libraries` allows the user
to choose which type they want to install using `-Ddefault_library`.

Closes: https://github.com/FeralInteractive/gamemode/issues/287
2022-10-04 15:44:23 +01:00
ashuntu
4cffdef805 Removed blank line 2022-09-14 17:57:49 +01:00
ashuntu
3f969bbf1f Fix env edgecase 2022-09-14 17:57:49 +01:00
ashuntu
1ca2daf47f Make more readable 2022-09-14 17:57:49 +01:00
ashuntu
179d5432e4 Add snap support 2022-09-14 17:57:49 +01:00
Nyikos Zoltán
4934191b19 Fix building when pidfd_open is available
On glibc2.36 pidfd_open was made available, but it needs an include
2022-08-12 15:54:57 +01:00
Kira Bruneau
55b799e3df Add option to specific PAM limits.d directory 2022-08-05 11:35:24 +01:00
Kira Bruneau
337f1b8a8e Scope polkit actions to require the privileged group 2022-08-05 11:35:24 +01:00
Kira Bruneau
898ab01924 Organize data files that hook into other packages 2022-08-05 11:35:24 +01:00
Kira Bruneau
1e24067430 Add option to specify privileged gamemode group 2022-08-05 11:35:24 +01:00
Kira Bruneau
e34e9c5a43 Add options to disable installing systemd specific files 2022-08-05 11:35:24 +01:00
Kira Bruneau
aee9703872 Add option to set systemd sysuser dir 2022-08-05 11:35:24 +01:00
Ahsan Fayaz
4dc99dff76 Specify correct inih directory after update to r54 1.7 2022-07-21 15:24:10 +01:00
Ahsan Fayaz
5fff74598a Use inih r54 from wrapdb
Updated using the command 'meson subprojects update'.
2022-07-21 15:21:25 +01:00
Ahsan Fayaz
c3d638d7ce Update version to 1.7 2022-07-21 15:03:58 +01:00
Ahsan Fayaz
86591acdf2 Update version references to 1.7 2022-07-21 15:03:34 +01:00
Ahsan Fayaz
618466005e Add changes for 1.7 2022-07-21 15:03:05 +01:00
Ahsan Fayaz
f5a715e124 Add recent Feral titles to the list of games 2022-07-20 11:50:53 +01:00
Ahsan Fayaz
f498f2a20a Update copyright year to 2022 2022-07-20 11:48:56 +01:00
Stephan Lachnit
9b44fc6def ci: fix static analyser with assertions
Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
2022-07-15 14:17:38 +01:00
Stephan Lachnit
b58b32072a meson: fix warning in run_command
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>
2022-07-15 14:16:09 +01:00
Alfred Persson Forsberg
f50e7fffe7 Fix build on musl libc
This simple patch includes signal.h in daemon/gamemode-context.c to fix building gamemode on musl
libc.

This has been tested Gentoo musl and Alpine (also Gentoo glibc to
ensure no multiple defined symbols/other errors for glibc).

> ../daemon/gamemode-context.c: In function 'game_mode_context_auto_expire':
> ../daemon/gamemode-context.c:421:29: error: implicit declaration of function 'kill' [-Werror=implicit-function-declaration]
>   421 |                         if (kill(client->pid, 0) != 0) {
>       |                             ^~~~
> ../daemon/gamemode-context.c:421:29: warning: nested extern declaration of 'kill' [-Wnested-externs]

Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>
2022-07-15 14:14:16 +01:00
Issam Maghni
fac33baa09 Simplify the offload command
The POSIX env [1] supports multiple `name=value` operands.
So I merged them into one.

[1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/env.html
2022-07-15 14:13:09 +01:00
Gregory keenan
e7dcf8792d Update README.md
Minor update on language
2022-07-15 14:12:14 +01:00
Gregory keenan
db1a0e3ace Update README.md
Added a section in the Build and Install section to test if its working correctly.
2022-07-15 14:12:14 +01:00
gouchi
01b849a518 README.md: add RetroArch to other apps section
[Source](https://github.com/libretro/RetroArch/pull/13339)
2022-07-15 14:11:23 +01:00
Sam Gleske
b8fa857b35 Fix GitHub Actions Static Analyzer Check
Dockerfile
----------

This dockerfile was used to emulate GitHub actions.

<details><summary>Dockerfile source (click to expand)</summary>

```dockerfile
FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive

RUN set -ex; \
apt-get update; \
apt-get install -y build-essential meson appstream clang clang-format clang-tools libdbus-1-dev libinih-dev libsystemd-dev git

RUN set -ex; \
yes | adduser ci-user

USER ci-user
```

</details>

Commands to reproduce
---------------------

I simulated GitHub actions with a local docker environment.

    docker build -t ci .

I ran the following commands to reproduce the issue so that I could bugfix the static analyzer script.

```bash
docker run -e CI=true --rm -v "$PWD:$PWD" -w "$PWD" --init ci ./scripts/static-analyser-check.sh
docker run -e CI=true --rm -v "$PWD:$PWD" -w "$PWD" --init ci ./bootstrap.sh -Dwith-examples=true
docker run --rm -v "$PWD:$PWD" -w "$PWD" --init ci meson test -C builddir
docker run --rm -v "$PWD:$PWD" -w "$PWD" --init ci dbus-run-session -- gamemode-simulate-game
docker run --rm -v "$PWD:$PWD" -w "$PWD" --init ci ./scripts/static-analyser-check.sh
```

All commands reuse the same workspace which is how it works in GH actions.

Legitimate bugs
---------------

Now the error displayed in build failure appears to be a legitimate bug.  Four were found related to null pointer dereference.  I'm not fixing the bug but the check should work properly for those who do.

If you following my docker setup in this description you can view the bug report by starting the report server.

```bash
docker run -p 127.0.0.1:8181:8181 -it --rm -v "$PWD:$PWD" -w "$PWD" --init ci scan-view --host 0.0.0.0 --allow-all-hosts builddir/meson-logs/scanbuild/*
```

After the report server is started you can visit `http://127.0.0.1:8181/` to view the bugs.

Screenshot of report
--------------------

![Screenshot of bug report](https://user-images.githubusercontent.com/875669/155830028-473db1ea-7c98-4a82-bc3a-290d5c155108.png)
2022-03-10 10:40:45 +00:00
Sam Gleske
23493e5cc3 Fix GitHub Actions Format Check
This change fixes the format check in GitHub actions ran by `clang-format`.

Dockerfile

```dockerfile
FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive

RUN set -ex; \
apt-get update; \
apt-get install -y build-essential meson appstream clang clang-format clang-tools libdbus-1-dev libinih-dev libsystemd-dev git

RUN set -ex; \
yes | adduser ci-user

USER ci-user
```

Environment setup

```bash
sudo su -g docker $USER
docker build -t ci .
```

clang-format fix

```bash
docker run -e CI=true --rm -v "$PWD:$PWD" -w "$PWD" --init ci ./scripts/format-check.sh
```
2022-02-21 09:51:59 +00:00
Sam Gleske
c96f7379b4
New utility: gamemodelist (#346)
* 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
2022-02-21 09:50:57 +00:00
Emil Velikov
898feb9c52 data: add and install sysusers.d gamemode.conf
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>
2022-02-03 16:50:29 +00:00
Stephan Lachnit
ab06ba419e Switch to GitHub Actions
Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
2022-02-03 16:40:02 +00:00
Stephan Lachnit
6c60565f33 Format files according to clang-format
Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
2022-02-03 16:40:02 +00:00
Kira Bruneau
5e366bd55d Fix loading shipped config when using a prefix other than /usr
Also remove recommendation to modify `/usr/share/gamemode/gamemode.ini`.
`/usr/share` is intended to contain read-only data files.

See https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s11.html.
2022-02-03 16:02:18 +00:00
Kira Bruneau
126e67fb6b Run executables from PATH instead of /usr/bin
Not all distributions install non-system binaries into /usr/bin. For
example, NixOS installs packages to /nix/store using a unique hash
generated from the inputs used to build it:

/nix/store/jld7jh3ilvbg91zvn1bdyawfc55b9jk8-polkit-0.118-bin/bin/pkexec
2022-02-03 15:42:22 +00:00
Patrick Pulfer
4000a32584 Documentation: Add GCC dependency to Ubuntu installation guide 2021-05-24 11:27:27 +01:00
Ahsan Fayaz
b11d2912e2 Update inih version in CHANGELOG.md 1.6.1 2021-02-18 19:00:12 +00:00
Ahsan Fayaz
0344e7c311 Specify the correct inih subproject directory. 2021-02-18 18:52:59 +00:00
Ahsan Fayaz
993857d0e8 Use inih r53 from wrapdb. Updated using the command 'meson subprojects update'. 2021-02-18 18:42:08 +00:00
Ahsan Fayaz
5fd0065df6 Update version to 1.6.1 2021-02-18 18:39:53 +00:00
Ahsan Fayaz
6592c2229c Update version references to 1.6.1 2021-02-16 16:12:29 +00:00
Ahsan Fayaz
05a4c0c152 Add changes for 1.6.1 2021-02-16 16:11:59 +00:00