Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
VoxelMints

Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by VoxelMints »

If you're new to Linux Mint and chose Cinnamon as your desktop these tweaks can help resolve some issues and hopefully provide a similar experience to your previous os.

My PC has multiple cores, lots of ram, and it can run Skyrim on high settings. It's not ancient but not new at all. It's always been stable so I took time to resolve my issues before I posted them here.

I'm currently using the 390 Nvidia driver available with the driver manager.

I recommend making a TimeShift save before making these changes.

I also recommend applying these tweaks one at a time. Check if things improve after each tweak. Avoid applying all these tweaks at once.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Disable Vsync for the Clutter Compositor ........ If you update to Mint 19.1 you can remove the "CLUTTER_VBLANK=none" tweak.


Cinnamon 19.1

Disable: Enable Vblank

Mint Start Menu > System Settings > Preferences > General > Compositor Options

Code: Select all

NOTES
Fixes: Screen tearing when browsing in Firefox
This seems to make the Cinnamon desktop environment lighter thus making apps lighter.
You can log out and back in for an easy way to reset Cinnamon.

Cinnamon 19

Add this line: CLUTTER_VBLANK=none

To: /etc/environment

Code: Select all

NOTES
Fixes: Screen tearing when browsing in Firefox
This seems to make the Cinnamon desktop environment lighter thus making apps lighter.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Firefox GPU Acceleration ........ This improves performance on certain hardware. On others it degrades it.


Type in the address bar: about:config

Press enter, accept by pressing enter again

Copy and paste in search one by one, double click to enable: TRUE

layers.acceleration.force-enabled <----------*Most Important*

layers.omtp.enabled <----------*Default ON*

layout.display-list.retain <----------*Default ON*

Code: Select all

NOTES
Fixes: Youtube videos dropping / skipping frames randomly.
Fixes: Unstable Firefox performance lag
This also resolved an issue where browsing the IRL page on Twitch would lag while scrolling up and down.
Firefox would not run smoothly without this change, this is the main fix for Firefox performance issues.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Increase Firefox Mouse Scroll Speed


Type in the address bar: about:config

Press enter, accept by pressing enter again

Copy and paste in search: mousewheel.min_line_scroll_amount

Double click and set to: 35

Code: Select all

NOTES
Fixes: Slow mouse scrolling 
This can be too fast on some touchpads
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Save Nvidia X Server Settings


Assuming the Nvidia 390 driver is already installed from the driver manager follow these steps.

Open the Nvidia X Server Settings: Mint Start menu > Administration

Go to: X Server Display Configuration

Mine is set to 60 hz for my monitor

Click the tab: Advanced

Click only on: Force Composition Pipeline

Click: Apply

Click: Save to X Configuration file

Copy and paste this: /etc/X11/xorg.conf

Click: Save

Enter your Admin password


If you make changes and SAVE be sure to click 'Merge with existing file'.

Code: Select all

NOTES
Fixes: Screen tearing while watching Youtube videos.
Your Nvidia settings should now be saved.  
Hopefully you have similar hardware to mine and these tweaks help.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Note this won't save your settings on the PowerMizer page.

I don't recommend adding tweaks to the Xorg.conf file because it can cause instability and strange issues like 1080p Twitch videos getting stuck loading on an endless loop and not playing, Yes this happened to me. I found it was best not adding tweaks to Xorg.conf at all.

You might see a brief stutter from Firefox rarely and it's likely the Nvidia card going from idle to full performance.

Hopefully I can continue to edit and refine this info. Good luck.

EDIT: Formatted with tags.
Last edited by VoxelMints on Wed Jan 30, 2019 3:17 pm, edited 23 times in total.
asobi

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by asobi »

Thanks for this. I've been suffering terrible scrolling in Firefox and what appears to be frame skipping in games/videos for months. The clutter variable solved it all - thank you.
PatrikOnLinux

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by PatrikOnLinux »

Thanks for this!!
VoxelMints

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by VoxelMints »

Glad it helped! :D
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by catweazel »

VoxelMints wrote: Thu Sep 20, 2018 8:54 pm Glad it helped! :D
It would be much easier to read if you used code and c tags instead of bold text.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
VoxelMints

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by VoxelMints »

I was wondering about that the other day but I'm not sure how to use those. I would be happy to.

Wow level 17 pleased to meet you. :D
VoxelMints

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by VoxelMints »

I think that should do it. Good luck.
VoxelMints

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by VoxelMints »

Before I updated to Cinnamon 19.1 something changed in Firefox 64. I started experiencing video stuttering in Youtube videos despite all these tweaks. Firefox 63.0.3 ran great. This is something to consider when applying these tweaks.

If I get Firefox 64 working great I'll post here what I changed.
justtrying

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by justtrying »

