amonakov / primus

Low-overhead client-side GPU offloading
ISC License
216 stars 20 forks source link

Using primus frequently allows framerate above 60 FPS #162

Open ghost opened 9 years ago

ghost commented 9 years ago

On a fresh install of Arch Linux, using primusrun %command% on any steam game frequently results in a lack of vsync. I'd say almost half of the time the FPS is 60FPS (60-61 but no noticeable tearing) and the other half of time the FPS bounces between 64 and 68 FPS. This causes noticeable tearing.

I am using Gnome 3 as my desktop environment and I noticed what was mentioned about compositing. When using: PRIMUS_SYNC=1 primusrun ... I get the same bouncing between 64 and 68 FPS. When I use: PRIMUS_SYNC=2 primusrun ... I get 50FPS constantly.

Info:

amonakov commented 9 years ago

Are you sure it's a problem with primus and not a regression in Mesa, Intel DRI or Intel DDX? Does export LIBGL_DRI3_DISABLE=1 help?

ghost commented 9 years ago

Is there a way I would be able to tell it's not related to primus? I apologize as I'm used to either only using the Intel GPU OR only using the Nvidia GPU on linux. Also, export LIBGL_DRI3_DISABLE=1 does not appear to change anything.

I just now noticed that packages that came with mesa-demos such as glxspheres64 run at 60 FPS exactly everytime. FYI, the steam games are launched simply with the primusrun %command% launch option. Not sure if either of thos pieces help.

amonakov commented 9 years ago

It's a bit unfortunate that since it's a new install, you don't have a reference point where it might have worked well (i.e. you cannot say "it used to work fine N weeks ago on the same laptop before package upgrades"). At the moment all I can suggest is to ask other Arch users with similar setup (i.e. Gnome DE, Haswell CPU) if they notice a similar issue.

If you use primus with export PRIMUS_VERBOSE=2, it will dump some fps stats on the terminal. Could you show such a log from a problematic session, i.e. with 64-68 FPS?