On my RetroPie system, this error was due tu a wrong kernel. And the wrong kernel was due to an upgrade to Debian 11 (which I should never have done) and downgrade to Debian 10.
apt install --reinstall raspberrypi-bootloader raspberrypi-kernel
and reboot solved the issue.