Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
VoxelMints
Level 1
Level 1
Posts: 32
Joined: Sat Sep 08, 2018 6:20 pm

Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by VoxelMints » Sun Sep 09, 2018 5:33 pm

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.

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

Disable Vsync for the Clutter Compositor

Cinnamon 19.1

Disable: Enable Vblank

Mint Start Menu > System Settings > Preferences > General > Compositor Options
Fixes: Screen tearing when browsing in Firefox
You can log out and back in for an easy way to reset Cinnamon.
You can remove CLUTTER_VBLANK=none from /etc/environment after updating to Cinnamon 19.1 and disabling "Enable Vblank"
Cinnamon 19

Add this line: CLUTTER_VBLANK=none

To: /etc/environment

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

Firefox GPU Acceleration


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

layout.display-list.retain

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

Fixes: Slow mouse scrolling
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

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

Fixes: Screen tearing while watching Youtube videos.
Your Nvidia settings should now be saved. If you make changes be sure to click 'Merge with existing file'.
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 Fri Jan 04, 2019 3:40 pm, edited 16 times in total.

asobi
Level 1
Level 1
Posts: 1
Joined: Tue Sep 18, 2018 5:12 pm

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by asobi » Tue Sep 18, 2018 5:15 pm

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
Level 1
Level 1
Posts: 3
Joined: Wed Sep 19, 2018 1:31 pm

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by PatrikOnLinux » Thu Sep 20, 2018 4:26 pm

Thanks for this!!

VoxelMints
Level 1
Level 1
Posts: 32
Joined: Sat Sep 08, 2018 6:20 pm

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by VoxelMints » Thu Sep 20, 2018 8:54 pm

Glad it helped! :D

User avatar
catweazel
Level 17
Level 17
Posts: 7787
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by catweazel » Fri Sep 21, 2018 2:23 am

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.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

VoxelMints
Level 1
Level 1
Posts: 32
Joined: Sat Sep 08, 2018 6:20 pm

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by VoxelMints » Fri Sep 21, 2018 1:43 pm

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
Level 1
Level 1
Posts: 32
Joined: Sat Sep 08, 2018 6:20 pm

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by VoxelMints » Sat Sep 22, 2018 11:20 am

I think that should do it. Good luck.

VoxelMints
Level 1
Level 1
Posts: 32
Joined: Sat Sep 08, 2018 6:20 pm

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by VoxelMints » Fri Jan 04, 2019 3:31 pm

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
Level 1
Level 1
Posts: 16
Joined: Tue Sep 30, 2014 12:11 pm

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by justtrying » Fri Jan 04, 2019 6:13 pm

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 9
Level 9
Posts: 2886
Joined: Tue Jul 05, 2016 1:20 pm

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by trytip » Fri Jan 04, 2019 10:54 pm

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
Level 1
Level 1
Posts: 32
Joined: Sat Sep 08, 2018 6:20 pm

Re: Cinnamon Tweaks Screen Tearing VSYNC NVIDIA

Post by VoxelMints » Sun Jan 13, 2019 5:46 pm

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.

Post Reply

Return to “Tutorials”