Disable Linux console output on LVDS display (custom Yocto build)

Hello,

I’m using a custom Yocto build for an iMX8 that is based on the standard Linux image that is provided on your website.
A display is connected to the iMX8 using the LVDS connection and I’m running a QT application using eglfs.
What I noticed is that from time to time console output is visible on top of the GUI of the QT application.
Sometimes even the Linux login prompt is visible instead of the GUI of the application.

Therefore I’d like to completely disable the console output on the LVDS display.
I’ve read a lot of possible solutions but none seem to be applicable for my setup.

I read that this is configured in the setup parameter of uboot, but no console definition is defined there.
The only parameter that contains the console definition is mmcargs, which looks like this:
mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot} video=imxdpufb5:off video=imxdpufb6:off video=imxdpufb7:off.
As you can see this definition does not contain console=tty1, which should be removed to remove the console output as mentioned on other pages.

I also tried disabling the getty@tty1.service systemd service, which does seem to help but still doesn’t remove all console output visible on the LVDS display.

What else can I do to completely remove the login prompts and Linux console output from the LVDS display?

Thanks in advance.

Dear @DemKev

Actually this should not happen. Instead of trying to disable the console output, I would rather recommend to search the root cause of your issue. How do you start your Qt application by the way?

Would it be possible to share your image with us? You can also send it to support@toradex.com if you don’t want to share it publicly (please remember to reference this thread).

Additionally, would it be possible to make a video and share it here, to show us the behavior of your UI?

Best regards
Diego

Hi Diego,

Thanks for your reply.

Interesting to hear that this is not expected behavior.
I’m starting our QT application like so: “./application -platform eglfs”.

I’m afraid I’m not at liberty to share our image or a video of the GUI of the application at this point in time.

I understand that it might be difficult to pinpoint the cause of this issue without the image and/or a video, but do you have any idea what could be the reason for this issue?
If disabling the Linux console on the LVDS display is also an option, I’d be happy to try this to see if this works out for us.

Thanks in advance!

Hi @DemKev

Okay I can understand that. Would it then be possible to create a video record of the behavior that we can see what you mean?

Please see the following snippet from the definition of EGLFS:

EGLFS forces the first top-level
window (be it either a QWidget or a
QQuickView) to become fullscreen. This
window is also chosen to be the root
widget window into which all other
top-level widgets (for example
dialogs, popup menus or combobox
dropdowns) are composited.

Could you also explain what you mean by the “standard Linux image” from which you derived your own custom image?

In the reference image “console-tdx-image” we add the recipe “wayland-terminal-launch” (line 38 in the image definition), which adds a service called wayland-app-launch.service. This service just starts a console and this is maybe what you see? You could also try to add another recipe instead of the “wayland-terminal-launch” and start your application instead.

Did you try to start another sample application from Qt instead and see if the same happens there?

Best regards
Diego

Hi Diego,

Unfortunately I’m unable to make a video at this moment.

With “standard Linux image” I meant the “console-tdx-image”, you’re right.
I removed weston and the wayland-terimal-launch from our image since we’re not using wayland/weston but are using eglfs to run our QT application.

Maybe “console output” wans’t the correct term to use. I meant kernel output before. So basically our QT application is running, but kernel output is visible on top of the QT application. So for example, when I plug in (or disconnect) the ethernet cable, kernel output is visible that the ethernet interface is configured properly.

I read that the “console=xxx” option should be provided to the kernel arguments to force one specific output to be used for the kernel output. This does seem to be included in the “mmcargs” uboot variable but doesn’t seem to be included in the kernel boot arguments when I check the contents of /proc/cmdline:
pci=nomsi root=PARTUUID=acb33626-02 ro rootfstype=ext4 rootwait

Is there a way to include the “console=xxx” option in the kernel arguments?

UPDATE
I found out that the uboot environment variable “defargs” is actually used in the creation of the value that is read using /proc/cmdline.
So I’ve added the following to this defargs variable in uboot: “console=${console}” using the following command: "setenv defargs “pci=nomsi console=${console}” and this now results in the linux console only being visible on my debug UART. I read somewhere else that when no console= is defined that all outputs are used for the linux console.

I found out that the uboot environment variable “defargs” is actually used in the creation of the value that is read using /proc/cmdline. So I’ve added the following to this defargs variable in uboot: “console=${console},${baudrate}” using the following command:
setenv defargs "pci=nomsi console=${console}"
and this now results in the linux console only being visible on my debug UART.
I read somewhere that when no console= is defined that all outputs are used for the linux console.

1 Like

Perfect, great you found a solution! Thanks for the feedback!

Regards,
Stefan