How can I remove screen-tearing and input lag at the same time?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Stqrlxt
Level 1
Level 1
Posts: 8
Joined: Wed Nov 10, 2021 12:23 pm

How can I remove screen-tearing and input lag at the same time?

Post by Stqrlxt »

Hello,
I'm new to Linux and mainly installed it just so that I can get that extra bit of performance out of my low-end system (I play minecraft by the way). I've noticed that when compositing was turned on I experienced a lot of input latency which resulted in me losing a couple of matches in minecraft 1.8.9 pvp. At first I thought it was probably just the extra fps and the smoothness which I had never experienced in windows and wasn't used to. Then I realized it WAS actually input latency.
Then after fiddling around with some settings, I managed to discover that by turning off the compositor the input lag was no more. But then a new problem arose-Screen Tearing. The screen tearing was immense and it was kind of annoying. I tried installing a new compositor (picom) but the problem persisted. I tired turning the TearFree option using this command- xrandr --output eDP --set TearFree on -but then input latency came back. So what I am looking for is a way to make it so that I can get rid of input lag without having to experience screen tearing.
I'm not sure of all the information that I should be providing (as I'm new to Linux) in this post but I will post what I know. (If any other crucial information is required then do tell me and I'll provide it at the earliest). Here's the out put of inxi -Fxxxrz

Code: Select all

System:
  Kernel: 5.4.0-92-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 
  Desktop: Xfce 4.16.0 tk: Gtk 3.24.20 info: xfce4-panel wm: xfwm4 
  dm: LightDM 1.30.0 Distro: Linux Mint 20.2 Uma base: Ubuntu 20.04 focal 
Machine:
  Type: Laptop System: LENOVO product: 81MT v: Lenovo V145-15AST 
  serial: <filter> Chassis: type: 10 v: Lenovo V145-15AST serial: <filter> 
  Mobo: LENOVO model: LNVNB161216 v: No DPK serial: <filter> UEFI: LENOVO 
  v: 8ZCN25WW(V2.04) date: 12/26/2019 
Battery:
  ID-1: BAT1 charge: 18.5 Wh condition: 23.8/30.0 Wh (79%) volts: 8.4/7.5 
  model: 0x53 0x4D 0x50 0x00 0x31 0x PABAS0241231 type: Li-ion 
  serial: <filter> status: Charging cycles: 1336 
  Device-1: hidpp_battery_0 
  model: Logitech G304 Lightspeed Wireless Gaming Mouse serial: <filter> 
  charge: 100% (should be ignored) rechargeable: yes status: Discharging 
CPU:
  Topology: Dual Core model: AMD A6-9225 RADEON R4 5 COMPUTE CORES 2C+3G 
  bits: 64 type: MCP arch: Excavator L2 cache: 1024 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 10380 
  Speed: 1433 MHz min/max: 1300/2600 MHz boost: enabled Core speeds (MHz): 
  1: 1297 2: 1297 
Graphics:
  Device-1: AMD Stoney [Radeon R2/R3/R4/R5 Graphics] vendor: Lenovo 
  driver: amdgpu v: kernel bus ID: 00:01.0 chip ID: 1002:98e4 
  Display: x11 server: X.Org 1.20.13 driver: amdgpu,ati 
  unloaded: fbdev,modesetting,vesa compositor: picom 
  resolution: 1366x768~60Hz 
  OpenGL: renderer: AMD STONEY (DRM 3.35.0 5.4.0-92-generic LLVM 12.0.0) 
  v: 4.5 Mesa 21.0.3 direct render: Yes 
Audio:
  Device-1: AMD vendor: Lenovo driver: snd_hda_intel v: kernel 
  bus ID: 00:01.1 chip ID: 1002:15b3 
  Device-2: AMD Family 15h Audio vendor: Lenovo driver: snd_hda_intel 
  v: kernel bus ID: 00:09.2 chip ID: 1022:157a 
  Sound Server: ALSA v: k5.4.0-92-generic 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Lenovo driver: r8169 v: kernel port: 3000 bus ID: 01:00.0 
  chip ID: 10ec:8168 
  IF: enp1s0 state: down mac: <filter> 
  Device-2: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter 
  vendor: Lenovo driver: rtl8821ce v: v5.5.2.1_35598.20191029 port: 2000 
  bus ID: 02:00.0 chip ID: 10ec:c821 
  IF: wlp2s0 state: up mac: <filter> 
Drives:
  Local Storage: total: 931.51 GiB used: 29.77 GiB (3.2%) 
  ID-1: /dev/sda vendor: Seagate model: ST1000LM035-1RK172 size: 931.51 GiB 
  speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter> rev: LFM1 scheme: GPT 
Partition:
  ID-1: / size: 450.84 GiB used: 29.63 GiB (6.6%) fs: ext4 dev: /dev/sda4 
Sensors:
  System Temperatures: cpu: 60.5 C mobo: N/A gpu: amdgpu temp: 60 C 
  Fan Speeds (RPM): N/A 
Repos:
  No active apt repos in: /etc/apt/sources.list 
  Active apt repos in: /etc/apt/sources.list.d/linrunner-tlp-focal.list 
  1: deb http://ppa.launchpad.net/linrunner/tlp/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/linuxuprising-apps-focal.list 
  1: deb http://ppa.launchpad.net/linuxuprising/apps/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
  1: deb http://packages.linuxmint.com uma main upstream import backport
  2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
  3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
  4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
  Active apt repos in: /etc/apt/sources.list.d/spotify.list 
  1: deb http://repository.spotify.com stable non-free
Info:
  Processes: 210 Uptime: 1h 27m Memory: 3.73 GiB used: 1.34 GiB (36.0%) 
  Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Shell: bash 
  v: 5.0.17 running in: xfce4-terminal inxi: 3.0.38
Thank you in advance for any help!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mikeflan
Level 17
Level 17
Posts: 7106
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: How can I remove screen-tearing and input lag at the same time?

Post by mikeflan »

Hi and welcome to the forum. Your post is very good - way to go.
Screen tearing is annoying. After a year of doing good, it has come back a little for me too. I say the way to address your issues is graphics drivers and kernels. I think you have the correct kernel, and there probably isn't much you can do about drivers.

Code: Select all

Graphics:
  Device-1: AMD Stoney [Radeon R2/R3/R4/R5 Graphics] vendor: Lenovo 
  driver: amdgpu v: kernel bus ID: 00:01.0 chip ID: 1002:98e4 
  Display: x11 server: X.Org 1.20.13 driver: amdgpu,ati 
  unloaded: fbdev,modesetting,vesa compositor: picom 
  resolution: 1366x768~60Hz 
  OpenGL: renderer: AMD STONEY (DRM 3.35.0 5.4.0-92-generic LLVM 12.0.0) 
  v: 4.5 Mesa 21.0.3 direct render: Yes 
But start up Driver Manager and see if I am wrong. I don't think there will be any options in DM for you to change.
Stqrlxt
Level 1
Level 1
Posts: 8
Joined: Wed Nov 10, 2021 12:23 pm

Re: How can I remove screen-tearing and input lag at the same time?

Post by Stqrlxt »

Hello mikeflan,
Thank you for complimenting on my first post <3. So I opened up Driver Manager and this was what I was greeted with. I think this is the wifi driver that I use.
So does that mean that I can't do anything in the case of drivers?

Regards,
Stqrlxt

P.S. I also have an issue of input lag when I turn on stuff that can get rid of screen tearing like the Tearfree option or the compositor. My thoughts are that it's because my laptop is on the low-end side of hardware. It's not that old though as I got this a year ago.
Attachments
Screenshot_2022-01-16_19-40-12.png
User avatar
zcot
Level 9
Level 9
Posts: 2833
Joined: Wed Oct 19, 2016 6:08 pm

Re: How can I remove screen-tearing and input lag at the same time?

Post by zcot »

Why is the compositor picom in use? This is not a default combination. Xfce does provide Xfwm4 + compositing option.

Is that compositor coming from some other software installation? Are you using GLava maybe? What is installed from linuxuprising ppa?

There must be some underlying issue.
Stqrlxt
Level 1
Level 1
Posts: 8
Joined: Wed Nov 10, 2021 12:23 pm

Re: How can I remove screen-tearing and input lag at the same time?

Post by Stqrlxt »

Hello zcot!
Sorry for the late response. I installed picom because a friend of mine recommended and said that it would maybe be able to fix the problem. But it didn't and I didn't delete it after that. Right now I disabled compositing in the Windows Manager Tweaks and have picom running in the background as my compositor. I also have this file called compton.conf in my config folder which has some text in it (also my friend's suggestion). So yeah, that's the history of me installing picom. By the way it doesn't fix any problems I have and when gaming I just go into Terminal and type in pkill picom so that I can get rid of the input lag and it does give me screen tearing but dealing with screen tearing is way easier than dealing with input lag, especially if you're a minecraft PvP sweat.
Attachments
Screenshot_2022-01-17_19-02-52.png
Stqrlxt
Level 1
Level 1
Posts: 8
Joined: Wed Nov 10, 2021 12:23 pm

Re: How can I remove screen-tearing and input lag at the same time?

Post by Stqrlxt »

Can anyone please help me?
User avatar
Pjotr
Level 24
Level 24
Posts: 20091
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: How can I remove screen-tearing and input lag at the same time?

Post by Pjotr »

This is my recommendation:

1. First make sure that you have a clean slate, which should make your system predictable for us, because it'll be without any friend-advised but potentially disrupting tweaks and/or inferior software. So do a fresh clean re-installation of Mint 20.3 Xfce.

Do not, I repeat do not, install anything from non-official sources in your new installation (i.e. avoid all PPAs at all costs).

2. Then in your new installation, do this:

Code: Select all

sudo apt-get install linux-oem-20.04d
This should give you the 5.14.x kernel. Reboot after installing it.

3. Then apply these safe speed tweaks, notably item 5.3:
https://easylinuxtipsproject.blogspot.c ... -mint.html

4. Test and report here.
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Stqrlxt
Level 1
Level 1
Posts: 8
Joined: Wed Nov 10, 2021 12:23 pm

Re: How can I remove screen-tearing and input lag at the same time?

Post by Stqrlxt »

I appreciate the help but I'm not actually allowed to mess with any more stuff than I've already messed with on this laptop because I'm not the only one using it.
User avatar
Pjotr
Level 24
Level 24
Posts: 20091
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: How can I remove screen-tearing and input lag at the same time?

Post by Pjotr »

Stqrlxt wrote: Sun Jan 23, 2022 11:11 am I appreciate the help but I'm not actually allowed to mess with any more stuff than I've already messed with on this laptop because I'm not the only one using it.
Then you have a problem indeed. Good luck....
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Stqrlxt
Level 1
Level 1
Posts: 8
Joined: Wed Nov 10, 2021 12:23 pm

Re: How can I remove screen-tearing and input lag at the same time?

Post by Stqrlxt »

Please don't leave me in the dark like that. If the friend's suggestions are that problem, then we could just delete them you know. I don't mind that. You gotta understand my situation here, please. :(
mikeflan
Level 17
Level 17
Posts: 7106
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: How can I remove screen-tearing and input lag at the same time?

Post by mikeflan »

We understand your situation and can do less about it than you can. That is why we say you have a problem we may not be able to fix.
Stqrlxt
Level 1
Level 1
Posts: 8
Joined: Wed Nov 10, 2021 12:23 pm

Re: How can I remove screen-tearing and input lag at the same time?

Post by Stqrlxt »

So, I guess that means no solution for my problem? I guess I'll just have to cope with the extreme screen tearing when I'm playing. :(
Anyways thank you guys!
(I'll still be checking this post for replies and if someone else has a solution please do submit it here)
djph
Level 7
Level 7
Posts: 1928
Joined: Thu Jun 27, 2019 5:43 am
Location: ::1

Re: How can I remove screen-tearing and input lag at the same time?

Post by djph »

If you can't make any changes (e.g. removing picom), then it's kind of difficult to give much (if any) useful help beyond general "try this and see" type suggestions.

The AMD a6 model you have is pretty new as I recall; but still "old enough" that the 5.4 kernel should be alright (IIRC, it came out in '17 or '18). You might do well to install amdgpu-pro driver (i.e. the closed-source one, although it might've been renamed in Ubuntu 20.04, I can never remember). For some reason or other, it seems that that doesn't show up in driver manager when you're on a laptop (probably some weirdness about it being on-die vs. on a daughtercard).

If you ONLY see the tearing in minecraft, it's possible that it's related to the JVM (e.g. you're not giving enough resources when launching the game). That should be settable; although it's been ages since I've tweaked the RAM, etc. when launching a java application.
Stqrlxt
Level 1
Level 1
Posts: 8
Joined: Wed Nov 10, 2021 12:23 pm

Re: How can I remove screen-tearing and input lag at the same time?

Post by Stqrlxt »

No, I meant making changes to like the major stuff (like installed OS's etc.). I can make changes to mint and I could download amdgpu-pro driver or delete picom.
But you will have to guide me through it as I am completely new to Linux Mint xfce.
Hope you're able to find a solution.
Locked

Return to “Beginner Questions”