718 Commits

Author SHA1 Message Date
Ehren Bendler
af07e169d5 fix static analyzer error that is blocking CI 2025-05-02 08:30:35 +01:00
Ehren Bendler
6e5c950141 fix clang-format error that is blocking CI 2025-05-01 15:35:50 +01:00
MithicSpirit
499af4c7bb Prevent platform profile error on unsupported systems
If a system does not support setting the platform profile (i.e., does
not have the file /sys/firmware/acpi/platform_profile), then everything
that interacts with it is skipped to prevent errors. This situation is
more common than I expected.[1]

[1] https://github.com/FeralInteractive/gamemode/issues/524
2025-04-30 19:12:51 +01:00
Ehren Bendler
5f691c3171 Potential fix for code scanning alert no. 2: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-04-30 19:11:59 +01:00
Ehren Bendler
f5fbdcf014 Take advanted of imminent EOL of Ubuntu 20 to update GH runner config. Also make a pass over the development section of the README to reflect current reality. Update inih to r60. Update meson settings to eliminate deprecated functions. Set minimum Meson version to 1.3.1 to match Ubuntu 24 and OpenSUSE Leap 15.6. 2025-04-30 19:11:59 +01:00
Richard Martin
7c49d6e1db docs: a change was made to remove the supported games list, but it was still referenced from one location in the README.md 2025-03-14 10:23:06 +00:00
MithicSpirit
d84c5ded1c Extract split lock mitigation into common file
This reduces duplication of the split lock mitigation path.
Additionally, it allows extending the functionality of procsysctl into
also getting the split lock mitigation state.
2025-02-24 15:43:15 +00:00
MithicSpirit
2d71be6a94 Save all state before any of it is changed
The platform profile may restrict what values the governor can take, so
we need to save all state first to ensure the restored state is correct.
Then, the platform profile is the first thing we set (and restore) to
ensure all other changes are made to the best of our ability.
2025-02-24 15:43:15 +00:00
MithicSpirit
1e3e55c5d8 Add tests for platform profile
Note that the platform profile feature is considered required. Maybe
this shouldn't be the case, as I'm not sure how standard this feature is
yet.
2025-02-24 15:43:15 +00:00
MithicSpirit
e75f2c3942 Support setting the platform profile
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.
2025-02-24 15:43:15 +00:00
Ahsan Fayaz
81d26c79b4 Remove list of supported apps
GameMode integration is widespread nowadays, and it works out of the box
for the most common use cases.

There is no longer a need for us to maintain a list of supported games
and applications, allowing us to streamline the readme file.
2025-02-24 15:15:17 +00:00
Ahsan Fayaz
5b3b4ae638 Add "GameMode contributors" to copyright notice
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.
2025-02-24 15:14:21 +00:00
Henrik Holst
1d9c1e6a72
Use better kernel api for P/E-cores (#515)
There's a proper kernel way to check for the presence of P- and E-cores so we don't have to check the frequency differences.

Kept the frequency check in case the kernel way does not exist on the users kernel but upped the fail-safe to 10% from 5% to close #498
2025-01-27 08:25:32 +00:00
Kaydax
2eecd513ac Update README.md
PolyMC seems to have been removed for the reason "PolyMC died" yet the project is still active. Requesting this be added back as it still supports gamemode even on the latest version
2025-01-13 11:43:31 +00:00
afayaz-feral
086b3fe5b4
Update build-and-test.yml
Update to upload-artifact@v4
2024-11-06 11:54:08 +00:00
Andrew Koroluk
2f69f7c023 Add suggestion message to failed CPU governernor test 2024-11-04 11:04:05 +00:00
Gilles Schintgen
c54d6d4243 fix project version in meson.build (1.8.1->1.8.2) 1.8.2 2024-09-03 12:53:21 +01:00
Ahsan Fayaz
715a1389b7 Update version to 1.8.2 2024-08-19 11:18:51 +01:00
Ahsan Fayaz
c0516059ed Update copyright year 2024-08-09 13:14:27 +01:00
Ahsan Fayaz
a875008d8e Standardise formatting of "Other Apps" section 2024-08-09 13:12:16 +01:00
Mahmut Sacit Meydanal
ec10c591ff
README: Add new gamemode extension link (#484)
* README: Add new gamemode extension link

Since the old extension is no longer maintained by the original author and has stopped working in the latest releases of GNOME, I recommend including my extension in the README.
2024-08-09 11:59:49 +01:00
mhmarf
fef538ba92
Update gamemode.ini (#490)
Clarify that user must be added to the gamemode group in order to make Core Parking work.
2024-08-01 14:22:16 +01:00
peelz
a2fe0108b5 Drop duplicate clang-format rule 2024-03-27 16:44:45 +00:00
peelz
c854772369 Fix idle inhibitor closing bus connection too early 2024-03-27 16:44:45 +00:00
Kira Bruneau
7d55ef856b add homepage url to metainfo 2024-03-27 10:22:58 +00:00
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