Request help: About QT after porting QT compile graphics program can not run

A recent project requires porting QT programs to orin nano. I have tried to compile QT for many times, but the QT generating interface program still fails to run normally. Please help me.
IDE:jeston 36.3
JetPack6.0
core board:orin Nano4GB
board:Jetson Orin Nano Developer Kit
kernel source: Jetson Linux 36.3 | NVIDIA Developer
rootfs source: Desktop Flavor Root File System Root File System — NVIDIA Jetson Linux Developer Guide 1 documentation

When run QT, get the following result:

ys@tegra-ubuntu:~$ ./untitled
Cannot open keyboard input device '/dev/input/event1' (Permission denied)
Failed to open keyboard device /dev/input/event1
Cannot open keyboard input device '/dev/input/event2' (Permission denied)
Failed to open keyboard device /dev/input/event2
Cannot open keyboard input device '/dev/input/event3' (Permission denied)
Failed to open keyboard device /dev/input/event3
Cannot open keyboard input device '/dev/input/event0' (Permission denied)
Failed to open keyboard device /dev/input/event0
Cannot open mouse input device /dev/input/event4 (Permission denied)
evdevmouse: Failed to open mouse device /dev/input/event4
no screens available, assuming 24-bit color
Cannot create window: no screens available
Aborted (core dumped)

The Qt build configuration is as follows:
QT_config_log.txt (265.5 KB)

Environment variable configuration:

Can tell me how to port QT?

What do you see from:
ls -l /dev/input/event*

Normally these would be owned by root, and group would be “input”. These are not actual files, but are instead drivers to input devices (e.g., mouse, keyboard, joystick) pretending to be files. I’m not sure of the exact setup, but the Xorg server itself is normally running as root, while the session manager and/or desktop manager run as the logged in user. If your Xorg is not running as root, then this might also change it, but for the default case, either root or input would have event* access.

Thank you for your reply.
What you said is not the main problem, the main problem is that no screens available, assuming 24-bit color
Cannot create window: no screens available
Aborted

What is your current $DISPLAY? From a terminal in the same GUI you use for your application, run “echo $DISPLAY”. I’ll assume it is :0, which means the log would be “/var/log/Xorg.0.log”. Attach the log to the forum after you’ve attempted to run the application a few times.

Thank you very much for your prompt answer.
Yesterday I recompiled QT and ported the filesystem several times.
Just tried to view via echo $DISPLAY
Information is obtained through the network terminal:


Through the development board in the desktop terminal operation:

Xorg.0.log (22.7 KB)
Xorg.1.log (22.0 KB)


1726111183500

If you are running this over a network connection, e.g., over ssh, then this will cause failure most of the time. Logging in remotely and using “echo $DISPLAY” will give an incorrect answer. You have to be logged in locally to the Jetson for that to provide valid information. On the other hand, if you set DISPLAY via ssh login or other remote login, and then “export DISPLAY=:0”, then that will be useful as it tells all GUI commands to go to the Jetson’s GUI.

The important part is still missing. What file do you see from this command on the Jetson:
ls -ltr /var/log/Xorg.*.log | tail -n 1

That file is one you need to attach to the forum thread, but do so after you’ve tried running the QT program. It is the X server log, and we need to know if the server itself provided information.

thanks for your help!
Here’s how I went about it:

