Nixpkgs: A possible solution for screen tearing on nVidia

Created on 14 Feb 2018  路  6Comments  路  Source: NixOS/nixpkgs

This is more of a request for feedback than a proper issue. If you're not using nVidia, then this issue is probably uninteresting.

Issue description

A lot has been said about screen tearing on nvidia. "It won't be fixed until Wayland", or "This one weird flag will prevent it", or...

None of it ever works great, but it's possible I've found something that works. At a minimum, it's eliminated screen tearing for the specific configuration I'm running; which, after years spent attempting and failing to do, is a wonderful thing.

The particular solution is described in more detail in http://www.thelinuxrain.com/articles/got-tearing-with-proprietary-nvidia-try-this, but in short, to test it:

What I'd like to do is find out if this is a universal solution. If so, then I believe we should set that setting unconditionally -- as the article says, it's a miniscule drop in performance, in exchange for a much better experience. I can't confirm the overall usefulness without hearing back from other users, though.

Steps to reproduce

Buy an nVidia card. Use the proprietary driver. Do essentially anything where tearing would be noticable.

This may not 'work' on KDE5 with the OpenGL compositor, but often it does. It's always worked on XFCE for me.

stale

Most helpful comment

I can confirm that the video shows tearing but after adding

services.xserver.screenSection = ''
    Option "metamodes" "nvidia-auto-select +0+0 { ForceCompositionPipeline = On }"
  '';

things are much better.

This is with KDE.

All 6 comments

I can confirm that the video shows tearing but after adding

services.xserver.screenSection = ''
    Option "metamodes" "nvidia-auto-select +0+0 { ForceCompositionPipeline = On }"
  '';

things are much better.

This is with KDE.

With XFCE, this config causes the screen to freeze on login. It can be worked around by switching to a tty and back, once, but it's not great.

This worked for me in NixOS 17.09 but not NixOS 18.03.

@peterhoeg's config works again on Nvidia 410. On 390 it didn't work.
But it helps only with interface. In tearing test videos at 60fps there is massive tearing.

Is it possible to use 410 on NixOS 18.09?

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

copumpkin picture copumpkin  路  3Comments

tomberek picture tomberek  路  3Comments

grahamc picture grahamc  路  3Comments

lverns picture lverns  路  3Comments

ghost picture ghost  路  3Comments