0

I've compiled Qt5.15.0 and set up cross-compiler on my host machine (Ubuntu 20.04) and managed to cross-compile a simple Hello World app for my Raspberry Pi 4, however, when I deploy and run it (tried both on Qt Creator and in terminal) I get Could not queue DRM page flip on screen HDMI1 (Invalid argument) I use latest Raspbian image and tried both with lite and full desktop versions.

There are some solutions suggesting to set the environment variables;

QT_QPA_EGLFS_ALWAYS_SET_MODE=1
QT_QPA_EGLFS_KMS_ATOMIC=1

But I had no luck with setting them.

I don't know where the problem is, I'm very new to Qt.

2 Answers 2

2

For those who has the same problem here is how I solved;

Somehow I discovered that Raspberry Pi does not set the environment variable QT_QPA_EGLFS_ALWAYS_SET_MODE. You can check that by typing

printenv QT_QPA_EGLFS_ALWAYS_SET_MODE

or

echo $QT_QPA_EGLFS_ALWAYS_SET_MODE

in both cases, you should see 1 as a result if you've set it so.

However I got no response when I typed them.

Then I went and opened .profile and added

QT_QPA_EGLFS_ALWAYS_SET_MODE=1

at the end of the file and rebooted the system. Finally there it was, when I echoed the variable it returned 1, and my programs now work pretty well.

1
  • Thanks! BTW I had to type export QT_QPA_EGLFS_ALWAYS_SET_MODE=1
    – Aros
    Jan 15, 2021 at 21:24
0

The variables should be set in:

/etc/default/qt

See QTBUG-72539 in the Qt bug tracking.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.