Join us on our own very special Reddit: /r/Linuxers
Force wine to run iGPU (Desktop)
Hi all!
Bit of a random one. I am running Grand Prix 3 via wine (5.0), and have discovered (through lots of fiddling about) that it runs better on my integrated intel graphics than my NVidia card. (fair enough - game always has had issues on modern NVidia cards on Windows)
Is there a way to force Wine to run the game on the intel graphics instead of the NVidia card?
(for the record, this is a Desktop - not a Hybrid graphics laptop - specs in profile)

I believe the iGPU is active and running - I have a 2nd monitor input connected to the motherboard's DVI, and PopOS is displaying my wallpaper on it (so it's doing something at least!). My main Desktop appears on the input connected to my GPU. it also shows up on lspci (for what it's worth!)

Any ideas?
Have you tried the DRI_PRIME=1 variable?
What does DRI_PRIME=0 glxinfo|grep OpenGL and DRI_PRIME=1 glxinfo|grep OpenGL say?
Quoting: tuxintuxedoWhat does DRI_PRIME=0 glxinfo|grep OpenGL and DRI_PRIME=1 glxinfo|grep OpenGL say?
Both come up as NVidia...

But from a quick look on google (and the Arch Wiki), would appear that DRI_PRIME is what will be needed... guess I'm probably missing some small piece of the puzzle.
x_wing 8 May
I think that nvidia uses different environment variables:

You will have to figure out the identifier of your intel gpu in your system though.
whizse 9 May
  • Supporter
Keep in mind that you need to make the iGPU the primary display device first. The intel driver is not hooked up to support DRI_PRIME in any other way.

This does seem like a very roundabout way to get the game working though. What's the actual problem? The issues in Windows shouldn't impact Wine given that one uses straight D3D and the other OpenGL.
Ahhh, iGPU needs to be primary... that'll be why I've not had any success so far! (I did wonder if that was the case, from reading some of the DRI_Prime info)
Will fiddle around with it once some (elusive) free time appears.

As for what the problem is - performance. Game itself will run with either GPU, but I get 20-30% better performance (measured in terms of the game's "Processor Occupancy" (PO). On the intel chip, at the start of a race, I get 90-100% PO (which is great - runs at full speed), wheras on the Nvidia card, I get 120-130% PO (which leads to annoying slowdown and some physics oddities. Wonky late 90s game engine ftw)

Now I could run it in software mode (and get around 15% PO), but many track mods require hardware mode (and also, software mode seems to be a bit more crashy in Wine for whatever reason). But this is Linux - why settle for a lesser experience when tweaking is possible!

To be fair, the fact it runs at all is fantastic. Hasn't worked well in Windows since XP came along (and even then, only worked well if you had an older ATi Card - NVidia cards give texture bugs)
whizse 11 May
  • Supporter
Another alternative, if you like fiddling with stuff, is to use the Zink driver to get a Mesa OpenGL driver on top of Nvidia.

A third options is the llvmpipe OpenGL Mesa driver, but only if you have really beefy CPU. Probably not a realistic option with CPU utilization being a problem with the game.
While you're here, please consider supporting GamingOnLinux on:

Patreon, Liberapay or PayPal Donation.

This ensures all of our main content remains totally free for everyone with no article paywalls. We also don't have tons of adverts, there's also no tracking and we respect your privacy. Just good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register

Or login with...
Sign in with Steam Sign in with Twitter Sign in with Google
Social logins require cookies to stay logged in.