OK3588 Linux 5.10.209 Buildroot Auto-start QT Application

Document classification: □ Top secret □ Secret □ Internal information ■ Open

Revision History

Date

Version

Revision History

10/30/2025

V1.0

Initial Version

Auto-start QT Application

Create a new autostart script in /etc/init.d to automatically start the Qt application. After moving the mouse, the application disappears.

Create a new autostart file.

vi /etc/init.d/S99aotu.sh

#!/bin/sh
sleep 3
/untitled_test1 &

Grant executable permissions to the autostart script.

root@ok3588-buildroot:/# chmod 777 /etc/init.d/S99aotu.sh(Give permissions as required)
root@ok3588-buildroot:/# sync
root@ok3588-buildroot:/# reboot

When moving the mouse, the following error occurs.

Image

Solution

This is due to EGLFS printing information, so add the relevant configuration file:

vi /root/kms.conf

{
  "device": "/dev/dri/card0",
  "hwcursor": false,
  "pbuffers": true,
  "outputs": [
    {
      "name": "HDMI-A-1",
      "mode": "current",
      "primary": true
    }
  ]
}

Modify the autostart script.

#!/bin/sh
sleep 3
export QT_QPA_EGLFS_KMS_ATOMIC=1
export QT_QPA_EGLFS_ALWAYS_SET_MODE='1'

export QT_QPA_EGLFS_KMS_CONFIG="/root/kms.conf"
/untitled_test1 &

Disable Weston.

root@ok3588-buildroot:/#vi /etc/init.d/S49weston

Image

After performing sync, restart the system. Now, moving the mouse displays normally.