Stop Console print over the Qt Application (QML)

I’m running a QT application using QML without the X11/Wayland.

To remove the console blinking I run a script at startup with this parameters

echo -e ‘\033[9;0]’ > /dev/tty0
echo -e ‘\033[9;0]’ > /dev/tty1
echo 0 > /sys/class/graphics/fbcon/cursor_blink

But when I have some message in the console (for example remove the ethernet cable and plug again again)
The console will print message over the Qt application.

Someone know how I can fix this?

Thank you.

Best Regards,

Caio Pereira

You can disable the Virtual Terminal cursor by using the kernel command line parameter vt.global_cursor_default=0, use the folowing command in the U-Boot command prompt:

setenv defargs ${defargs} vt.global_cursor_default=0

You can also consider disabling the virtual console entirely by removing the kernel configuration CONFIG_VT and/or CONFIG_VT_CONSOLE.

Hi Caio, hide cursor in screen?

Qt5.X

In EGLFS:

export QT_QPA_EGLFS_HIDECURSOR 

In FB:

export QT_QPA_FB_HIDECURSOR

Att,
Cleiton Bueno

Blog | Linkedin | B2Open

Cleiton,

I’m using EGLFS and I test with export QT_QPA_EGLFS_HIDECURSOR but didn’t work.

@caiortp, did the U-Boot argument vt.global_cursor_default=0 help or is this still open?

@stefan.agner thank you!

With consoleblank=0 works.

Glad it worked! Note, consoleblank=0 is not the relevant part in this argument string, the relevant part is that console=tty1 is not there anymore…

@caiortp, oh sorry, I clearly did not read your question completely. You can disable the console on tty1 by removing console=tty1 from the kernel command line. U-Boot composes the kernel command line using the setup environment variable, use the following command to remove console=tty1 from the kernel argument list.

setenv setup 'setenv setupargs console=${console},${baudrate}n8 ${memargs} consoleblank=0'

To get rid of the console in any case, removing CONFIG_VT_CONSOLE is certainly an option too.

Regarding cursor, I would still recommend to use vt.global_cursor_default=0 instead of the user space solution, since that makes sure the cursor will not be shown from the very beginning.

@stefan.agner

No didn’t work. I will test remove the CONFIG_VT_CONSOLE.

Tested under apalis-imx6 and it works too. thank you