You are not logged in.

#1 2021-01-07 13:23:47

jimkat
Member
Registered: 2021-01-07
Posts: 4

[SOLVED] X freezes randomly

The last week X started freezing randomly and it responds to nothing so I have to close the computer from the power button. When I play a youtube video and X freezes the sound keeps working. I tried moving the mouse blindly to stop the video and see if that works but it doesnt. I also tried switching ttys with ctrl+alt+f{2..6} but that also doesnt work. Only the power button works.

When it happens the fans go crazy so I tried having htop on the corner of the screen to see if there is something uncommon just before the freeze there but there isn't. The only thing I've been able to find is that if I wait long enough on the frozen screen and then I reboot journalctl has something that looks like this:

Jan 07 13:56:46 JimKat kernel: INFO: task kworker/4:1H:107 blocked for more than 245 seconds.
Jan 07 13:56:46 JimKat kernel:       Not tainted 5.10.4-arch2-1 #1
Jan 07 13:56:46 JimKat kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Jan 07 13:56:46 JimKat kernel: task:kworker/4:1H    state:D stack:    0 pid:  107 ppid:     2 flags:0x00004000
Jan 07 13:56:46 JimKat kernel: Workqueue: events_highpri intel_atomic_cleanup_work [i915]
Jan 07 13:56:46 JimKat kernel: Call Trace:
Jan 07 13:56:46 JimKat kernel:  __schedule+0x295/0x810
Jan 07 13:56:46 JimKat kernel:  schedule+0x5b/0xc0
Jan 07 13:56:46 JimKat kernel:  schedule_preempt_disabled+0x11/0x20
Jan 07 13:56:46 JimKat kernel:  __ww_mutex_lock.constprop.0+0x4bd/0x810
Jan 07 13:56:46 JimKat kernel:  intel_unpin_fb_vma+0x25/0xa0 [i915]
Jan 07 13:56:46 JimKat kernel:  drm_atomic_helper_cleanup_planes+0x52/0x70 [drm_kms_helper]
Jan 07 13:56:46 JimKat kernel:  intel_atomic_cleanup_work+0x67/0x110 [i915]
Jan 07 13:56:46 JimKat kernel:  process_one_work+0x1d6/0x3a0
Jan 07 13:56:46 JimKat kernel:  worker_thread+0x4d/0x3d0
Jan 07 13:56:46 JimKat kernel:  ? rescuer_thread+0x410/0x410
Jan 07 13:56:46 JimKat kernel:  kthread+0x133/0x150
Jan 07 13:56:46 JimKat kernel:  ? __kthread_bind_mask+0x60/0x60
Jan 07 13:56:46 JimKat kernel:  ret_from_fork+0x22/0x30
Jan 07 13:57:51 JimKat systemd-logind[360]: Power key pressed.
Jan 07 13:57:51 JimKat systemd-logind[360]: Powering Off...
Jan 07 13:57:51 JimKat systemd-logind[360]: System is powering down.
-- Boot 1e1a6890f3fe4385bdc6b02e659364ee --

just before I reboot (I have to wait long enough if I reboot quickly it does not appear). So I searched for others with the same problem and I found many from various distros, but with their posts ranging from 1 to 10 years ago. No one seems to have the same problem from a recent update. It seems to be caused by the i915 kernel module which has to do with video. The wiki had something about random X freezing and it suggested putting option NoAccel in /etc/X11/xorg.conf.d/20-intel.conf but after I did that kde plasma started acting weird and it basically stopped working and dwm worked but mpv and vlc could not display videos.

Also when I boot on tty1 I get the message "topaz not supported on kfd" or something like that which people on forums said is harmless.

lspci returns this:

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 08)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1)
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1c.5 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #6 (rev f1)
00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point LPC Controller/eSPI Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445 / 530/535 / 620/625 Mobile] (rev c1)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller (rev 07)
03:00.0 Network controller: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter (rev 31)
04:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961

Any ideas?

Last edited by jimkat (2021-01-08 11:06:17)

Offline

#2 2021-01-07 13:31:02

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,237

