Daniel Martinez
1c293d7818
use posix basename to fix build on musl
...
glibc provides a nonstandard basename implementation,
this can be overriden and posix basename can be used
by includeing libgen.h, however musl only has posix
basename, and must always include libgen.h
In this particular case, it doesn't appear that using
the posix version of basename will cause any issues,
as it is simply being used to match a hardcoded config
file name.
2024-03-27 10:17:17 +00:00
Reilly Brogan
9646f2bd93
gamemodelist: Fix unreadable process maps
...
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.
Closes FeralInteractive/gamemode#456
2024-03-27 10:16:28 +00:00
Jrelvas
8e0a71a0bc
README: Add Vinegar to apps list
...
Vinegar is a bootstrapper for Roblox Player and Roblox Studio. It uses gamemode for both by default.
2024-02-14 10:37:00 +00:00
Trial97
3fa41891cf
Fixed crash if dbus is not accesible
...
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
2024-02-14 10:33:22 +00:00
patatahooligan
8cea4c2418
Fix hybrid CPU core pinning
...
Previously the condition would always evaluate to `false`. With the fix
any core with >=95% of `max_freq` will be added to the set of cores to
keep.
2024-01-03 11:09:13 +00:00
Kostadin Shishmanov
4a82094c98
Fix build with musl
...
Fixes the following build failure:
In file included from ../common/common-cpu.c:32:
../common/common-cpu.h:44:9: error: unknown type name 'cpu_set_t'
44 | cpu_set_t *online;
| ^~~~~~~~~
../common/common-cpu.h:45:9: error: unknown type name 'cpu_set_t'
45 | cpu_set_t *to_keep;
| ^~~~~~~~~
Signed-off-by: Kostadin Shishmanov <kocelfc@tutanota.com>
2024-01-03 10:54:40 +00:00
Ahsan Fayaz
5180d89e66
Update version to 1.8.1
1.8.1
2023-12-12 16:02:49 +00:00
Vamist
e82e9dafd0
[fix] polkit parse error caused by an extra )
2023-12-11 09:14:05 +00:00
Ahsan Fayaz
bb40374067
Update version number in README.md
1.8
2023-12-06 17:11:07 +00:00
Ahsan Fayaz
c3b9d4ce8b
Update changelog and version for 1.8
2023-12-06 17:06:52 +00:00
Ahsan Fayaz
070216ad81
Update copyright year
2023-12-06 17:06:51 +00:00
Ahsan Fayaz
6b03bc9354
Sort list of supported apps
2023-12-06 17:06:51 +00:00
Ahsan Fayaz
5867058d19
Add packagecache to .gitignore
2023-12-06 17:06:51 +00:00
Ahsan Fayaz
49dc7ee49b
Add --reset flag to meson subprojects update
...
This prevents us from exiting early, as meson will return non zero.
2023-12-06 17:06:51 +00:00
Henrik Holst
41191dc607
Update gamemode-context.c
...
check format wined again, looks like I'm really bad at this
2023-12-05 11:31:16 +00:00
Henrik Holst
22001c56b1
Update gamemode-config.c
...
fixed format to match the proper codingstyle
2023-12-05 11:31:16 +00:00
Henrik Holst
088639e8b2
Update gamemode-context.c
...
fixed format to match the proper codingstyle
2023-12-05 11:31:16 +00:00
Henrik Holst
9e21ac3924
Update gamemode-context.c
...
fixed format to match the proper codingstyle
2023-12-05 11:31:16 +00:00
Henrik Holst
e2e8e981a2
Update gamemode-config.c
...
fixed format to match the proper codingstyle
2023-12-05 11:31:16 +00:00
Henrik Holst
7389d5ed1d
Update procsysctl.c
...
fixed format to match the proper codingstyle
2023-12-05 11:31:16 +00:00
Henrik Holst
162374c026
Create procsysctl.c
...
added a new pkexec helper to modify values in /proc/sys, currently only can do writes to /proc/sys/kernel/split_lock_mitigate
2023-12-05 11:31:16 +00:00
Henrik Holst
4700089325
Update meson.build
...
added build info for the new helper to modify /proc/sys values
2023-12-05 11:31:16 +00:00
Henrik Holst
c7a4572d73
Update gamemode.ini
...
added info about and default value for the setting to enable and disable split lock mitigation
2023-12-05 11:31:16 +00:00
Henrik Holst
7381d93c13
Update gamemode.rules.in
...
added policykit rules for a new helper to modify values in /proc/sys
2023-12-05 11:31:16 +00:00
Henrik Holst
97e588a5ad
Update com.feralinteractive.GameMode.policy.in
...
added plociykit support for a new helper to write to /proc/sys
2023-12-05 11:31:16 +00:00
Henrik Holst
9a7ee00bbf
Update gamemode-context.c
...
added support for disabling the kernel split lock mitigation when entering game mode
2023-12-05 11:31:16 +00:00
Henrik Holst
b2bd7e5919
Update gamemode-config.h
...
added config values for disabling split lock mitigation
2023-12-05 11:31:16 +00:00
Henrik Holst
97cee92d94
Update gamemode-config.c
...
added config value for disabling split lock mitigation
2023-12-05 11:31:16 +00:00
Ahsan Fayaz
b9e8448afe
Replace crypto mining reference with folding@home
...
Based on the change originally made by @joelsgp in PR #417 , but there
were issues with the original commit message:
- Used an emoji which may cause rendering issues in CLI tools
- Mentioned Bitcoin mining which is inaccurate and contained
unnecessary censorship
2023-12-04 18:12:22 +00:00
Ahsan Fayaz
6c197f9b70
Apply clang-format with the new include order
2023-12-04 17:00:20 +00:00
Ahsan Fayaz
485a7f920a
Move includes to the file that actually uses them
...
This was spotted thanks to clang-format reordering the includes.
Even with the new config, it will include the header file for the
current source file first. Nevertheless, it is best to always include
header files where they are needed.
2023-12-04 16:48:07 +00:00
Ahsan Fayaz
f48c58f34c
Update include order in .clang-format
...
We generally want system headers included above project ones.
In one case <linux/limits.h> needs to be above other system headers.
2023-12-04 16:42:15 +00:00
Ahsan Fayaz
fad889db45
Apply clang-format to CPU pinning and parking code
...
The original PR #416 failed the format check, but this wasn't apparent
until after merging.
2023-12-04 15:33:15 +00:00
begin-theadventure
775c93001c
[gamemode.ini] Add renice information about the user group.
2023-12-04 14:57:22 +00:00
wantija
160bf91665
Update README.md
...
Added game mode support for cemu (1bcdb35e42
)
2023-12-04 14:54:05 +00:00
Hugo Locurcio
138ad384e3
Set the default GPU device ID to 0
...
This avoids confusion with the default configuration value being
`gpu_device=0` (as commented out in the `gamemode.ini` example),
but the actual default value being `-1`.
The alternative is to document this behavior and set the commented
out value to `-1`, but this makes the setup procedure more complex.
The new default behavior suits the 90% use case where there's
only one dedicated GPU available.
2023-12-04 14:21:32 +00:00
Henrik Holst
9614ceca9b
pin every thread of the process
...
walk through /proc/pid/task to make sure that we set the thread affinity for every single thread in the process
2023-12-04 14:18:38 +00:00
Henrik Holst
865ffb2588
reapply the core pinning from the reaper thread
...
Reapply the core pinning from the reaper thread to catch cases where the game launches threads after initial start
2023-12-04 14:18:38 +00:00
Henrik Holst
b83fb8f83e
made pinning optionally silent
...
made core pinning optionally silent, used for when the reaper thread calls us repeatable so we don't create tons of unnecessary logs
2023-12-04 14:18:38 +00:00
Henrik Holst
e882505881
properly support config reloading
2023-12-04 14:18:38 +00:00
Henrik Holst
88a15aba86
properly support config reloading
2023-12-04 14:18:38 +00:00
Henrik Holst
9cb119be62
properly support config reloading
2023-12-04 14:18:38 +00:00
Henrik Holst
fd226e46ba
added info about the parking/pinning capability
2023-12-04 14:18:38 +00:00
Henrik Holst
91eb57574c
fixed double free on exit from non use
...
if cpu core parking/pinning was disabled by the logic then there would be a double free at exit
2023-12-04 14:18:38 +00:00
Henrik Holst
25a99af4a1
use define instead of value
...
use a define instead of values for the park_or_pin variable
2023-12-04 14:18:38 +00:00
Henrik Holst
740a82a761
use defines instead of value
...
use defines instead of values for the park_or_pin variable
2023-12-04 14:18:38 +00:00
Henrik Holst
173a8594b4
fixed more coding style errors
2023-12-04 14:18:38 +00:00
Henrik Holst
81dc3f95e5
fixed more coding style errors
2023-12-04 14:18:38 +00:00
Henrik Holst
912d4bdc19
fixed more coding style errors
2023-12-04 14:18:38 +00:00
Henrik Holst
85b9abd654
fixed more coding style errors
2023-12-04 14:18:38 +00:00