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
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
Marc Di Luzio
702407595a
Rename duplicate CONFIG_VALUE_MAX
...
Leave a static assert to ensure they're in sync when relevant in gamemode-gpu
2019-06-01 11:12:10 +01:00
Marc Di Luzio
e537caf170
Ensure we're more specific about clang format options and include order
2019-06-01 10:57:27 +01:00
Marc Di Luzio
2e67906402
Remove unneeded includes
2019-06-01 10:57:27 +01:00
Marc Di Luzio
1b78d0dcf7
Restructure files and libraries
...
Rename a bunch of files to make the consistent
Create two new subdirectories for common code, and utilities
2019-06-01 10:54:22 +01:00
Marc Di Luzio
2bca1fb04e
Remove commented includes
2019-06-01 10:54:22 +01:00
Marc Di Luzio
9db7442a31
Fix potential memory leak in game_mode_initialise_gpu
2019-05-19 12:47:32 +01:00
Christian Kellner
bbde1d0357
Ensure strncpy'ed strings are all null terminated
...
If there is no null byte among the first n bytes of the source the
resulting string will not be properly null terminated.
Ensure that all strings that are copied via strncpy are properly
terminated copy "sizeof (dest) - 1" bytes and manually terminate
the string in the cases the array was not initialized.
Example compiler warning:
../daemon/gamemode-tests.c: In function ‘run_cpu_governor_tests’:
../daemon/gamemode-tests.c:326:4: warning: ‘strncpy’ specified bound
256 equals destination size [-Wstringop-truncation]
strncpy(defaultgov, currentgov, CONFIG_VALUE_MAX);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-03-28 11:40:40 +00:00
Alex Smith
10a31f8dec
Update copyright years to 2019
2019-03-14 16:59:30 +00:00
Marc Di Luzio
fec32ac53d
Remove the nv_perf_level config option and figure it out programmatically
...
This also fixes the instances in testing where we don't have the nv overclock in use, but we do have the mode set
Solves issues explaining the what the perf_level actually meant, and future proofs for any PR that wants to set individual perf levels
2019-03-10 15:19:34 +00:00
Marc Di Luzio
873d0a224b
Remove passing the vendor to gpuclockctl
2019-03-10 15:19:34 +00:00
Marc Di Luzio
54d7d3f259
Allow nv_perl_level and nv_powermizer_mode to be set independently
2019-03-10 10:32:08 +00:00
Marc Di Luzio
834a18aab4
Implement nv_powermizer_mode option to allow setting the Nvidia powermizer mode
2019-03-10 10:32:08 +00:00
Marc Di Luzio
9ade4481c3
Change AMD overclocking to simply be setting the power_dpm_force_performance_level file for now
...
This covers the MVP for now, and simply allows pinning the power level to "high"
Full overclocking set up is somewhat more complicated, and it'll be better to implement that at the same time as the same for Nvidia, where we're currently only really setting the top end power level
2019-03-10 10:32:08 +00:00
Marc Di Luzio
20efaaa33f
Rename the core and mem stats to nv_ prefix
...
These will be NV only going forward, as AMD needs a different chunk of work
2019-03-10 10:32:08 +00:00
Marc Di Luzio
53d1700a68
Add the timout to the call signature of run_external_process
2019-03-07 17:51:57 +00:00
Marc Di Luzio
4578af47ba
Combine the two run_external_process functions so they both have the same timeout protection
2019-03-07 17:51:57 +00:00
Marc Di Luzio
91deffb6b4
Fill in the GPU vendor automatically
2019-02-21 17:26:14 +00:00
Marc Di Luzio
0847d3b452
Remove the vendor config value in prep for it to be auto-detected
2019-02-21 17:26:14 +00:00
Marc Di Luzio
20a4862888
Add functionality to get the current GPU information in the daemon
2019-02-20 17:53:13 +00:00
Marc Di Luzio
b7dff4265c
Refactor config functions that can return their full value to do so
...
This pattern got a little out of hand, and was only meant for variable length values like strings
2019-02-19 17:40:50 +00:00
Marc Di Luzio
d1b7c49bc2
Remove more duplicate ERROR: logs
2019-02-12 08:55:23 +00:00
Marc Di Luzio
ba20df5c47
Fix headers for travis
2019-02-12 08:55:23 +00:00
Marc Di Luzio
d18f3fc584
Remove duplicate ERROR strings from error logs
...
Now visible in 5898538
2019-02-12 08:55:23 +00:00
Marc Di Luzio
db0f8f91f3
Update TODO comments
2019-02-12 08:55:23 +00:00
Marc Di Luzio
a488af5741
Lower the amd overclock hard limit
...
20 appears to be the limit in the kernel
Adjust nvidia message as well
2019-02-12 08:55:23 +00:00
Marc Di Luzio
ff1a838ab7
Apply format corrections
2019-02-12 08:55:23 +00:00
Marc Di Luzio
142b2fb32d
Also add nv_perf_level for nvidia (needed as a parameter to nvidia-xsettings)
2019-02-12 08:55:23 +00:00
Marc Di Luzio
b85edc2e04
Hand down correct set parameters to gpucorectl
2019-02-12 08:55:23 +00:00
Marc Di Luzio
8ea751057c
Move the TODO into the control file
2019-02-12 08:55:23 +00:00
Marc Di Luzio
01dbe4e2b0
Rename gpu-query to gpu-control to better describe it's functions
2019-02-12 08:55:23 +00:00
Marc Di Luzio
1984908543
Fix include order
2019-02-12 08:55:23 +00:00
Marc Di Luzio
fa38ef4e23
Add a macro to validate a vendor value
2019-02-12 08:55:23 +00:00
Marc Di Luzio
57a55c41cc
Call gpuclockctl
2019-02-12 08:55:23 +00:00
Marc Di Luzio
a395caeb48
Refactor the governor request into an external process helper function
2019-02-12 08:55:23 +00:00
Marc Di Luzio
0f6c9a8a95
Fix formatting
2019-02-12 08:55:23 +00:00
Marc Di Luzio
6b268e8349
Convert "apply_gpu_optimisations" to a string with a special key
2019-02-12 08:55:23 +00:00
Marc Di Luzio
252aa89fa6
Sanity check the config values
...
These values are up for debate, perhaps AMD or NV give nice limits
2019-02-12 08:55:23 +00:00
Marc Di Luzio
a9237bc1dd
Add ERROR to some error messages
2019-02-12 08:55:23 +00:00
Marc Di Luzio
ad2c218ab3
Allow setting the device value with a hex string
...
Also stops erroring on 0 value longs
2019-02-12 08:55:23 +00:00
Marc Di Luzio
fe9b5c8744
Error with invalid device or vendor values
2019-02-12 08:55:23 +00:00
Marc Di Luzio
cee2351c55
Add config for vendor and device
2019-02-12 08:55:23 +00:00
Marc Di Luzio
8d4e9ac54e
Add gpuclockctl to allow privilaged control of GPU parameters
2019-02-12 08:55:23 +00:00
Marc Di Luzio
b1bf33d386
Add config parameters for GPU clocking
2019-02-12 08:55:23 +00:00
Marc Di Luzio
aeaef7377d
Preliminary (empty) implementation of GPU optimisations
2019-02-12 08:55:23 +00:00