[SOLVED] Ioctl errors when running MESA programs on KMS/DRM

Required Information

  • DietPi version:
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=18
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='not applicable'
  • Distro version: bookworm 0
  • Kernel version: 6.1.21-v8+
  • Architecture: arm64
  • SBC model: RPi 4 Model B (aarch64)
  • Power supply used: Official Rpi4

PROBLEM DESCRIPTION

ioctl() errors appear on the console when running MESA programs on KMS/DRM or Wayland.
Using latest stable MESA 23.1.3.
For example, when running any SDL2 program, I get:


ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe

Which in dmesg means:


[   34.986175] vc4-drm gpu: swiotlb buffer is full (sz: 524288 bytes), total 32768 (slots), used 2802 (slots)
[   34.992021] vc4-drm gpu: swiotlb buffer is full (sz: 524288 bytes), total 32768 (slots), used 2802 (slots)
[   35.047731] vc4-drm gpu: swiotlb buffer is full (sz: 1441792 bytes), total 32768 (slots), used 466 (slots)
[   35.049010] vc4-drm gpu: swiotlb buffer is full (sz: 1441792 bytes), total 32768 (slots), used 466 (slots)
[   35.071907] vc4-drm gpu: swiotlb buffer is full (sz: 2482176 bytes), total 32768 (slots), used 34 (slots)
[   35.072848] vc4-drm gpu: swiotlb buffer is full (sz: 2482176 bytes), total 32768 (slots), used 0 (slots)
[   35.100906] vc4-drm gpu: swiotlb buffer is full (sz: 524288 bytes), total 32768 (slots), used 3210 (slots)
[   35.108862] vc4-drm gpu: swiotlb buffer is full (sz: 524288 bytes), total 32768 (slots), used 3210 (slots)

I am marking this as solved because it’s not Dietpi’s business: errors appear due to some bug with kernel 6.1.21-v8+ onwards.

something that might need to be reported to RPi developer?

I have reported it already:

…but devs don’t seem to be able to replicate it easily, even using Raspberry Pi OS.

1 Like