Screenshot tools capture garbage with Iris Xe graphics

Hi guys,

I did a fresh install of Manjaro 21.0.1 on my new laptop (Thinkpad L13 Yoga Gen2) and things work out pretty well so far. I need to take screenshots quite often and it looks like all screenshot tools (Xfce’s integrated one, Shutter, even Gimp’s screenshot dialog) are having trouble, they all capture garbage – a screen state which is an hour or so old. It looks like the video driver does not update some cached version of the screen state for a long time.

I can work around the problem by

  • going to standby (S3 mode), after waking up screenshot tools work as expected
  • switching from Compiz to Xfwm
  • reloading Compiz

All those actions seem to update the “screen content cache”.

My inxi -F output:

System:
  Host: ThinkpadL13Yoga Kernel: 5.10.26-1-MANJARO x86_64 bits: 64 
  Desktop: Xfce 4.16.0 Distro: Manjaro Linux 
Machine:
  Type: Convertible System: LENOVO product: 20VLS01500 
  v: ThinkPad L13 Yoga Gen 2 serial: <superuser required> 
  Mobo: LENOVO model: 20VLS01500 serial: <superuser required> UEFI: LENOVO 
  v: R1FET29W (1.03 ) date: 10/08/2020 
Battery:
  ID-1: BAT0 charge: 23.4 Wh (49.9%) condition: 46.9/46.0 Wh (102.0%) 
  volts: 15.3 min: 15.4 
CPU:
  Info: Quad Core model: 11th Gen Intel Core i5-1135G7 bits: 64 type: MT MCP 
  cache: L2: 8 MiB 
  Speed: 1192 MHz min/max: 400/4200 MHz Core speeds (MHz): 1: 1192 2: 1144 
  3: 1170 4: 1347 5: 1253 6: 1539 7: 1319 8: 1217 
Graphics:
  Device-1: Intel Iris Xe Graphics driver: i915 v: kernel 
  Device-2: Chicony ThinkPad T490 Webcam type: USB driver: uvcvideo 
  Device-3: Acer Integrated 5M Camera type: USB driver: uvcvideo 
  Display: x11 server: X.Org 1.20.10 driver: loaded: intel 
  unloaded: modesetting resolution: 1920x1080~60Hz 
  OpenGL: renderer: Mesa Intel Xe Graphics (TGL GT2) v: 4.6 Mesa 21.0.1 
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio driver: snd_hda_intel 
  Sound Server-1: ALSA v: k5.10.26-1-MANJARO running: yes 
  Sound Server-2: PulseAudio v: 14.2 running: yes 
  Sound Server-3: PipeWire v: 0.3.24 running: yes 
Network:
  Device-1: Intel Wi-Fi 6 AX201 driver: iwlwifi 
  IF: wlp0s20f3 state: up mac: 2c:db:07:e7:59:78 
  Device-2: Intel Ethernet I219-V driver: e1000e 
  IF: enp0s31f6 state: down mac: 48:2a:e3:a8:52:2b 
Bluetooth:
  Device-1: Intel type: USB driver: btusb 
  Report: This feature requires one of these tools: hciconfig/bt-adapter 
Drives:
  Local Storage: total: 476.94 GiB used: 29.47 GiB (6.2%) 
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB512HBJQ-000L7 
  size: 476.94 GiB 
Partition:
  ID-1: / size: 459.43 GiB used: 29.47 GiB (6.4%) fs: ext4 
  dev: /dev/nvme0n1p2 
  ID-2: /boot/efi size: 299.4 MiB used: 296 KiB (0.1%) fs: vfat 
  dev: /dev/nvme0n1p1 
Swap:
  ID-1: swap-1 type: partition size: 8.8 GiB used: 2 MiB (0.0%) 
  dev: /dev/nvme0n1p3 
Sensors:
  System Temperatures: cpu: 40.0 C mobo: 1.0 C 
  Fan Speeds (RPM): cpu: 0 
Info:
  Processes: 355 Uptime: 4d 14h 55m Memory: 15.31 GiB used: 8.07 GiB (52.7%) 
  Shell: Bash inxi: 3.3.03

I’m a bit puzzled about how to search for solutions on the net, couldn’t find a similar problem so far.

Thanks for any input,
Photon

1 Like

Hello @Photon :wink:

Does it work without compiz? Just with Xfwm?

1 Like

I tested it for a while and couldn’t catch the problem with Xfwm so far. But I’d like to keep using Compiz. :slight_smile:

Couldn’t figure out this so far. Looks like it indeed only happens when using Compiz, not Xfwm (even with Xfwm’s compositing enabled).

I thiink, I solved it by deactivating “Sync to VBlank” in the Compiz OpenGL plugin settings.

Looks like I was wrong, the problem persists…

1 Like

I think, it is fixed in Kernel 5.14 (or even 5.13 but switching from 5.12 to 5.14 seems to have solved it).

edit: False alarm again, the issue is still there…

I have the same problem on KDE (also Iris Xe graphics). I fill a bug report on xorg-video-intel but you know, it’s deprecated…
Btw, screenshots works well with modesetting driver, but I find it a bit slower.

I haven’t seen this problem for several weeks now, maybe this time it has disappeared indeed. :grin:

@photon: can you give me the output of

cat .drirc

?

I wish, I could, but the file does not exist on my machine.

I could offer /usr/share/drirc.d/00-mesa-defaults.conf but it is just the default file from the Manjaro install.

i just solved the problem after 10 month with

[guido@manjaro ~]$ cat .drirc 
<driconf>
  <device screen="0" driver="dri2">
    <application name="Default">
       <option name="vblank_mode" value="0"/>
    </application>
  </device>
</driconf>

and

guido@manjaro ~]$ cat /etc/X11/xorg.conf.d/25-intel.conf
Section "Device"
  Identifier "Intel Graphics"
  Driver "intel"
  Option "TripleBuffer" "true"
  Option "DRI" "3"
EndSection
2 Likes

Nice, I will give it a try in case the problem pops up again for me!

After some check with glmark2 I’m persuaded it’s better to stay with modesetting driver and without .drirc :frowning:

This issue is really tough to kill…

edit: Leaving the link to your issue report to find it easier in future: Screenshot applications do not work correctly with xf86-video-intel (#210) · Issues · xorg / driver / xf86-video-intel · GitLab

1 Like