export DISPLAY=:0
ys@tegra-ubuntu:~$ echo $DISPLAY
:0
ys@tegra-ubuntu:~$ ./untitled
Cannot open keyboard input device '/dev/input/event1' (Permission denied)
Failed to open keyboard device /dev/input/event1
Cannot open keyboard input device '/dev/input/event2' (Permission denied)
Failed to open keyboard device /dev/input/event2
Cannot open keyboard input device '/dev/input/event3' (Permission denied)
Failed to open keyboard device /dev/input/event3
Cannot open keyboard input device '/dev/input/event0' (Permission denied)
Failed to open keyboard device /dev/input/event0
Cannot open mouse input device /dev/input/event4 (Permission denied)
evdevmouse: Failed to open mouse device /dev/input/event4
no screens available, assuming 24-bit color
Cannot create window: no screens available
Aborted (core dumped)
ys@tegra-ubuntu:~$ ./untitled
Cannot open keyboard input device '/dev/input/event1' (Permission denied)
Failed to open keyboard device /dev/input/event1
Cannot open keyboard input device '/dev/input/event2' (Permission denied)
Failed to open keyboard device /dev/input/event2
Cannot open keyboard input device '/dev/input/event3' (Permission denied)
Failed to open keyboard device /dev/input/event3
Cannot open keyboard input device '/dev/input/event0' (Permission denied)
Failed to open keyboard device /dev/input/event0
Cannot open mouse input device /dev/input/event4 (Permission denied)
evdevmouse: Failed to open mouse device /dev/input/event4
no screens available, assuming 24-bit color
Cannot create window: no screens available
Aborted (core dumped)
ys@tegra-ubuntu:~$ ./untitled
Cannot open keyboard input device '/dev/input/event1' (Permission denied)
Failed to open keyboard device /dev/input/event1
Cannot open keyboard input device '/dev/input/event2' (Permission denied)
Failed to open keyboard device /dev/input/event2
Cannot open keyboard input device '/dev/input/event3' (Permission denied)
Failed to open keyboard device /dev/input/event3
Cannot open keyboard input device '/dev/input/event0' (Permission denied)
Failed to open keyboard device /dev/input/event0
Cannot open mouse input device /dev/input/event4 (Permission denied)
evdevmouse: Failed to open mouse device /dev/input/event4
no screens available, assuming 24-bit color
Cannot create window: no screens available
Aborted (core dumped)
ys@tegra-ubuntu:~$ ./untitled
Cannot open keyboard input device '/dev/input/event1' (Permission denied)
Failed to open keyboard device /dev/input/event1
Cannot open keyboard input device '/dev/input/event2' (Permission denied)
Failed to open keyboard device /dev/input/event2
Cannot open keyboard input device '/dev/input/event3' (Permission denied)
Failed to open keyboard device /dev/input/event3
Cannot open keyboard input device '/dev/input/event0' (Permission denied)
Failed to open keyboard device /dev/input/event0
Cannot open mouse input device /dev/input/event4 (Permission denied)
evdevmouse: Failed to open mouse device /dev/input/event4
no screens available, assuming 24-bit color
Cannot create window: no screens available
Aborted (core dumped)
ys@tegra-ubuntu:~$ ls -ltr /var/log/Xo豲Ȁ^C
ys@tegra-ubuntu:~$ ls -ltr /var/log/Xorg.*.log | tail -n 1
-rw-r--r-- 1 root root 22564 Sep 12 02:25 /var/log/Xorg.1.log
ys@tegra-ubuntu:~$ cp /var/lo
local/ lock/  log/
ys@tegra-ubuntu:~$ cp /var/log/Xorg.1.log  ./
ys@tegra-ubuntu:~$

Xorg.1.log (22.0 KB)

Then I modified /etc/profile
Processing: 1726189873831.png…

About this and the “export DISPLAY=:0”:

If you manually export the DISPLAY, then it will still be incorrect if this is not what the particular GUI is bound to. There can be more than one X server, and display used is said to be bound to $DISPLAY; the $DISPLAY is the “context”. Manually setting this only works if the display itself is already that context. When you looked for the log name the command tells you the most recently used log name. Since this was “Xorg.1.log”, that means the proper way to have set DISPLAY was “export DISPLAY=:1”, and notexport DISPLAY=:0”. Being unable to open the screen is because there was no “:0” context.

So your program had no display. It had no chance of working since the actual display was :1 and you set to :0. Also, if your ssh login had been to a user name other than the one currently logged in to at :1, this too would have failed with a permission denied. We still need a log where you attempted to use your program as the same user that you logged in to the GUI as, and also with the same DISPLAY (if “ls -ltr /var/log/Xorg.*.log” shows “Xorg.1.log”, then "export DISPLAY=:1).

However, I think I see some problems in the :1 log, where a series of similar log lines occur:

[  6115.295] (II) config/udev: Adding input device NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=3 (/dev/input/event5)
[  6115.296] (II) No input driver specified, ignoring this device.

Has anything been modified regarding the Xorg X server or desktop? Was this installation “stock”, meaning that it was installed from the original flash? Was Xorg’s X server starting in any way other than automatically?

Just to explain, udev is responsible for sometimes naming or renaming any “hot plug” device, including USB human interface devices (including keyboards and mice). Somewhere an actual driver created the “/dev/input/event*” files. For whatever reason though, when X binds to that device, it doesn’t know anything about the driver: “No input driver specified, ignoring this device.”. It is a fact though that “/dev/input/event*” files exist, it is just a configuration failure that udev has no idea how to bind this to the X server.

Please explain anything custom or manually performed for installation of the GUI. Also, run your command as the same user account name as that logged in to the X server, and make sure that in ssh you do not use a “-Y” or “-X” option, but that you “export DISPLAY=:1” (not “:0”) if this command shows “Xorg.1.log”: “ls -ltr /var/log/Xorg.*.log | tail -n 1”.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.