  
  private:
      QKmsScreenConfig *m_screenConfig;
+diff --git a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
+index 9e38900bcd..1584f18392 100644
 --- a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
 +++ b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
-@@ -172,9 +172,26 @@ void QLinuxFbIntegration::createInputHan
+@@ -173,9 +173,28 @@ void QLinuxFbIntegration::createInputHandlers()
  #endif
  }
  
++
 +class FbPlatformInterface : public QPlatformNativeInterface
 +{
 +public:

+{
+    return m_device->fd();
+}
+
 QT_END_NAMESPACE
--- a/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.h
+++ b/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.h
@@ -57,6 +57,7 @@ public:

+	QFbScreen *m_primaryScreen;
+};
+
+
 QPlatformNativeInterface *QLinuxFbIntegration::nativeInterface() const
 {
-    return const_cast<QLinuxFbIntegration *>(this);
+	return new FbPlatformInterface(m_primaryScreen);
 }
 
 QFunctionPointer QLinuxFbIntegration::platformFunction(const QByteArray &function) const
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbscreen.h b/src/plugins/platforms/linuxfb/qlinuxfbscreen.h
index c7ce455e6a..afa53d52d4 100644
--- a/src/plugins/platforms/linuxfb/qlinuxfbscreen.h
+++ b/src/plugins/platforms/linuxfb/qlinuxfbscreen.h
@@ -60,6 +60,8 @@ public:
 
     QRegion doRedraw() override;
 
+	int fd() const { return mFbFd; }
+
 private:
     QStringList mArgs;
     int mFbFd;
-- 
2.21.0

