3

I had followed the instructions posted by emk2203 (My AMD Radeon graphic card is not working on 16.04) and now I could make the apps use my secondary AMD card and it's work! Look:

Firefox running (http://demo.marpi.pl/exp/mecha/) experiment at 15fps

Now, runnig Firefox by Terminal with DRI_PRIME=1:

DRI_PRIME=1 firefox

The same experiment running at 61fps

Thanks emk2203!

Now I need to know how configure the system to always runs the app with the DRI_PRIME=1 set.

Sorry for bad english. I'm brasilian.

  • Your question is, I believe, "How do I run FireFox with the DRI_PRIME=1 variable enabled," correct? – gravity Jun 24 '16 at 15:27
  • Unfortunately Not... What I need is always open Firefox or another software with the DRI_PRIME=1 command already set. So I just will need double click its icon in the desktop. – Rodrigo Alexandre Jun 24 '16 at 15:33
2

Here is a little light reading on environment variables for those sleepless nights, but to cut to the chase, I quote:

"A suitable file for environment variable settings that affect the system as a whole (rather than just a particular user) is /etc/environment.

This file is specifically meant for system-wide environment variable settings. It is not a script file, but rather consists of assignment expressions, one per line."

So... Inserting your assignment DRI_PRIME=1 into /etc/environment and then restarting should do what you're asking.

1

You can set an environment variable system-wide by setting it in /etc/default/locale. This will set it for all users, so you want to be sure that's what you really want. Keep in mind that local settings (such as in .bashrc) will override the system-wide setting.

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.