Comments (12)
Hi @mgerhardy, to be specific here, what sort of behavior are you looking for?
Controlling optirun etc. may be something outside of the scope of a daemon, unfortunately.
It's also worth noting too that with Vulkan these issues start to go away - the game should allow you to choose which GPU is to be used.
from gamemode.
I'm looking for activating the main gpu automatically. To be honest I'm not sure how optirun works - but for e.g. nvidia-prime it is already enough to export an env var (DRI_PRIME=1
) in the application context.
for example:
DRI_PRIME=1 glxinfo | grep OpenGL
OpenGL vendor string: nouveau
OpenGL renderer string: Gallium 0.4 on NVC1
OpenGL version string: 3.0 Mesa 9.0
OpenGL shading language version string: 1.30
and on the other side:
glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ironlake Mobile
OpenGL version string: 2.1 Mesa 9.0
OpenGL shading language version string: 1.20
But I'm not sure what exactly is needed for the other solutions out there.
from gamemode.
I think with the new gamemoderun command this should be implemented. Currently there are 4 possible options to run an app with a secondary GPU:
DRI_PRIME=1 app
, optirun app
, primusrun app
, nvidia-xrun app
With that in mind, it should also be added an option to set vblank_mode=0
, which disables VSync, since afaik primusrun activates this every time.
from gamemode.
This is a cool idea actually, gamemoderun could evolve into a helper script for this kind of stuff!
from gamemode.
In that case, what happens if you run gamemoderun on an app with built-in gamemode support? Because if Hybrid GPU would be implemented in gamemoderun, it would be a very nice replacement to optirun etc for Hybrid GPU user.
from gamemode.
I think this is a fine situation - the only difference is the daemon sees the app request gamemode twice - a safe operation.
from gamemode.
So is someone working on this? I would give it a shot, but I can't find where the gamemoderun code is (probably would with make, but I never used meson).
Nevermind I found it. But I think if gamemoderun stays just a shell script this will be a problem, since loading a config isn't that trivial.
from gamemode.
It's here: https://github.com/FeralInteractive/gamemode/blob/master/data/gamemoderun.in
It's not on my immediate list, so I'd say go for it
from gamemode.
I already got the bash script working, wasn't that much work, but I would take some advice on how to get the config. I think the best option would be to add a DBUS option to gamemoded to get the config. Any suggestions?
from gamemode.
@mdiluz Do we want to be adding major functionality to gamemoderun
? Doing so means that games which natively support GameMode and don't need to be run through gamemoderun
will lose out on functionality.
from gamemode.
Yeah, I'd been mulling on it for a while - realising it'd need access to the config to make it useful kind of makes it a little bit more problematic too.
Perhaps it's simple enough for someone to write a wrapper scipt to do this for themselves?
from gamemode.
I wouldn't call it a major functionality for most people. If you have a hybrid gpu, you have to use a command before starting a game anyway.
The code in gamemoderun is pretty short (see #124), the only things that's missing is the code to get the config, but that should take maybe 2 or 3 lines.
The only change missing is some option to retrieve the config options.
from gamemode.
Related Issues (20)
- Nit: tests fail after update to appstream 1.0.2
- Gamemoderun cannot take effect on real game processes in steam HOT 2
- Can't set amd_peformance_level HOT 3
- Shouldn't "renice" be enabled by default? HOT 7
- [Request] Create a new release HOT 2
- does not works with steam or umu-launcher HOT 1
- Add current user to gamemode group during installation
- Custom script or other settings from inside the home directory HOT 1
- Gamemode fails test with prime-run
- Another "object 'libgamemodeauto.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file)" error
- Add documentation on how to integrate gamemode in a game.
- .
- mangohud says gamemode is off HOT 4
- Gamemoded -t has errors HOT 2
- Wait for custom script to exit before starting any game-related processes.
- gamemode hangs when running jedi surivior HOT 1
- Gpu device never parsed? HOT 1
- Add option to set AMDGPU pp_power_profile_mode in gamemode
- CODE VEIN crashes when run with gamemode
- Add GAMEMODE_CONFIG environment variable to specifiy gamemode.ini location HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gamemode.