You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ioctl() errors that started to appear with kernel 6.1.21 #5524
[ 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+
Do you just get a few at startup, or are they more continuous than that? I ended up installing Batocera (based on 6.1.25) a few weels ago for some testing (on an 8GB Pi 4) and SDLPoP runs OK, but the shell gets a few swiotlb full messages on startup:
[ 24.455905] vc4-drm gpu: swiotlb buffer is full (sz: 1622016 bytes), total 32768 (slots), used 5 (slots)
[ 24.456940] vc4-drm gpu: swiotlb buffer is full (sz: 1622016 bytes), total 32768 (slots), used 5 (slots)
[ 24.492240] vc4-drm gpu: swiotlb buffer is full (sz: 3235840 bytes), total 32768 (slots), used 455 (slots)
[ 24.494049] vc4-drm gpu: swiotlb buffer is full (sz: 3235840 bytes), total 32768 (slots), used 519 (slots)
However, there was a significant change in the way DMA addresses are derived in our 6.1.28 kernel releases, and Batocera is currently still stuck on 6.1.25.
Do you just get a few at startup, or are they more continuous than that? I ended up installing Batocera (based on 6.1.25) a few weels ago for some testing (on an 8GB Pi 4) and SDLPoP runs OK, but the shell gets a few swiotlb full messages on startup:
[ 24.455905] vc4-drm gpu: swiotlb buffer is full (sz: 1622016 bytes), total 32768 (slots), used 5 (slots)
[ 24.456940] vc4-drm gpu: swiotlb buffer is full (sz: 1622016 bytes), total 32768 (slots), used 5 (slots)
[ 24.492240] vc4-drm gpu: swiotlb buffer is full (sz: 3235840 bytes), total 32768 (slots), used 455 (slots)
[ 24.494049] vc4-drm gpu: swiotlb buffer is full (sz: 3235840 bytes), total 32768 (slots), used 519 (slots)
However, there was a significant change in the way DMA addresses are derived in our 6.1.28 kernel releases, and Batocera is currently still stuck on 6.1.25.
I get them at SDLPop startup only, apparently there are no more after that.
Thanks. Can you tell me the top commit for one of the builds, and upload /sys/firmware/fdt somewhere I can grab it? Or email it to phil@raspberrypi.com if you prefer.
Thanks. Can you tell me the top commit for one of the builds, and upload /sys/firmware/fdt somewhere I can grab it? Or email it to phil@raspberrypi.com if you prefer.
I don't have a /sys/firmware/fdt directory. This is a pretty minimal system. Is there a service that mounts that?
Also, I don't know what software build do you mean: kernel/fw? MESA? SDL2? Other?
A clean, fully-updated installation of 32-bit Raspberry Pi OS (but with the 64-bit kernel) shows no problems when I launch a freshly built SDLPoP. Running rpi-update on that gets the same kernel as you, and it is also showing no errors or issues of any kind with SDLPoP, even running at 4K.
A clean, fully-updated installation of 32-bit Raspberry Pi OS (but with the 64-bit kernel) shows no problems when I launch a freshly built SDLPoP. Running rpi-update on that gets the same kernel as you, and it is also showing no errors or issues of any kind with SDLPoP, even running at 4K.
I have a full 64bit system, both kernel and libs. In fact, it's Raspberry Pi OS 64bit LITE.
I am definitely seeing the errors there.
The errors only happen on the Raspberry Pi (let's not forget they are vc4-drm gpu: swiotlb errors).
Loading the cores manually via modprobe without the receiver being physically connected doesn't cause the errors: the receiver must be connected to trigger the bug.
[ 2278.920013] vc4-drm gpu: swiotlb buffer is full (sz: 323584 bytes), total 32768 (slots), used 0 (slots)
[ 2278.920761] vc4-drm gpu: swiotlb buffer is full (sz: 323584 bytes), total 32768 (slots), used 0 (slots)
[ 2278.946357] vc4-drm gpu: swiotlb buffer is full (sz: 438272 bytes), total 32768 (slots), used 0 (slots)
[ 2278.947417] vc4-drm gpu: swiotlb buffer is full (sz: 438272 bytes), total 32768 (slots), used 0 (slots)
[ 2171.665681] vc4-drm gpu: swiotlb buffer is full (sz: 458752 bytes), total 32768 (slots), used 0 (slots)
[ 2171.666443] vc4-drm gpu: swiotlb buffer is full (sz: 458752 bytes), total 32768 (slots), used 0 (slots)
[ 2171.689858] vc4-drm gpu: swiotlb buffer is full (sz: 1048576 bytes), total 32768 (slots), used 12 (slots)
[ 2171.690812] vc4-drm gpu: swiotlb buffer is full (sz: 1048576 bytes), total 32768 (slots), used 12 (slots)
I don't believe it - with a Logitech wireless dongle (and mouse) I see exactly the same ioctl errors as you but the kernel message log is clean - no swiotlb warnings. Even running a memory stresser to randomly allocate most of the RAM doesn't change things.
I stopped looking at this after trying and failing to recreate the swiotlb errors (which are definitely my field). I haven't investigate the ioctl() error messages. Is there any obvious malfunction?
@pelwell No, everything seems to be working fine otherwise.
Is there a way to ride out of these errors on the TTY/terminal emulator? I currently pass loglevel=3 to the kernel, but they are still there.
No, everything seems to be working fine otherwise.
Is there a way to ride out of these errors on the TTY/terminal emulator? I currently pass loglevel=3 to the kernel, but they are still there.
@vanfanel Hi, I found a related issue on SDL side: libsdl-org/SDL#6799
according to that, I first get vendor ID by
$ lsusb
Bus 004 Device 002: ID 17ef:109b Lenovo USB3.0 Hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 005: ID 046d:c539 Logitech, Inc. Lightspeed Receiver
Bus 003 Device 004: ID 2109:8883 VIA Labs, Inc. USB Billboard Device
Bus 003 Device 003: ID 045e:02fe Microsoft Corp. XBOX ACC
Bus 003 Device 002: ID 17ef:109a Lenovo USB2.0 Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 8087:0aa7 Intel Corp. Wireless-AC 3168 Bluetooth
Bus 001 Device 004: ID 26ce:01a2 ASRock LED Controller
Bus 001 Device 002: ID 056a:037a Wacom Co., Ltd CTL-472 [One by Wacom (S)]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
@detiam Ah, I guess it should be fixed on SDL's side then?
I will try to replicate and send a PR to SDL in that case.
Why are you passing SDL_HIDAPI_IGNORE_DEVICES=0x046d/0x0000 instead of SDL_HIDAPI_IGNORE_DEVICES=0x046d/0xc539?
root@DietPi:~/src/SDL-release-2.28.1/test# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 045e:028e Microsoft Corp. Xbox360 Controller
**Bus 001 Device 006: ID 046d:c534 Logitech, Inc. Unifying Receiver**
Bus 001 Device 004: ID 2341:8036 Arduino SA Leonardo (CDC ACM, HID)
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
And if I do: env SDL_HIDAPI_IGNORE_DEVICES=0x046d/0x0000 testjoystick
Activity
pelwell commentedon Jun 28, 2023
How much RAM does the Pi 4 have? If it's 8GB, does putting
total_mem=4096in config.txt get rid of the warnings?vanfanel commentedon Jun 28, 2023
It has 2 GBs. All my Pi4s are 2 GB.
pelwell commentedon Jun 28, 2023
Do you just get a few at startup, or are they more continuous than that? I ended up installing Batocera (based on 6.1.25) a few weels ago for some testing (on an 8GB Pi 4) and SDLPoP runs OK, but the shell gets a few swiotlb full messages on startup:
However, there was a significant change in the way DMA addresses are derived in our 6.1.28 kernel releases, and Batocera is currently still stuck on 6.1.25.
vanfanel commentedon Jun 28, 2023
I get them at SDLPop startup only, apparently there are no more after that.
pelwell commentedon Jun 28, 2023
Running SDLPop from the RPiOs desktop launcher under 6.1.35 + KMS on both 2GB and 8GB Pis, and I see no errors.
pelwell commentedon Jun 28, 2023
What does
dmesg | grep TLBshow?BTW, my mesa seems to be on 20.3.5.
pelwell commentedon Jun 28, 2023
Make that
dmesg | grep -E "(TLB|CMA)"...vanfanel commentedon Jun 28, 2023
That's it.
pelwell commentedon Jun 28, 2023
Thanks. Can you tell me the top commit for one of the builds, and upload /sys/firmware/fdt somewhere I can grab it? Or email it to phil@raspberrypi.com if you prefer.
vanfanel commentedon Jun 28, 2023
I don't have a
/sys/firmware/fdtdirectory. This is a pretty minimal system. Is there a service that mounts that?Also, I don't know what software build do you mean: kernel/fw? MESA? SDL2? Other?
vanfanel commentedon Jun 28, 2023
Ah well, sorry, ftd seems to be a file.
This is it:
fdt.zip
Still, I don't understand what top commit do you need.
pelwell commentedon Jun 28, 2023
The bug report is about the kernel, this is the kernel repo, I want the kernel top commit. Or is it one of our pre-built kernels?
vanfanel commentedon Jun 28, 2023
It is the latest kernel available in rpi-update.
So this is one of your prebuilt ones.
6.1.34-v8+ to be precise.
Sorry if my question sounded obtuse, but theres a graphics software stack on top of the kernel. Thats why I asked.
pelwell commentedon Jun 29, 2023
A clean, fully-updated installation of 32-bit Raspberry Pi OS (but with the 64-bit kernel) shows no problems when I launch a freshly built SDLPoP. Running rpi-update on that gets the same kernel as you, and it is also showing no errors or issues of any kind with SDLPoP, even running at 4K.
vanfanel commentedon Jun 29, 2023
I have a full 64bit system, both kernel and libs. In fact, it's Raspberry Pi OS 64bit LITE.
I am definitely seeing the errors there.
In fact, weren't you seeing them here? --> #5524 (comment)
21 remaining items
vanfanel commentedon Jul 5, 2023
@pelwell Found what causes the errors on my Pi4 but not on yours, since Pi kernel 6.2.21.
Guess what?
USB keyboard/mouse receiver.
This one in
lsusb:Bus 001 Device 004: ID 046d:c534 Logitech, Inc. Unifying ReceiverIf I unplug it, the errors are gone. If I plug it, errors appear when launching SDL2 games:
pelwell commentedon Jul 5, 2023
Oh well done. I'll continue to look in that area as time allows.
vanfanel commentedon Jul 6, 2023
@pelwell The modules used by Logitech receivers (I have several and they all use the same) are:
The errors only happen on the Raspberry Pi (let's not forget they are
vc4-drm gpu: swiotlberrors).Loading the cores manually via
modprobewithout the receiver being physically connected doesn't cause the errors: the receiver must be connected to trigger the bug.pelwell commentedon Jul 6, 2023
So I don't misunderstand you, can you confirm that without the receiver plugged in both the swiotlb and ioctl error messages disappear?
vanfanel commentedon Jul 6, 2023
without the receiver plugged in both the swiotlb and ioctl error messages disappear
That is true.
Plus: with NO logitech receiver connected, loading the modules manually and then running the game, the errors don't appear.
Errors appear ONLY when receiver is connected and the modules are loaded.
In fact, I can connect the receiver, unload the modules, and the errors DO appear.
So the determining factor is the device being connected.
Connected = errors.
Not connected = no errors, even if the modules are loaded.
vanfanel commentedon Jul 6, 2023
And one more strange thing: the devices connected to the logitech receiver DO work after UNLOADING the modules
hid_logitech_hidppandhid_logitech_djBut in that case, only half of the errors appear.
So:
With the DEVICE CONNECTED, and MODULES LOADED:
In dmesg:
With DEVICE CONNECTED, and modules UNLOADED:
In dmesg:
pelwell commentedon Jul 7, 2023
I don't believe it - with a Logitech wireless dongle (and mouse) I see exactly the same ioctl errors as you but the kernel message log is clean - no swiotlb warnings. Even running a memory stresser to randomly allocate most of the RAM doesn't change things.
vanfanel commentedon Aug 8, 2023
@pelwell Any other experiments I should do with this? Do you need more info? Did you find out something new?
pelwell commentedon Aug 8, 2023
I stopped looking at this after trying and failing to recreate the swiotlb errors (which are definitely my field). I haven't investigate the ioctl() error messages. Is there any obvious malfunction?
vanfanel commentedon Aug 8, 2023
@pelwell No, everything seems to be working fine otherwise.
Is there a way to ride out of these errors on the TTY/terminal emulator? I currently pass
loglevel=3to the kernel, but they are still there.detiam commentedon Aug 11, 2023
@vanfanel Hi, I found a related issue on SDL side: libsdl-org/SDL#6799
according to that, I first get vendor ID by
and run SDL program with that env var
ioctl (GFEATURE): *are gone!vanfanel commentedon Aug 11, 2023
@detiam Ah, I guess it should be fixed on SDL's side then?
I will try to replicate and send a PR to SDL in that case.
Why are you passing
SDL_HIDAPI_IGNORE_DEVICES=0x046d/0x0000instead ofSDL_HIDAPI_IGNORE_DEVICES=0x046d/0xc539?vanfanel commentedon Aug 11, 2023
Oh well, lsusb says this here:
And if I do:
env SDL_HIDAPI_IGNORE_DEVICES=0x046d/0x0000 testjoystickI get no errors at all. Great! Let's PR this...
vanfanel commentedon Aug 19, 2023
Ok, this was fixed on the SDL2 side, so closing this.
Thanks all involved! :)