-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Universal toggles for Feral GameMode and Prime Render Offload #326
Comments
What are these two settings? I've not run across them before. |
PRIME Render Offload is a technology that allows users with NVIDIA Optimus switchable graphics to render individual applications with the NVIDIA GPU on demand instead of having to choose to render the entire display with either the Intel or NVIDIA GPU. Feral GameMode allows a set of CPU optimizations to be applied on demand to a specific game process. |
Ah, thanks for the description, that would be why I'd not heard of it as I don't run nvidia due to lacking driver quality (used to be good 5+ years ago...). If such things are added they definitely need to be explained in-gui, so people know what they do and what they are for. |
Us laptop users don't have much of a choice with regards to GPU when it comes to gaming. An explanation in GUI, even a tooltip, would be welcome indeed. |
Having gamemode activation would be a treat! I am struggling to run it with gamehub since putting the command on the argument section is not working. |
I'm thinking about removing current compatibility tool options (checkboxes in compatibility options dialog) and implementing Tweaks instead. It should work similarly to how additional DOSBox configs currently work: GameHub would ship built-in Tweaks as json files, packagers and users can add own tweaks by creating files in data dirs or in UI. I'm still thinking about details and possible implementation, that's how I see it now:
Example of some of built-in tweaks
{
"id": "gamemode",
"name": "GameMode",
"description": "Temporarily apply a set of optimizations to a game process and OS. Requires Feral GameMode to be installed",
"command": "gamemoderun ${command}"
}
[
{
"id": "dx_dxvk_hud",
"name": "Show DXVK HUD",
"description": "Enable DXVK HUD",
"applicable_to": {
"platforms": ["windows"],
"compat": ["wine", "proton"]
},
"env": {
"DXVK_HUD": "devinfo,fps"
}
},
{
"id": "proton_dx_d9vk",
"name": "Proton: Use D9VK",
"description": "Use Vulkan-based D9VK instead of OpenGL-based WineD3D for D3D9",
"applicable_to": {
"platforms": ["windows"],
"compat": ["proton"]
},
"env": {
"PROTON_USE_D9VK": "1"
}
},
{
"id": "proton_dx_wined3d",
"name": "Proton: Use WineD3D",
"description": "Use OpenGL-based WineD3D for D3D11 and D3D10 instead of Vulkan-based DXVK",
"applicable_to": {
"platforms": ["windows"],
"compat": ["proton"]
},
"env": {
"PROTON_USE_WINED3D": "1"
}
},
{
"id": "proton_no_esync",
"name": "Proton: Disable esync",
"description": "Disable eventfd-based in-process synchronization primitives",
"applicable_to": {
"platforms": ["windows"],
"compat": ["proton"]
},
"env": {
"PROTON_NO_ESYNC": "1"
}
},
{
"id": "proton_no_fsync",
"name": "Proton: Disable fsync",
"description": "Disable futex-based in-process synchronization primitives",
"applicable_to": {
"platforms": ["windows"],
"compat": ["proton"]
},
"env": {
"PROTON_NO_FSYNC": "1"
}
}
] Any feedback or suggestions? |
This sounds like a good idea. Using a separated github repository just for tweaks seems like a reasonable approach since user don't need to know how GameHub works in order to extend it with new tweaks. |
c0f42a5 implements Tweaks. GameHub will load Tweaks from data directories in order (see Settings > Tweaks). Global tweaks list should be applied to all games automatically unless game has its own list configured. Use Tweaks entry in game's context menu to configure. It may not work somewhere if I missed something. |
@TheRealDannyBoy, @OvermindDL1, @neuromancer, @Hedronmx So, does it actually work? Are there any issues or missing functionality? Did it break anything? |
I tested this yestarday and i couldnt find any problems. Game mode runs good |
Sorry it took so long to test; I haven't had much time to game lately. It worked for me (AppImage version.) |
If you know some useful tweaks, send a PR with them to https://github.com/tkashkin/GameHub/tree/dev/data/share/tweaks. Format should be self-explanatory. |
I've tested a bit around and found a few issues. The first one is about visibility, I've found the global tweaks and thought it would be nice to be able to set them per game. I never use the context menu so I completely missed the per game options. I would expect the tweaks section somewhere in the games option page (same with overlays btw). This is probably related to #304 To understand the next ones: I've set up a custom emulator as described here.
Despite the file stating it needs an amd gpu for the ACO-tweak I am able to activate this option with a nvidia gpu. GameHub/data/share/tweaks/amd.json Lines 6 to 7 in ae21180
As an idea what to add which is probably overkill and can be handled by the custom environment input: |
I want to move properties like tweaks and overlays into preferences dialog in future.
Tweaks are currently not fully implemented for emulators.
kmod check is not implemented yet, but will be in future.
Interesting idea, I'll think how to do it. |
Not sure if global tweaks are getting picked up at all. I've tested with Maybe the default games "off" state overrides the global one? Edit: It's not even checked? The global tweak works with something like this but obviously isn't the solution since intentionally turned off switches aren't recognized or saved. https://github.com/tkashkin/GameHub/blob/ae211801176f60fb4d99e1753f236496f872838f/src/data/Game.vala#L681-L687
foreach(var tweak in all_tweaks.values)
{
if(tweak.is_enabled(this) && tweak.is_applicable_to(this, tool))
{
enabled_tweaks += tweak;
+ } else if(tweak.is_enabled() && tweak.is_applicable_to(this, tool)) {
+ // override with global enabled status
+ enabled_tweaks += tweak;
}
+ // TODO: Save and display when a setting is intentionally in a different state compared to the global status.
+ // It's also necessary to be able to revert into the default from this state
}
Maybe it's useful to see the global tweak status in the games tweak panel as a predefined state of the switches? |
`Utils.run*` refactoring Former-commit-id: c0f42a5
These are two features that most users would probably want enabled for all of their games. If each had a simple switch in settings, such as Lutris has, applying these settings would be much less tedious. Another toggle in game properties could allow controlling these settings on a game-by-game basis.
The text was updated successfully, but these errors were encountered: