Memory leak in Xorg when TearFree is enabled on xserver-xorg-video-intel
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xserver-xorg-video-intel (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Memory leaks in Xorg
Hi, Everyone.
I'm working software developer.
I'm having a problem right now.
Continuing to decode H.264 using ffmeg and libva causes a memory leak in Xorg.
This is especially likely to occur when the resolution is scaled (both UP and Down).
The settings of 20-intel.conf are as follows.
[20-intel.conf]
-------
Section "Device"
Identifier "Card0"
Driver "intel"
BusID "PCI:0:2:0"
Option "AccelMethod" "sna"
Option "SwapbuffersWait" "False"
Option "TearFree" "True"
EndSection
-------
If you do not set TearFree, memory leaks will not occur, but tearing will occur.
It does not occur on Ubuntu 16.04 with the same settings.
Is there a way to eliminate the memory leak and prevent screen tearing?
[TOP Command Result]
-------
DATETME PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10:34:44 20 0 553532 36340 21692 S 20.0 0.5 4:33.33 Xorg
10:34:49 20 0 553724 36340 21692 S 20.2 0.5 4:34.34 Xorg
10:34:54 20 0 553724 36340 21692 S 20.1 0.5 4:35.35 Xorg
10:34:59 20 0 554112 36340 21692 S 20.1 0.5 4:36.36 Xorg
10:35:05 20 0 554112 36496 21756 S 20.2 0.5 4:37.38 Xorg
10:35:10 20 0 554112 36496 21756 S 20.1 0.5 4:38.39 Xorg
10:35:15 20 0 554112 36496 21756 S 20.0 0.5 4:39.39 Xorg
10:35:20 20 0 554368 36496 21756 S 20.2 0.5 4:40.40 Xorg
10:35:25 20 0 554368 36496 21756 S 20.1 0.5 4:41.41 Xorg
10:35:30 20 0 554368 36496 21756 S 20.7 0.5 4:42.45 Xorg
10:35:35 20 0 555076 36660 21800 S 19.8 0.5 4:43.45 Xorg
10:35:40 20 0 555076 36660 21800 S 20.0 0.5 4:44.45 Xorg
10:35:45 20 0 555076 36660 21800 S 20.1 0.5 4:45.46 Xorg
10:35:50 20 0 555076 36660 21800 S 20.1 0.5 4:46.47 Xorg
10:35:55 20 0 555076 36808 21860 S 19.8 0.5 4:47.47 Xorg
10:36:00 20 0 554692 36700 21748 S 19.8 0.5 4:48.46 Xorg
10:36:05 20 0 554824 36700 21748 S 19.7 0.5 4:49.46 Xorg
10:36:10 20 0 554824 36700 21748 R 20.5 0.5 4:50.49 Xorg
10:36:15 20 0 554824 36700 21748 S 19.7 0.5 4:51.48 Xorg
10:36:20 20 0 554824 36844 21812 S 20.0 0.5 4:52.49 Xorg
10:36:25 20 0 554312 36812 21748 S 19.9 0.5 4:53.49 Xorg
10:36:30 20 0 554312 36812 21748 S 20.0 0.5 4:54.49 Xorg
10:36:35 20 0 555400 36948 21856 S 20.1 0.5 4:55.51 Xorg
10:36:40 20 0 555532 36948 21856 S 19.9 0.5 4:56.51 Xorg
10:36:45 20 0 555532 36948 21856 S 19.8 0.5 4:57.50 Xorg
10:36:50 20 0 555532 36948 21856 S 20.4 0.5 4:58.53 Xorg
10:36:55 20 0 555020 37004 21820 S 19.9 0.5 4:59.53 Xorg
10:37:00 20 0 555020 37004 21820 S 19.7 0.5 5:00.52 Xorg
10:37:05 20 0 555020 37004 21820 S 20.8 0.5 5:01.57 Xorg
10:37:10 20 0 554700 36984 21748 S 19.1 0.5 5:02.53 Xorg
10:37:15 20 0 554640 37012 21756 S 19.9 0.5 5:03.53 Xorg
10:37:20 20 0 555728 37144 21876 S 19.8 0.5 5:04.54 Xorg
10:37:25 20 0 555728 37144 21876 S 20.0 0.5 5:05.55 Xorg
10:37:30 20 0 555728 37144 21876 S 19.9 0.5 5:06.55 Xorg
10:37:35 20 0 555728 37144 21876 S 20.6 0.5 5:07.58 Xorg
10:37:40 20 0 555728 37144 21876 S 19.9 0.5 5:08.58 Xorg
10:37:46 20 0 555600 37248 21876 S 20.0 0.5 5:09.59 Xorg
10:37:51 20 0 555924 37248 21876 S 20.0 0.5 5:10.59 Xorg
10:37:56 20 0 555924 37248 21876 S 20.4 0.5 5:11.61 Xorg
10:38:01 20 0 555924 37248 21876 S 20.5 0.5 5:12.64 Xorg
10:38:06 20 0 555924 37248 21876 S 19.8 0.5 5:13.64 Xorg
10:38:11 20 0 555924 37248 21876 S 20.4 0.5 5:14.67 Xorg
10:38:16 20 0 554708 37240 21748 S 20.2 0.5 5:15.68 Xorg
10:38:21 20 0 554708 37240 21748 S 19.9 0.5 5:16.68 Xorg
10:38:26 20 0 554712 37260 21732 S 20.2 0.5 5:17.70 Xorg
10:38:31 20 0 554712 37260 21732 S 19.6 0.5 5:18.68 Xorg
10:38:36 20 0 554712 37260 21732 S 19.9 0.5 5:19.69 Xorg
10:38:41 20 0 554712 37260 21732 S 19.9 0.5 5:20.69 Xorg
10:38:46 20 0 554456 37300 21700 S 19.7 0.5 5:21.68 Xorg
10:38:51 20 0 556056 37436 21816 S 19.8 0.5 5:22.68 Xorg
10:38:56 20 0 556188 37436 21816 S 20.1 0.5 5:23.69 Xorg
10:39:01 20 0 556188 37436 21816 S 19.5 0.5 5:24.67 Xorg
10:39:06 20 0 556188 37436 21816 S 20.4 0.5 5:25.70 Xorg
10:39:11 20 0 556188 37588 21900 S 19.7 0.5 5:26.69 Xorg
10:39:16 20 0 554972 37468 21748 S 20.1 0.5 5:27.70 Xorg
10:39:21 20 0 554972 37468 21748 S 19.6 0.5 5:28.69 Xorg
10:39:26 20 0 556124 37608 21864 S 19.9 0.5 5:29.69 Xorg
10:39:31 20 0 556256 37608 21864 S 19.9 0.5 5:30.69 Xorg
10:39:36 20 0 556256 37608 21864 S 20.4 0.5 5:31.72 Xorg
10:39:41 20 0 556256 37608 21864 S 19.9 0.5 5:32.72 Xorg
10:39:46 20 0 556256 37608 21864 S 19.7 0.5 5:33.71 Xorg
10:39:51 20 0 556256 37608 21864 S 20.2 0.5 5:34.74 Xorg
10:39:56 20 0 556256 37756 21892 S 20.4 0.5 5:35.76 Xorg
10:40:01 20 0 556256 37756 21892 S 19.5 0.5 5:36.74 Xorg
10:40:06 20 0 556068 37764 21852 S 19.7 0.5 5:37.73 Xorg
10:40:11 20 0 556068 37764 21852 S 19.8 0.5 5:38.72 Xorg
10:40:16 20 0 554980 37668 21716 S 19.7 0.5 5:39.71 Xorg
10:40:21 20 0 554980 37668 21716 S 19.8 0.5 5:40.70 Xorg
10:40:26 20 0 556196 37804 21828 S 20.7 0.5 5:41.74 Xorg
10:40:32 20 0 556196 37804 21828 S 19.9 0.5 5:42.74 Xorg
10:40:37 20 0 556196 37804 21828 S 19.7 0.5 5:43.73 Xorg
10:40:42 20 0 556328 37804 21828 S 20.2 0.5 5:44.74 Xorg
10:40:47 20 0 555112 37776 21716 S 20.4 0.5 5:45.76 Xorg
10:40:52 20 0 555176 37776 21716 S 20.3 0.5 5:46.78 Xorg
10:40:57 20 0 555496 37776 21716 S 19.8 0.5 5:47.78 Xorg
10:41:02 20 0 555496 37776 21716 S 20.5 0.5 5:48.81 Xorg
10:41:07 20 0 555496 37776 21716 S 20.5 0.5 5:49.84 Xorg
10:41:12 20 0 556392 37936 21784 S 19.8 0.5 5:50.84 Xorg
10:41:17 20 0 556524 37936 21784 S 19.9 0.5 5:51.84 Xorg
10:41:22 20 0 556524 37936 21784 S 19.8 0.5 5:52.83 Xorg
10:41:27 20 0 556524 38080 21876 S 20.2 0.5 5:53.85 Xorg
10:41:32 20 0 556524 38080 21876 S 19.7 0.5 5:54.84 Xorg
10:41:37 20 0 555628 38020 21764 S 20.1 0.5 5:55.85 Xorg
10:41:42 20 0 556588 38156 21884 S 20.0 0.5 5:56.86 Xorg
10:41:47 20 0 556588 38156 21884 S 20.1 0.5 5:57.87 Xorg
10:41:52 20 0 556720 38156 21884 S 20.0 0.5 5:58.87 Xorg
10:41:57 20 0 556720 38156 21884 S 20.3 0.5 5:59.89 Xorg
10:42:02 20 0 556720 38156 21884 S 19.8 0.5 6:00.89 Xorg
10:42:07 20 0 555824 38140 21772 S 19.7 0.5 6:01.88 Xorg
10:42:12 20 0 556528 38140 21772 R 20.8 0.5 6:02.92 Xorg
10:42:17 20 0 556528 38140 21772 S 19.5 0.5 6:03.91 Xorg
10:42:22 20 0 556528 38284 21860 S 19.4 0.5 6:04.88 Xorg
10:42:27 20 0 556660 38284 21860 S 20.1 0.5 6:05.89 Xorg
10:42:32 20 0 556660 38284 21860 S 20.1 0.5 6:06.91 Xorg
10:42:37 20 0 555508 38168 21684 S 19.7 0.5 6:07.90 Xorg
10:42:42 20 0 555508 38196 21692 S 20.0 0.5 6:08.92 Xorg
10:42:47 20 0 555508 38196 21692 S 19.7 0.5 6:09.91 Xorg
10:42:52 20 0 555764 38196 21692 S 19.3 0.5 6:10.88 Xorg
10:42:57 20 0 556020 38328 21764 S 20.4 0.5 6:11.90 Xorg
10:43:02 20 0 556152 38328 21764 S 20.0 0.5 6:12.90 Xorg
-------
[Environment]
-------
Version:
Ubuntu 20.04
CPU:
Intel(R) Celeron(R) CPU 4205U @ 1.80GHz
CPU Function Flag:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust smep erms invpcid mpx rdseed smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d arch_capabilities
Chipset:
product: Intel Corporation
vendor: Intel Corporation
physical id: 100
bus info: pci@0000:00:00.0
version: 0b
width: 32 bits
clock: 33MHz
*-display
Memory Capacity:
7558696 kB
Graphic Board:
Intel Corporation
-------
[Packages]
-------
ii python3-xkit 0.5.0ubuntu4 all library for the manipulation of xorg.conf files (Python 3)
ii xorg 1:7.7+19ubuntu14 amd64 X.Org X Window System
ii xorg-docs-core 1:1.7.1-1.1 all Core documentation for the X.org X Window System
ii xorg-sgml-doctools 1:1.11-1 all Common tools for building X.Org SGML documentation
ii xserver-xorg 1:7.7+19ubuntu14 amd64 X.Org X server
ii xserver-xorg-core 2:1.20.8-2ubuntu2.6 amd64 Xorg X server - core server
ii xserver-xorg-dev 2:1.20.8-2ubuntu2.6 amd64 Xorg X server - development files
ii xserver-
ii xserver-
ii xserver-
ii xserver-xorg-legacy 2:1.20.8-2ubuntu2.6 amd64 setuid root Xorg server wrapper
ii xserver-
ii xserver-
ii xserver-
ii xserver-
ii xserver-
ii xserver-
ii xserver-
ii xserver-
ii xserver-
ii xserver-
-------
description: | updated |
affects: | canonical-identity-provider → xorg-server (Ubuntu) |
The 'intel' driver isn't really being maintained anymore. So it sounds unlikely this will be fixed.
Unfortunately the supported 'modesetting' driver doesn't have a TearFree option yet:
https:/ /gitlab. freedesktop. org/xorg/ xserver/ -/issues/ 244
But the good news is that it still doesn't tear for most people. The 'modesetting' driver will only tear if you have multiple monitors or enable fractional scaling. In both of those cases you can avoid all tearing by logging into 'Ubuntu on Wayland' instead.