Required Information
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:
opened 03:23AM - 28 Jun 23 UTC
### Describe the bug
Using some SDL2 programs on MESA on KMS/DRM or Wayland, … I see this on the TTY:
```
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:
```
[ 91.600471] vc4-drm gpu: swiotlb buffer is full (sz: 393216 bytes), total 32768 (slots), used 1074 (slots)
[ 91.603514] vc4-drm gpu: swiotlb buffer is full (sz: 393216 bytes), total 32768 (slots), used 1074 (slots)
[ 91.712747] vc4-drm gpu: swiotlb buffer is full (sz: 1638400 bytes), total 32768 (slots), used 104 (slots)
[ 91.713764] vc4-drm gpu: swiotlb buffer is full (sz: 1638400 bytes), total 32768 (slots), used 104 (slots)
[ 91.737476] vc4-drm gpu: swiotlb buffer is full (sz: 1941504 bytes), total 32768 (slots), used 0 (slots)
[ 91.738289] vc4-drm gpu: swiotlb buffer is full (sz: 1941504 bytes), total 32768 (slots), used 0 (slots)
[ 91.756947] vc4-drm gpu: swiotlb buffer is full (sz: 524288 bytes), total 32768 (slots), used 1916 (slots)
[ 91.761632] vc4-drm gpu: swiotlb buffer is full (sz: 524288 bytes), total 32768 (slots), used 1916 (slots)
```
This started to happen somewhere between kernel **6.1.25-v8+** and kernel **6.1.34-v8+**
A good game to reproduce this is SDLPoP:
https://github.com/NagyD/SDLPoP
I am using the `vc4-kms-v3d` video overlay, and direct ALSA audio with the **vc4hdmi** audio device, and latest stable MESA 23.1.3
### Steps to reproduce the behaviour
Run and SDL2 program on KMS/DRM or Wayland (like SDLPoP: https://github.com/NagyD/SDLPoP) and look at console and dmesg.
### Device (s)
Raspberry Pi 4 Mod. B
### System
bullseye
Linux debian 6.1.34-v8+ #1657 SMP PREEMPT Fri Jun 16 12:36:29 BST 2023 aarch64 GNU/Linux
### Logs
_No response_
### Additional context
_No response_
…but devs don’t seem to be able to replicate it easily, even using Raspberry Pi OS.
1 Like