I tend to agree with VoxelMints, this stuttering issue drove me crazy for past few weeks. i like to watch 4k YouTube videos full screen. I ran Manjaro- Xfce for months and months and did not realize what i was missing until i returned to the land of mint (edition 19.0 cinnamon)few weeks ago. WOW the videos ran smooth as butter with all the goodness of 4k details. BUT after few updates started noticing the stuttering again. This stuttering continued even after upgrading to 19.1.
Fresh installed 19.1 and the issue persisted, tried different Nvidia drivers from 390 to 415 and nothing helped even with Vsync on &off . i think all these tweaks do help with tearing significantly, but not with the stuttering..... tried different settings of force composition pipeline, in nvidia settings, which did not improve anything.
Even tried back Manjaro and saw the same thing. the only thing I found to correct this is to fresh install Mint 19.0 and do not update (which is not practical).
Tried installing Kernel 18.0.13 from mint update manager, while it caused no problems, it did NOT help with the stuttering issue.
My system is AMD 1800x with 16GB RAM and Nvidia 1080. None of these is overclocked. the computer runs perfectly with mint 19, 19.1 with no other issue except this stuttering. I can play most of my games in steam in 3840x2160 with 40~60 FPS . So i do not think it is a HW problem. And my ISP supplies 400 Mb/sec. consistently
The main culprit right now seems to be the new FF 64.0 or may be the plugin it uses (openH.264 ). And i have to qualify this by saying I am no expert.
I just wanted to share with you my experience with it so far, and it is kind of frustrating bec. not too many people are talking about it and/or it is getting mixed up with the tearing issues. I will keep looking and asking .
Please post back here if you find a solution or maybe the problem will correct itself in the next FF version , In the mean time i decided to continue using Mint 19.1 , as i like the snappiness and speed of the new cinnamon. And like i said it is working perfectly with no errors , except for the videos
And BTW, while i was using Manjaro i did try a different browser called Brave which did not exhibit the stuttering. But i'd rather use my trusty FF !!
Thanks for the tweaks they DO help with the tearing.
User avatar
trytip
Level 14
Level 14
Posts: 5366
Joined: Tue Jul 05, 2016 1:20 pm

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by trytip »

linux is weird. in cinnamon i use nvidia-340 with no tweaks and effects enabled and have no issues with tearing. in mint xfce with compton enabled which is supposed to remove tearing i see it more often but not to the point of totally annoying. in these cases for xfce/mate i use this command which can be made into a startup script

Code: Select all

nvidia-settings --assign CurrentMetaMode="$(nvidia-settings -q CurrentMetaMode -t|tr '\n' ' '|sed -e 's/.*:: \(.*\)/\1\n/g' -e 's/}/, ForceCompositionPipeline = On}/g')" > /dev/null
the weird part is than in arch linux xfce with nvidia-340 i get no tearing at all and no extra effort needed on my part. same version kernel,same browsers, same drivers and same window manager

so why then is this tearing so selective?
Image
VoxelMints

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by VoxelMints »

justtrying wrote: Fri Jan 04, 2019 6:13 pm The main culprit right now seems to be the new FF 64.0 or may be the plugin it uses (openH.264 ). And i have to qualify this by saying I am no expert.
I just wanted to share with you my experience with it so far, and it is kind of frustrating bec. not too many people are talking about it and/or it is getting mixed up with the tearing issues. I will keep looking and asking .
Please post back here if you find a solution or maybe the problem will correct itself in the next FF version , In the mean time i decided to continue using Mint 19.1 , as i like the snappiness and speed of the new cinnamon. And like i said it is working perfectly with no errors , except for the videos
And BTW, while i was using Manjaro i did try a different browser called Brave which did not exhibit the stuttering. But i'd rather use my trusty FF !!
Thanks for the tweaks they DO help with the tearing.
Firefox 64.0.2 seems to be working fine thankfully. I haven't changed any settings since Firefox 63.0.3.

I started this thread because I also noticed there was no info anywhere related to video stuttering, screen tearing, and Firefox performance issues. I felt these settings were too obscure for most people to find on their own, and an absolute must for anyone that edits videos. I agree Linux Mint Cinnamon has been working astonishingly well for me. I guess posting these tweaks was my way of contributing and saying Thank You.
petri0
Level 2
Level 2
Posts: 67
Joined: Wed Mar 28, 2012 5:40 pm

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by petri0 »

Thanks for this! Finally tear free and stutter free videos on my 1600x and 1050Ti!
Glynn68
Level 1
Level 1
Posts: 16
Joined: Sun Sep 10, 2017 2:21 pm

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by Glynn68 »

Hats off to you Voxelmints!!

Finally, these Nvidia X Server tweaks have fixed my Chrome/Youtube screen tearing on 2x E5 2680 V2 server board with GTX 1070 running Ultrawide 3440x1440, Mint Cin 19.1

Thank you:)
Glynn
Glynn68
Level 1
Level 1
Posts: 16
Joined: Sun Sep 10, 2017 2:21 pm

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by Glynn68 »

And also fixed screen tearing in F1 2017, thought my GPU wasn't up to playing this at 3440x1440 but now it looks superb. Like having a new PC!
Booty

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by Booty »

Very Nice Tutorial

many thanks
Post Reply

Return to “Tutorials”