I have a QApplication on TX2 that renders on HDMI.
X11 is completely disabled and not present in system.
I use KMS/DRM as plaform for rendering, hence my startup configuration is:
method QGuiApplication::screens()
This method does not change result during runtime.
If I create application and then call method it always returns initial value, also if monitor plugged/unplugged
SIGNALS:
QGuiApplication::screenAdded
QGuiApplication::screenRemoved
QGuiApplication::primaryScreenChanged
None of the above signals get fired if I plug/unplug monitor.
we don’t enable tegra-udrm but use default drm library. Short note: Because we use also nvidia gstreamer nvdrmvideosink element in our system and with tegra-udrm enabled, nvdrmvideosink always fails to run. Error is “Failed to set universal planes” with whatever setting.
Back to QT:
the plug / unplug of hdmi monitor is recognized by kernel.
E.g. I can see changes at runtime in /sys/class/graphics/fb0/device/panel_connected , values is toggling from 0 to 1.
The problem is the QT Screens API, which I think relies on qpa drm backend.
function QGuiApplication::screens() returns always 0, if I started the QT Application with hdmi disconnected and then connect monitor. the function does not return 1.
the signal QGuiApplication::screenAdded does not get fired if I started the QT Application with hdmi disconnected and then connect monitor.
The tegra-udrm is responsible for passing the hotplug event to userspace application like Qt.
Though how Qt implements the qpa backend also matters here, I think you could try to enable udrm and see if qt app is able to detect it.
I can try but unfortunatelly I cannot to use tegra-udrm finally, else nvdrmvideosink fails.
Beside note: Do you know why nvdrmvideosink fails with tegra-udrm enabled? Error is always “Failed to set universal planes”.
Do you have a list of issues that are not supported in QT eglfs kms/drm?
I see some similar issue opened internally for your nvdrmvideosink issue. But I am not sure if they are same. Could you open a new ticket which only asks the issue of nvdrmvideosink? Please also put the error log you hit in that topic.
I will pass this new topic to internal team to debug.
Unfortunately, about Qt, I meant we don’t have any QA process on QT. It is not tested and verified, so no list for your request here.
Should tegra-udrm module be enabled, is it the correct solution for a final product?
Actually, the drm driver on tegra is not really 100% compatible with upstream libdrm.
We are still integrating the interface to align them. That is the possible reason causing the hotplug issue you have.
It is your decision for your own final product. I could only give you suggestion to enable tegra-udrm. And report any issue to us if you find any.