Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

[Linux] Ubuntu 20.04, XServer and Qt applicatons with QOpenGLWidget

25

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
25

【Linux】 Ubuntu 20.04, XServer and Qt applicatons with QOpenGLWidget

Posted at 8/12/2022 15:30:04      View:3469 | Replies:4        Print      Only Author   [Copy Link] 1#
Hello!

Hardware: ITX-3588J and two monitors

Software:
Ubuntu 20.04.4 LTS (GNU/Linux 5.10.66 aarch64)
Qt version 5.12.8 installed on ITX-3588J by: sudo apt-get install build-essential qt5-default
X.Org X Server 1.20.8

When we trying to run a qt application with QOpenGLWidget on two monitors (the window has a size 3840x1080), there were problems.

First scenario (Used eglfs):

  1. sudo killall -3 gnome-shell
  2. export QT_QPA_PLATFORM=eglfs
  3. export QT_QPA_EGLFS_INTEGRATION=eglfs_kms
  4. export QT_QPA_EGLFS_KMS_ATOMIC=1
  5. export QT_QPA_EGLFS_KMS_CONFIG=/home/firefly/kms_config.json
  6. ./ZeroCopyGLSample
Copy the code


kms_config.json are:
  1. {
  2.   "device": "/dev/dri/card0",
  3.   "outputs": [
  4.     {
  5.       "name": "HDMI1",
  6.       "mode": "1920x1080"
  7.     },
  8.     {
  9.       "name": "HDMI2",
  10.       "mode": "1920x1080"
  11.     }
  12.   ]
  13. }
Copy the code


Everything starts and works well, except that the application can only use one monitor, although qApp→screens() correctly returns both devices. Attempts to create widgets with the geometry of the second monitor did not give the expected result.

Second scenario (Used Xserver):

xinit /home/firefly/testapps/OpenGL/ZeroCopyGLSample/ZeroCopyGLSample

The application starts, a window is created on two monitors, but OpenGL does not work correctly:
  1. QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
  2. QOpenGLWidget: Failed to create context
Copy the code


I would be grateful for any hint
Thanks for the help!
Reply

Use props Report

126

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
126
Posted at 1/10/2026 00:15:37        Only Author  2#
I am so grateful for your share, the article is amazing! Free Exam Data-Driven-Decision-Making pass guide resources are now available—good luck!
Reply

Use props Report

125

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
125
Posted at 1/10/2026 03:01:55        Only Author  3#
Truly an impressive article, I’m grateful for your sharing. The C11 braindump pdf test helped me secure my promotion and raise—grab it for free today!
Reply

Use props Report

130

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
130
Posted at 1/30/2026 04:57:24        Only Author  4#
Sind Sie neugierig, warum so viele Menschen die schwierige Microsoft DP-900-Deutsch Prüfung bestehen können? Ich können Sie beantworten. Der Kunstgriff ist, dass Sie haben die Prüfungsunterlagen der Microsoft DP-900-Deutsch von unsere Pass4Test benutzt. Wir bieten Ihnen: reichliche Prüfungsaufgaben, professionelle Untersuchung und einjährige kostenlose Aktualisierung nach dem Kauf. Mit Hilfe der Microsoft DP-900-Deutsch Prüfungsunterlagen können Sie wirklich die Erhöhung Ihrer Fähigkeit empfinden. Sie können auch das echte Zertifikat der Microsoft DP-900-Deutsch erwerben!
Reply

Use props Report

122

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
122
Posted at yesterday 14:54        Only Author  5#
有很多途徑可以幫你通過Alibaba SAE-C01 認證考試的,選擇好的途徑也就是選擇了好的保障。KaoGuTi可以為你提供好的培訓工具,為您參加Alibaba SAE-C01 認證考試提供高品質的參考資料。KaoGuTi提供的考試練習題和答案是根據Alibaba SAE-C01 認證考試的考試大綱研究出來的。所以KaoGuTi提供的資料的品質很高,具有很高權威性,絕對可以盡全力幫你通過Alibaba SAE-C01 認證考試。KaoGuTi也會不斷提升更新我們提供的Alibaba SAE-C01 認證考試資料,來滿足您的需求。
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list