Re: [SOLVED] X freezes randomly

If you have xf86-video-intel installed try without (... and removing any references to it if you have config files for it) if that doesn't help the obvous choice would be a kernel regression and you could try liux-lts or downgrading back to a 5.9 release.

That's for the quick fixes, maybe look into https://gitlab.freedesktop.org/drm/intel/-/issues/2905 and https://bbs.archlinux.org/viewtopic.php?id=262283

Offline

#3 2021-01-07 14:04:26

mizux
Member
Registered: 2010-10-03
Posts: 6

Re: [SOLVED] X freezes randomly

Seems to have the same issue with my nuc10i7:

```sh
Jan 07 14:21:10 nuc10i7 kernel: INFO: task kworker/8:1H:257 blocked for more than 122 seconds.
Jan 07 14:21:10 nuc10i7 kernel:       Tainted: G           OE     5.10.4-arch2-1 #1
Jan 07 14:21:10 nuc10i7 kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Jan 07 14:21:10 nuc10i7 kernel: task:kworker/8:1H    state:D stack:    0 pid:  257 ppid:     2 flags:0x00004000
Jan 07 14:21:10 nuc10i7 kernel: Workqueue: events_highpri intel_atomic_cleanup_work [i915]
Jan 07 14:21:10 nuc10i7 kernel: Call Trace:
Jan 07 14:21:10 nuc10i7 kernel:  __schedule+0x295/0x810
Jan 07 14:21:10 nuc10i7 kernel:  schedule+0x5b/0xc0
Jan 07 14:21:10 nuc10i7 kernel:  schedule_preempt_disabled+0x11/0x20
Jan 07 14:21:10 nuc10i7 kernel:  __ww_mutex_lock.constprop.0+0x4bd/0x810
Jan 07 14:21:10 nuc10i7 kernel:  intel_unpin_fb_vma+0x25/0xa0 [i915]
Jan 07 14:21:10 nuc10i7 kernel:  drm_atomic_helper_cleanup_planes+0x52/0x70 [drm_kms_helper]
Jan 07 14:21:10 nuc10i7 kernel:  intel_atomic_cleanup_work+0x67/0x110 [i915]
Jan 07 14:21:10 nuc10i7 kernel:  process_one_work+0x1d6/0x3a0
Jan 07 14:21:10 nuc10i7 kernel:  worker_thread+0x4d/0x3d0
Jan 07 14:21:10 nuc10i7 kernel:  ? rescuer_thread+0x410/0x410
Jan 07 14:21:10 nuc10i7 kernel:  kthread+0x133/0x150
Jan 07 14:21:10 nuc10i7 kernel:  ? __kthread_bind_mask+0x60/0x60
Jan 07 14:21:10 nuc10i7 kernel:  ret_from_fork+0x1f/0x30
```

CPU
```sh
lscpu
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   39 bits physical, 48 bits virtual
CPU(s):                          12
On-line CPU(s) list:             0-11
Thread(s) per core:              2
Core(s) per socket:              6
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           166
Model name:                      Intel(R) Core(TM) i7-10710U CPU @ 1.10GHz
Stepping:                        0
CPU MHz:                         3900.469
CPU max MHz:                     4700.0000
CPU min MHz:                     400.0000
BogoMIPS:                        3201.25
Virtualization:                  VT-x
L1d cache:                       192 KiB
L1i cache:                       192 KiB
L2 cache:                        1.5 MiB
L3 cache:                        12 MiB
NUMA node0 CPU(s):               0-11
Vulnerability Itlb multihit:     KVM: Mitigation: VMX disabled
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Enhanced IBRS, IBPB conditional, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           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 xtop
                                 ology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm a
                                 bm 3dnowprefetch cpuid_fault epb invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflu
                                 shopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d arch_capabilities
```

Offline

#4 2021-01-07 14:06:43

jimkat
Member
Registered: 2021-01-07
Posts: 4

Re: [SOLVED] X freezes randomly

