diff --git a/abstract_egl_backend.cpp b/abstract_egl_backend.cpp
index edbd60bd48..82bec21a93 100644
--- a/abstract_egl_backend.cpp
+++ b/abstract_egl_backend.cpp
@@ -80,6 +80,11 @@ bool AbstractEglBackend::initEglAPI()
{
EGLint major, minor;
if (eglInitialize(m_display, &major, &minor) == EGL_FALSE) {
+ qCWarning(KWIN_CORE) << "eglInitialize failed";
+ EGLint error = eglGetError();
+ if (error != EGL_SUCCESS) {
+ qCWarning(KWIN_CORE) << "Error during eglInitialize " << error;
+ }
return false;
}
EGLint error = eglGetError();
diff --git a/plugins/platforms/drm/drm_buffer.cpp b/plugins/platforms/drm/drm_buffer.cpp
index cbcb46ff2d..0f1c7a41e5 100644
--- a/plugins/platforms/drm/drm_buffer.cpp
+++ b/plugins/platforms/drm/drm_buffer.cpp
@@ -24,6 +24,7 @@ along with this program. If not, see .
// system
#include
+#include
// drm
#include
#if HAVE_GBM
@@ -44,13 +45,16 @@ DrmBuffer::DrmBuffer(DrmBackend *backend, const QSize &size)
createArgs.width = size.width();
createArgs.height = size.height();
if (drmIoctl(m_backend->fd(), DRM_IOCTL_MODE_CREATE_DUMB, &createArgs) != 0) {
+ qCWarning(KWIN_DRM) << "DRM_IOCTL_MODE_CREATE_DUMB failed";
return;
}
m_handle = createArgs.handle;
m_bufferSize = createArgs.size;
m_stride = createArgs.pitch;
- drmModeAddFB(m_backend->fd(), size.width(), size.height(), 24, 32,
- m_stride, createArgs.handle, &m_bufferId);
+ if (drmModeAddFB(m_backend->fd(), size.width(), size.height(), 24, 32,
+ m_stride, createArgs.handle, &m_bufferId) != 0) {
+ qCWarning(KWIN_DRM) << "drmModeAddFB failed with errno" << errno;
+ }
}
diff --git a/plugins/platforms/x11/common/eglonxbackend.cpp b/plugins/platforms/x11/common/eglonxbackend.cpp
index 323ba1b9fb..79b1f87ea4 100644
--- a/plugins/platforms/x11/common/eglonxbackend.cpp
+++ b/plugins/platforms/x11/common/eglonxbackend.cpp
@@ -179,8 +179,10 @@ bool EglOnXBackend::initRenderingContext()
setHavePlatformBase(havePlatformBase);
if (havePlatformBase) {
// Make sure that the X11 platform is supported
- if (!hasClientExtension(QByteArrayLiteral("EGL_EXT_platform_x11")))
+ if (!hasClientExtension(QByteArrayLiteral("EGL_EXT_platform_x11"))) {
+ qCWarning(KWIN_CORE) << "EGL_EXT_platform_base is supported, but EGL_EXT_platform_x11 is not. Cannot create EGLDisplay on X11";
return false;
+ }
const int attribs[] = {
EGL_PLATFORM_X11_SCREEN_EXT, m_x11ScreenNumber,
@@ -192,8 +194,10 @@ bool EglOnXBackend::initRenderingContext()
dpy = eglGetDisplay(m_x11Display);
}
- if (dpy == EGL_NO_DISPLAY)
+ if (dpy == EGL_NO_DISPLAY) {
+ qCWarning(KWIN_CORE) << "Failed to get the EGLDisplay";
return false;
+ }
setEglDisplay(dpy);
initEglAPI();