Screen tearing only in Steam games in standard user account

Hello,

I’m having a bizarre problem. I have screen tearing issues, but only in games on Steam, and apparently only in native Linux games using Vulkan. Not in windows Steam games run through Proton. I have installed Steam and run it from a second user account, set with standard account type, which I’m now aware does not have sudo privileges like my prior Linux distribution Linuxmint allowed. Not the default created administrator account. I don’t have any screen tearing issues in either user account with videos on Firefox, or videos played in VLC. Also no screen tearing in Supertuxkart in both accounts.

Inxi output:

  Kernel: 6.2.8-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.2-x86_64
    root=UUID=7361f228-1102-406f-93c9-8c30f3d4372e rw quiet splash apparmor=1
    security=apparmor udev.log_priority=3
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: xfwm
    v: 4.18.0 vt: 7 dm: LightDM v: 1.32.0 Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ASUSTeK model: Z170-A v: Rev 1.xx
    serial: <superuser required> UEFI-[Legacy]: American Megatrends v: 3802
    date: 03/15/2018
Battery:
  Message: No system battery data found. Is one present?
Memory:
  RAM: total: 15.56 GiB used: 3.9 GiB (25.1%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: Intel Core i7-6700K bits: 64 type: MT MCP arch: Skylake-S
    gen: core 6 level: v3 note: check built: 2015 process: Intel 14nm family: 6
    model-id: 0x5E (94) stepping: 3 microcode: 0xF0
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 8 MiB desc: 1x8 MiB
  Speed (MHz): avg: 799 high: 800 min/max: 800/4200 scaling:
    driver: intel_pstate governor: powersave cores: 1: 800 2: 799 3: 800 4: 800
    5: 800 6: 800 7: 800 8: 800 bogomips: 64026
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 bmi1 bmi2 bts clflush
    clflushopt cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64
    dtherm dts epb erms est f16c flush_l1d fma fpu fsgsbase fxsr ht hwp
    hwp_act_window hwp_epp hwp_notify ibpb ibrs ida intel_pt invpcid
    invpcid_single lahf_lm lm mca mce md_clear mmx monitor movbe mpx msr mtrr
    nonstop_tsc nopl nx pae pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln
    pni popcnt pse pse36 pti pts rdrand rdseed rdtscp rep_good sdbg sep smap
    smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tsc
    tsc_adjust tsc_deadline_timer vme x2apic xgetbv1 xsave xsavec xsaveopt
    xsaves xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX unsupported
  Type: l1tf mitigation: PTE Inversion
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: IBRS
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: IBRS, IBPB: conditional, STIBP: conditional,
    RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort mitigation: TSX disabled
Graphics:
  Device-1: NVIDIA GM204 [GeForce GTX 970] vendor: ASUSTeK driver: nvidia
    v: 530.41.03 alternate: nouveau,nvidia_drm non-free: 530.xx+
    status: current (as of 2023-03) arch: Maxwell code: GMxxx
    process: TSMC 28nm built: 2014-19 pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 3 speed: 8 GT/s bus-ID: 01:00.0 chip-ID: 10de:13c2
    class-ID: 0300
  Display: x11 server: X.Org v: 21.1.8 compositor: xfwm v: 4.18.0 driver: X:
    loaded: nvidia gpu: nvidia display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 2560x1440 s-dpi: 96 s-size: 677x381mm (26.65x15.00")
    s-diag: 777mm (30.58")
  Monitor-1: DP-0 res: 2560x1440 hz: 60 dpi: 109
    size: 597x336mm (23.5x13.23") diag: 685mm (26.97") modes: N/A
  API: OpenGL v: 4.6.0 NVIDIA 530.41.03 renderer: NVIDIA GeForce GTX
    970/PCIe/SSE2 direct-render: Yes
Audio:
  Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel alternate: snd_soc_avs bus-ID: 00:1f.3
    chip-ID: 8086:a170 class-ID: 0403
  Device-2: NVIDIA GM204 High Definition Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 01:00.1 chip-ID: 10de:0fbb class-ID: 0403
  API: ALSA v: k6.2.8-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 0.3.67 status: off tools: pw-cli
  Server-3: PulseAudio v: 16.1 status: active tools: pacat,pactl,pavucontrol
Network:
  Device-1: Intel Ethernet I219-V vendor: ASUSTeK driver: e1000e v: kernel
    port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15b8 class-ID: 0200
  IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: noprefixroute scope: global broadcast: <filter>
  WAN IP: <filter>
Bluetooth:
  Message: No bluetooth data found.
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 3.64 TiB used: 125.63 GiB (3.4%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Sabrent model: Rocket Q
    size: 1.82 TiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: RKT30Q.1 temp: 25.9 C scheme: MBR
  ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST2000DM001-1ER164
    size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: CC25 scheme: MBR
  Optical-1: /dev/sr0 vendor: HL-DT-ST model: DVDRAM GH24NSC0 rev: LK00
    dev-links: cdrom
  Features: speed: 12 multisession: yes audio: yes dvd: yes
    rw: cd-r,cd-rw,dvd-r,dvd-ram state: running
Partition:
  ID-1: / raw-size: 1.82 TiB size: 1.79 TiB (98.37%) used: 125.63 GiB (6.9%)
    fs: ext4 dev: /dev/nvme0n1p1 maj-min: 259:1 label: N/A
    uuid: 7361f228-1102-406f-93c9-8c30f3d4372e
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 512 MiB used: 1024 KiB (0.2%) priority: -2
    file: /swapfile
Unmounted:
  ID-1: /dev/sda1 maj-min: 8:1 size: 1.82 TiB fs: ntfs label: MM-storage
    uuid: 7DC123C74498A0AD
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 2 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 2-0:1 info: Hi-speed hub with single TT ports: 16 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 2-10:2 info: Sunplus Innovation Optical Mouse type: Mouse
    driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 1.5 Mb/s power: 98mA
    chip-ID: 1bcf:0005 class-ID: 0301
  Hub-3: 3-0:1 info: Super-speed hub ports: 10 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-4: 4-0:1 info: Super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 24.0 C mobo: N/A gpu: nvidia temp: 54 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 18%
Info:
  Processes: 281 Uptime: 3h 34m wakeups: 0 Init: systemd v: 252
  default: graphical tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7
  Packages: pm: pacman pkgs: 1170 libs: 367 tools: pamac pm: flatpak pkgs: 0
  Shell: Bash v: 5.1.16 running-in: xfce4-terminal inxi: 3.3.26

Here is what I’ve tried so far.

From the administrator user account:

sudo nvidia-settings

Check mark, “Force full composition pipe line”, click on apply, then click on “Save to X configuration File”, and save it to

/etc/X11/mhwd.d/nvidia.conf

Logged into the standard type user account and enabled Force full composition pipe line in nvidia-settings.

Then restarted Manjaro and tested in Steam games.

The above solution changed absolutely nothing.

From the standard type user account that Steam is installed and run from:

I’ve tried disabling the XFCE compositor via XFCE Menu—>Settings—>Window Manager Tweaks—> Compositor tab—>Remove the check mark for “Enable display compositing”.

No difference or improvement.

Just to be sure I also used the terminal command to do the same thing that I found in this link:

xfconf-query -c xfwm4 -p /general/use_compositing -s false

No difference or improvement.

At this point I disabled Force full composition pipe line in nvidia-settings in both user accounts and deleted the added line in /etc/X11/mhwd.d/nvidia.conf, and restarted Manjaro.

From this link, I used the terminal command from the standard type user account:

nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"

This made no difference either.

I’m not entirely sure what the issue is. Is it possible that the XFCE compositor is still causing problems even when disabled?

In this link, I’ve tried changing the vblank mode to all three, one at a time and testing, with no improvement.

What I have not tried is:

Changing compositor as the Arch Linux wiki says in the link above. I don’t understand why this is a option to fix screen tearing.

I’m at my wits end with this, and I understand the KDE version of Manjaro has a better compositor to deal with screen tearing. Such that I might just re-install Manjaro with the KDE version to give it a try, if I find there is no solution to this.

I’m happy to post other logs, or system info if needed.

Any ideas to fix this?

Hello,

Please provide that file content to make sure things are right.
Make sure you do not have a custom xorg.conf file lurking around, so after editing and saving /etc/X11/mhwd.d/nvidia.conf, run this command:

sudo mhwd-gpu --setmod nvidia --setxorg /etc/X11/mhwd.d/nvidia.conf

I have a GTX 960 and never gave me any troubles with the updates … but i use early kms. Did you enable it too on your install? There are two ways to enable that. Both require in /etc/default/grub to have this line:

GRUB_CMDLINE_LINUX="nvidia-drm.modeset=1"
  1. First method is to add in /etc/mkinitcpio.conf to the MODULES=() line to be like this:
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
  1. Second method is to use the kms in the HOOKS line … here is an example from mine:
HOOKS=(base systemd autodetect modconf kms keyboard keymap block filesystems)

Do not use both methods!
After you made the changes run:
sudo sudo mkinitcpio -P && sudo update-grub

That and a proper nvidia.conf file should give a decent desktop experience, with no flickers, no tearing.

Hello bogdancovaciu,

Thank you for your response. Below is the contents of my /etc/X11/mhwd.d/nvidia.conf file. Please note force full composition pipeline is not enabled, and thus not currently in this file. Let me know if I should enable that option.

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 530.41.03

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Ancor Communications Inc ASUS PB278"
    HorizSync       24.0 - 99.0
    VertRefresh     24.0 - 76.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 970"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

There is no xorg.conf sitting in what would normally be /etc/X11, for other Linux distributions. I deleted them once I figured out that this was the incorrect place and file name for the Manjaro distribution.

Your first terminal command mhwd-gpu, checks to make sure the Nvidia driver knows where the config file is located?

Does the following output help, or should I just run your command anyways?

$  mhwd-gpu --status 
:: status
  xorg configuration file: '/etc/X11/mhwd.d/nvidia.conf'

Early KMS is a new concept to me in Linux, so that answer is: No I did not enable it upon install of Manjaro. Just the closed source Nvidia proprietary graphics drivers were selected. Have been doing a little reading at the following two links:

https://wiki.archlinux.org/title/kernel_mode_setting

https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting

Let me know what you want me to do with nvidia.conf file, and then we can go from there.

Thank you for your help. :slight_smile:

Let’s try with this /etc/X11/mhwd.d/nvidia.conf instead of yours, and work from there.

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "ASUS"
    ModelName      "Ancor Communications Inc ASUS PB278"
    HorizSync       24.0 - 99.0
    VertRefresh     24.0 - 76.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GTX 970"
    Option         "TripleBuffer"  "On"
    Option  "ConnectToAcpid"    "Off"
    Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"
EndSection

Section "Screen"
    Option         "Coolbits" "31"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option         "COMPOSITE" "Enable"
EndSection

 
Section "InputClass"
    Identifier          "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Done! Restarted and tested. The problem is still the same.

Hello bogdancovaciu,

Do you have further things for me to try to resolve my screen tearing issues?

I have a partial solution to this problem. And I apologize, as I made a mistake in the type of games that are having the screen tearing problems. They are both native Linux titles bought through Steam, but are both OpenGL, not Vulkan like I first stated. The specific titles are Factorio and Dying Light.

I’ve been able to resolve the Factorio screen tearing problems. I got the inspiration from this Factorio forum post. User quyxkh mentions:

A little light googling says it’s a refresh-rate mismatch and you sometimes have to turn gsync/freesync on yourself, or force the monitor to 60Hz, or set game.speed to (refresh Hz/60), if you’ve got nvidia hardware.

My fix was as such. From the default administrator login account in the Terminal:

sudo nvidia-settings

Goto the “X Server Display Configuration”, and changed the resolution and refresh rate from both auto to, 2560x1440, and 60 Hz.

Clicked on “Advanced…”, and then “Save to X Configuration File”, and then “Show Preview…”.

For me there was only one line change to make, so I did not choose to actually save this file. I just copied the new line from the preview. Deleted the old one, and pasted the new line in.

sudo mousepad /etc/X11/mhwd.d/nvidia.conf

(Replace mousepad with whatever your basic text editor is you use.)

From user bogdancovaciu’s custom nvidia.conf, the relevant line was:

    Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"

The new line replacing it is the following. Notice nvidia-auto-select is replaced by the hard set screen resolution and refresh rate of 2560x1440_60, and it also added in ForceCompositionPipeline=On:

        Option         "metamodes" "2560x1440_60 +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"

Saved the file, restarted Manjaro, and Factorio plays without screen tearing now!

It occurs to me now in hindsight on my prior Linux distribution of Linuxmint, that at some point in the past when enabling ForceFullCompositionPipeline, the exact screen resolution, and refresh rate had to be specified for each monitor it was used on. A major pain to type up and create when you have a PC monitor with some games not playing at native screen resolution, and a TV that also connects. And then if you forget to save that file and Nvidia over writes it with a new driver update. Yuck!

I certainly hope the AMD open source GPU driver has a better, and easier way of dealing with this, as that is what I plan to switch to within the next year.

For Dying Light I could find no solution.

The only game specific information I could find about it was this old one..

It seems the people that were able to resolve it were enabling and using adaptive vsync, which I believe is Nvidia’s G-sync feature, which my PC monitor does not support.

My issue with this specific game also might be a little unique as my frame rates are in the 26 to 30FPS range, which is well below the 60 Hz refresh rate of the monitor. I’ve tried lowering the game resolution significantly with no drastic increase in FPS. Disabling other video settings also does not make much difference.

It’s bizarre how of all the games I now have installed on Manjaro XFCE, Dying Light is the only one that is problematic. Even really old games that I used to constantly have screen tearing issues with are fine. And I purposely installed them just to see what would happen.

Edit 4/26/2023: Disregard my old comment below, this issue is not fixed. I still have screen tearing issues, but only in Factorio. I’m going to keep looking for a solution.


This is now completely solved!

The fix is to run the Proton version of Dying Light, not the native Linux version. It not only fixes this nasty screen tearing problem, but almost doubles my FPS, and the graphics look much better!!!

See the details in my other post linked below:

For my fix for Factorio screen tearing, see my comment above this one.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.