Properly detect when to use DRI_PRIME
We fork off twice once with and once without DIR_PRIME=1 set. We then use the vendor string to determine what GPU to use.
We prefer (in order)
- AMDGPU/AMDGPU-PRO/NVidia non-free driver
- Intel driver
- Nouveau
- Software rendering
If a driver can't be detected it will default to DRI_PRIME=0