Xrandr --listproviders takes several seconds to finish

Each time I run this command (and also some other applications like fillets-ng or mednafen) under X11, the entire screen freezes for several seconds (audio still working fine), then unfreezes and command or application continues normally. This happens under X11 only, no delay under wayland. At first I thought that maybe its the adapter that powers on, but it does not matter if its in D3Cold or D0. It only seems to affect some applications, most OpenGL/Vulkan applications run just fine without any delays.

nvidia-bug-report.log.gz (1.5 MB)

strace_xrandr.txt (21.2 KB)

I tried to strace xrandr --listproviders with relative time stamps. There’s a big delay on line 176 of the log, but I’m not able to figure out where xrandr is trying to read data from.

I tried ltrace, it seems that the delay is happening inside XRRGetScreenResources and XRRGetScreenInfo:

XRRGetScreenResources(0x55d12c2e3330, 2413, 0, 0x55d12ae0c120 <unfinished ...>
11:40:40.536279 poll@SYS(0x7fff55ac11d8, 1, -1)                                                                   = 1
11:40:40.536333 writev@SYS(3, 0x7fff55ac1350, 3)                                                                  = 8
11:40:40.536371 poll@SYS(0x7fff55ac11f8, 1, -1)                                                                   = 1
11:40:42.830545 recvmsg@SYS(3, 0x7fff55ac1110, 0, 16)                                                             = 4096
11:40:42.830834 recvfrom@SYS(3, 0x55d12c2fb420, 1092, 0)                                                          = 1092
11:40:42.830991 recvmsg@SYS(3, 0x7fff55ac1260, 0, 0)                                                              = -11
11:40:42.831117 recvmsg@SYS(3, 0x7fff55ac1260, 0, 0)                                                              = -11
11:40:42.831229 <... XRRGetScreenResources resumed> )                                                             = 0x55d12c2fb870

XRRGetScreenInfo(0x55d12c2e3330, 2413, 2, 0 <unfinished ...>
11:40:42.834031 poll@SYS(0x7fff55ac11e8, 1, -1)                                                                   = 1
11:40:42.834071 writev@SYS(3, 0x7fff55ac1360, 3)                                                                  = 8
11:40:42.834113 poll@SYS(0x7fff55ac1208, 1, -1)                                                                   = 1
11:40:43.988948 recvmsg@SYS(3, 0x7fff55ac1120, 0, 0)                                                              = 712
11:40:43.989529 recvmsg@SYS(3, 0x7fff55ac1270, 0, 0)                                                              = -11
11:40:43.990024 recvmsg@SYS(3, 0x7fff55ac1270, 0, 0)                                                              = -11
11:40:43.990410 <... XRRGetScreenInfo resumed> )                                                                  = 0x55d12c2fad50