As shown from this blog, Fedora 25 now has NVida graphics binary driver support and users has an option to launch applications with "Launch with Dedicated Graphics Card" with right click on an icon, if your computer has hybrid GPU (Intel/NVidia) configuration.

Given this option, I would like to write scripts to launch my other applications from the command line or to make desktop launchers connected to my scripts directly, with Dedicated Graphics Card option pre-selected.

I am wondering how I can achieve this? or How is this implemented in Fedora 25, so that I can learn from and use it on my scripts? Thank you!


As seen in the QA test case, you only need to specify the DRI_PRIME=1 environment variable when launching the application, like so:

[dkarlovi@amelie ~]$ glxgears -info | grep REND
GL_RENDERER   = Mesa DRI Intel(R) Sandybridge Mobile 
[dkarlovi@amelie ~]$ DRI_PRIME=1 glxgears -info | grep REND
GL_RENDERER   = Gallium 0.4 on NVD9
  • It seems it is correct. Though, I do not know how to verify this on other applications. Are there other tools which I can use, to get equivalent information like -info of glxgears shows? – Yui Dec 21 '16 at 20:05
  • There are other environment variables to be set, I think I used LIBGL_DEBUG before, but it was a long time ago. LIBGL_DEBUG=verbose DRI_PRIME=1 glxgears. See DRI Testing and debugging. – Dalibor Karlović Dec 22 '16 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.