The snap ogre seems to properly handle the issue:
I get the errors about amdgpu.ids:no such file or directory when using the opensource amd drivers on retroarch.
See https://github.com/libretro/retroarch-snap/issues/32