Commit c4c46a08 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

platforms/drm: Properly detect if there are no DRM devices

If no primary gpu can be found, we need to quit.
parent 9f030ecd
......@@ -192,16 +192,17 @@ bool DrmBackend::initialize()
connect(session(), &Session::activeChanged, this, &DrmBackend::activate);
connect(session(), &Session::awoke, this, &DrmBackend::turnOutputsOn);
std::vector<UdevDevice::Ptr> devices = m_udev->listGPUs();
if (devices.size() == 0) {
qCWarning(KWIN_DRM) << "Did not find a GPU";
return false;
std::vector<UdevDevice::Ptr> devices = m_udev->listGPUs();
for (unsigned int gpu_index = 0; gpu_index < devices.size(); gpu_index++) {
if (m_gpus.isEmpty()) {
qCWarning(KWIN_DRM) << "No suitable DRM devices have been found";
return false;
if (!updateOutputs())
return false;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment