You are not logged in.

#1 2022-10-31 18:06:28

drpyser
Member
Registered: 2022-10-31
Posts: 10

Tearing and serious lag in X terminal emulators on X1 Gen 10

Hi people, need some help.

Recently installed arch on a brand new X1 Gen 10 laptop.

Tried to make sure and install relevant firmwares, video drivers and packages for intel, etc.
Installed and configured a basic i3wm setup.

I'm experiencing horrendous lagging and tearing in terminal emulators on X(tried with Alacritty, my preferred choice, and xterm as a reference point).
It's like I'm on a flaky ssh connection. Continuous key strokes struggle to render(appearing in large delayed swats instead of in real time), any command output takes time to finish rendering, switching workspace produces tearing and other visual artifacts that can take seconds to dissipate, opening a terminal editor(kakoune) on small files can take seconds to correctly render.

Read documentation on intel graphics(https://wiki.archlinux.org/title/intel_graphics), hardware acceleration(https://wiki.archlinux.org/title/Hardware_video_acceleration) and tried tweaking kernel module parameters, installing different driver packages.

glxgears works fine with the drivers I installed. glxinfo, vainfo outputs seem fine. I found no obvious error in kernel or Xorg logs.

$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) Graphics (ADL GT2) (0x46a6)
    Version: 22.2.1
    Accelerated: yes
    Video memory: 15708MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Graphics (ADL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.2.1
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.2.1
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.2.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
$ vainfo
vainfo: VA-API version: 1.16 (libva 2.15.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.4.4 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   :	VAEntrypointVideoProc
      VAProfileNone                   :	VAEntrypointStats
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Simple            :	VAEntrypointEncSlice
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointFEI
      VAProfileH264Main               :	VAEntrypointEncSliceLP
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointFEI
      VAProfileH264High               :	VAEntrypointEncSliceLP
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:	VAEntrypointFEI
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointFEI
      VAProfileHEVCMain               :	VAEntrypointEncSliceLP
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointEncSlice
      VAProfileHEVCMain10             :	VAEntrypointEncSliceLP
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileVP9Profile0            :	VAEntrypointEncSliceLP
      VAProfileVP9Profile1            :	VAEntrypointVLD
      VAProfileVP9Profile1            :	VAEntrypointEncSliceLP
      VAProfileVP9Profile2            :	VAEntrypointVLD
      VAProfileVP9Profile2            :	VAEntrypointEncSliceLP
      VAProfileVP9Profile3            :	VAEntrypointVLD
      VAProfileVP9Profile3            :	VAEntrypointEncSliceLP
      VAProfileHEVCMain12             :	VAEntrypointVLD
      VAProfileHEVCMain12             :	VAEntrypointEncSlice
      VAProfileHEVCMain422_10         :	VAEntrypointVLD
      VAProfileHEVCMain422_10         :	VAEntrypointEncSlice
      VAProfileHEVCMain422_12         :	VAEntrypointVLD
      VAProfileHEVCMain422_12         :	VAEntrypointEncSlice
      VAProfileHEVCMain444            :	VAEntrypointVLD
      VAProfileHEVCMain444            :	VAEntrypointEncSliceLP
      VAProfileHEVCMain444_10         :	VAEntrypointVLD
      VAProfileHEVCMain444_10         :	VAEntrypointEncSliceLP
      VAProfileHEVCMain444_12         :	VAEntrypointVLD
      VAProfileHEVCSccMain            :	VAEntrypointVLD
      VAProfileHEVCSccMain            :	VAEntrypointEncSliceLP
      VAProfileHEVCSccMain10          :	VAEntrypointVLD
      VAProfileHEVCSccMain10          :	VAEntrypointEncSliceLP
      VAProfileHEVCSccMain444         :	VAEntrypointVLD
      VAProfileHEVCSccMain444         :	VAEntrypointEncSliceLP
      VAProfileAV1Profile0            :	VAEntrypointVLD
      VAProfileHEVCSccMain444_10      :	VAEntrypointVLD
      VAProfileHEVCSccMain444_10      :	VAEntrypointEncSliceLP
$ uname -a
Linux drpyser-wazo-workstation 6.0.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 29 Oct 2022 14:08:39 +0000 x86_64 GNU/Linux

Here's some log files, including dmesg output, Xorg logs and `pacman -Qi` output:
https://gist.github.com/DrPyser/41cde6a … c8884ce0f2

Notably, the dmesg logs pertaining to the i915 video driver:

[  +0.000007] i915: unknown parameter 'perf_stream_paranoid' ignored
[  +0.000227] i915 0000:00:02.0: enabling device (0006 -> 0007)
[  +0.000034] i915 0000:00:02.0: vgaarb: deactivate vga console
[  +0.000037] i915 0000:00:02.0: [drm] Using Transparent Hugepages
[  +0.000430] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=mem
[  +0.004590] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/adlp_dmc_ver2_16.bin (v2.16)
[  +0.027665] i915 0000:00:02.0: [drm] GuC firmware i915/adlp_guc_70.1.1.bin version 70.1
[  +0.000006] i915 0000:00:02.0: [drm] HuC firmware i915/tgl_huc_7.9.3.bin version 7.9
[  +0.014756] i915 0000:00:02.0: [drm] HuC authenticated
[  +0.000995] i915 0000:00:02.0: [drm] GuC submission enabled
[  +0.000001] i915 0000:00:02.0: [drm] GuC SLPC enabled
[  +0.000801] i915 0000:00:02.0: [drm] GuC RC: enabled
[  +0.003004] i915 0000:00:02.0: [drm] Protected Xe Path (PXP) protected content support initialized
[  +1.184169] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0
[  +0.003721] fbcon: i915drmfb (fb0) is primary device
[  +0.021097] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
[  +0.000082] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[  +0.026225] mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: bound 0000:00:02.0 (ops i915_pxp_tee_component_ops [i915])
[  +0.001452] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[  +8.606399] i915 0000:00:02.0: [drm] Selective fetch area calculation failed in pipe A

(Tried setting perf_stream_paranoid=0 as per documentation, but this setting does not seem to be recognised by my system).

If anyone has experience with linux on Thinkpad X1 Gen 10 laptops, or can give advice in order to better diagnose the issue, it would be much appreciated.

Thanks all!

EDIT: The symptoms disappeared mysteriously at some point in one session, only to come back after restarting X. I'll try to think about what happened, but this seems to be an intermittent problem...

Last edited by drpyser (2022-11-01 15:25:33)

Offline

#2 2022-11-01 15:53:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Tearing and serious lag in X terminal emulators on X1 Gen 10

As noted in your other thread, you should not repost - especially just an empty post linking back to this one.  You've included good information here, give people time to digest it and give suggestions.

FWIW, I gave up on X11 due to painful video tearing issues a while back.  If you use i3wm, you may like sway under wayland - any video tearing should almost certainly be gone and it will function almost the same as i3 under X.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2022-11-01 16:08:49

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,800

Offline

#4 2022-11-01 16:48:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Tearing and serious lag in X terminal emulators on X1 Gen 10

Seth, the OP doesn't have xf86-video-intel installed (according to the pacman output provided).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2022-11-01 16:51:22

drpyser
Member
Registered: 2022-10-31
Posts: 10

Re: Tearing and serious lag in X terminal emulators on X1 Gen 10

Trilby wrote:

As noted in your other thread, you should not repost - especially just an empty post linking back to this one.  You've included good information here, give people time to digest it and give suggestions.

FWIW, I gave up on X11 due to painful video tearing issues a while back.  If you use i3wm, you may like sway under wayland - any video tearing should almost certainly be gone and it will function almost the same as i3 under X.

Thanks, I might try that. I'm trying to efficiently get a working setup for work without spending too much time on building a new, unfamiliar setup.
MIght be worth it anyway.

Offline

#6 2022-11-01 17:02:02

drpyser
Member
Registered: 2022-10-31
Posts: 10

Re: Tearing and serious lag in X terminal emulators on X1 Gen 10

As said, I'm using mesa and `intel-media-driver` packages(though I believe the later is only relevant for video playback?).

00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P Integrated Graphics Controller (rev 0c)
    Subsystem: Lenovo Device 22e7
    Kernel driver in use: i915
    Kernel modules: i915

Also added

lsgpu -p

output for more details on the graphics hardware: https://gist.githubusercontent.com/DrPy … /lsgpu.txt .

Last edited by drpyser (2022-11-01 17:02:37)

Offline

#7 2022-11-03 08:20:27

Rydgel
Member
From: France
Registered: 2008-09-04
Posts: 166
Website

Re: Tearing and serious lag in X terminal emulators on X1 Gen 10

I had the same problem, I added `i915` to the list of modules in `/etc/mkinitcpio.conf`, and installed/run a compositor (like picom with glx backend).
Don't forget to run `mkinitcpio -P` if you edit that file.

Also some people have been disabling psr and said it worked as well for them.
I did not need that with picom.

Offline

Board footer

Powered by FluxBB