After removing xf86-video-intel X doesn't start and when I reinstalled it to startx it printed this message

 (1/1) installing xf86-video-intel                                       [########################################] 100%
>>> This driver now uses DRI3 as the default Direct Rendering
    Infrastructure. You can try falling back to DRI2 if you run
    into trouble. To do so, save a file with the following
    content as /etc/X11/xorg.conf.d/20-intel.conf :
      Section "Device"
        Identifier  "Intel Graphics"
        Driver      "intel"
        Option      "DRI" "2"             # DRI3 is now default
        #Option      "AccelMethod"  "sna" # default
        #Option      "AccelMethod"  "uxa" # fallback
      EndSection
Optional dependencies for xf86-video-intel
    libxrandr: for intel-virtual-output [installed]
    libxinerama: for intel-virtual-output [installed]
    libxcursor: for intel-virtual-output [installed]
    libxtst: for intel-virtual-output [installed]
    libxss: for intel-virtual-output [installed]
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

So I did what it said and am waiting for it (not) to crash

Last edited by jimkat (2021-01-07 14:26:11)

Offline

#5 2021-01-07 14:19:29

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,237

Re: [SOLVED] X freezes randomly

Please us

[code]code[/code]

for command output.

X doesn't start without xf86-video-intel because you have manual configuration referencing the intel driver which you'd need to remove first.

Offline

#6 2021-01-08 10:17:46

jimkat
Member
Registered: 2021-01-07
Posts: 4

Re: [SOLVED] X freezes randomly

Ok, it's been a day and it hasn't crashed yet so I guess it is solved but now tearing is back. I had an

 Option "TearFree" "true"

in 20-intel.conf but had to delete it. Is there a way to fix the tearing?

Offline

#7 2021-01-08 10:28:25

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,237

Re: [SOLVED] X freezes randomly

Use an actual compositor.  Picom is a popular choice for standalone WMs that don't implement this themselves.

Offline

#8 2021-01-19 23:40:34

dbrief
Member
Registered: 2020-01-21
Posts: 15

Re: [SOLVED] X freezes randomly

jimkat wrote:

After removing xf86-video-intel X doesn't start and when I reinstalled it to startx it printed this message

 (1/1) installing xf86-video-intel                                       [########################################] 100%
>>> This driver now uses DRI3 as the default Direct Rendering
    Infrastructure. You can try falling back to DRI2 if you run
    into trouble. To do so, save a file with the following
    content as /etc/X11/xorg.conf.d/20-intel.conf :
      Section "Device"
        Identifier  "Intel Graphics"
        Driver      "intel"
        Option      "DRI" "2"             # DRI3 is now default
        #Option      "AccelMethod"  "sna" # default
        #Option      "AccelMethod"  "uxa" # fallback
      EndSection
Optional dependencies for xf86-video-intel
    libxrandr: for intel-virtual-output [installed]
    libxinerama: for intel-virtual-output [installed]
    libxcursor: for intel-virtual-output [installed]
    libxtst: for intel-virtual-output [installed]
    libxss: for intel-virtual-output [installed]
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

So I did what it said and am waiting for it (not) to crash

So has it still not crashed on you?

I had your exact same symptoms you described of freezing, down to how if you're watching video the vid would freeze but audio would continue.

Had the exact same error message and call tracing in my logs. But I haven't figured out how to get it not to randomly crash yet. It happens every 3-4 hours and definitely has something to do with the intel driver. I tried DRI 2 to no avail.

Offline

#9 2021-01-26 17:15:25

jimkat
Member
Registered: 2021-01-07
Posts: 4

Re: [SOLVED] X freezes randomly

After removing xf86-video-intel and /etc/X11/xorg.conf.d/20-intel.conf it never crashed again.

But the tearing came back which was fixed by picom with option --backend glx. Can't really say I'm very happy with picom though as it acts weird sometimes. For example after I leave the screen inactive for too long and it gets black, after I reopen it there are weird black frames around my windows (dwm with gaps so the black frames are drawn on the root window) and after a random amount of time the statusbar starts flickering.

Offline

Board footer

Powered by FluxBB