Do not run with the drm backend if there's no dri drivers

Only defaults to the drm backend if there is a /dev/dri directory.

CCBUG: 436053
This commit is contained in:
Aleix Pol 2021-04-23 17:46:30 +02:00 committed by Aleix Pol Gonzalez
parent 4b3b5fa368
commit a21571c832

View file

@ -392,7 +392,11 @@ static QString automaticBackendSelection(SpawnMode spawnMode)
return s_x11Plugin;
}
#if HAVE_DRM
return s_drmPlugin;
// Only default to drm when there's dri drivers. This way fbdev will be
// used when running using nomodeset
if (QFileInfo::exists("/dev/dri")) {
return s_drmPlugin;
}
#endif
return s_fbdevPlugin;
}