Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Wayland : Creating a fake screen in order for Qt not to crash
Qt 6.11 is out! See what's new in the release blog

Wayland : Creating a fake screen in order for Qt not to crash

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
waylandcrashscreen
6 Posts 2 Posters 191 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    The Qt Mayssa
    wrote last edited by
    #1

    I'am having a trouble turning on off screen on wyaland .
    Using these commands on my RPI5, ( using labwc)

    • wlr-randr --output HDMI-A-1 --on
    • wlr-randr --output HDMI-A-1 --off
      Makes my app crash the last log i can see as important is ;
    QCoreApplication::postEvent: Unexpected null receiver
    qt.qpa.wayland: Creating a fake screen in order for Qt not to crash
    MainWindow::processExited Le processus NeoScheduler a termine par lui-meme
    

    Is there any solution ? is it a known issue ?
    Thank you

    1 Reply Last reply
    0
    • Axel SpoerlA Online
      Axel SpoerlA Online
      Axel Spoerl
      Moderators
      wrote last edited by
      #2

      Hi, @The-Qt-Mayssa ,
      can you please post a minimal compilable reproducer?

      Software Engineer
      The Qt Company, Oslo

      1 Reply Last reply
      0
      • T Offline
        T Offline
        The Qt Mayssa
        wrote last edited by
        #3

        Hello @Axel-Spoerl ,

        I’m running a Qt Widgets application on Wayland (Raspberry Pi 5, wlroots-based compositor).
        Qt version : 5.15.17

        The app is started with:

        export QT_QPA_PLATFORM=wayland
        export WAYLAND_DISPLAY=wayland-0
        ./myApp
        

        When I disable the display using:

        wlr-randr --output HDMI-A-1 --off
        

        the application crashes or becomes unstable.

        This also happens when the command is executed via SSH.

        When I re-enable the output:

        wlr-randr --output HDMI-A-1 --on
        

        the issue still occurs.

        It seems that removing the output entirely from Wayland causes Qt to crash.

        Questions:

        • Is this a known limitation of Qt Widgets on Wayland?
        • What is the recommended way to handle display power management in this setup?
        • Should outputs be avoided from being fully disabled when using Qt?

        Thanks for your help.

        1 Reply Last reply
        0
        • Axel SpoerlA Online
          Axel SpoerlA Online
          Axel Spoerl
          Moderators
          wrote last edited by
          #4

          Well, that's not a reproducer.
          It's how you start the app that crashes.
          However, Qt 5.15 has been EOL for a long time.
          The wayland implementation has been hardened recently.
          Please use Qt 6.8 or later.

          Software Engineer
          The Qt Company, Oslo

          T 1 Reply Last reply
          0
          • Axel SpoerlA Axel Spoerl

            Well, that's not a reproducer.
            It's how you start the app that crashes.
            However, Qt 5.15 has been EOL for a long time.
            The wayland implementation has been hardened recently.
            Please use Qt 6.8 or later.

            T Offline
            T Offline
            The Qt Mayssa
            wrote last edited by
            #5

            @Axel-Spoerl Passing to qt6 , is more complicated then that. The idea is to keep app working , fixing some bugs ( the eolution to qt6 is not an option today :// )
            i start the app manually via a script launch.sh , that sets the exports values then ./myapp.

            Knowing the app crashes only when doing wlr-randr command to turn on off screen.
            I already added logs to debug ( since i'm cross compiling to deploy on a light version of tirixie :') ) , i'm getting this as a last log

            
            2026.03.25 13:16:08 Creating a fake screen in order for Qt not to crash
            2026.03.25 13:16:08[D] step Primary screen changed: QScreen(0x73a0270, name="")
            2026.03.25 13:16:08[D] step Screen removed: QScreen(0x6ec0510, name="HDMI-A-1")
            
            

            the code:

                QObject::connect(&app, &QGuiApplication::screenRemoved,
                                 [](QScreen *screen){
                                     qDebug() << "step Screen removed:" << screen;
                                 });
            
                QObject::connect(&app, &QGuiApplication::primaryScreenChanged,
                                 [](QScreen *screen){
                                     qDebug() << "step Primary screen changed:" << screen;
                                 });
            
            1 Reply Last reply
            0
            • Axel SpoerlA Online
              Axel SpoerlA Online
              Axel Spoerl
              Moderators
              wrote last edited by
              #6

              @The-Qt-Mayssa
              I think we're talking in circles.
              If you want someone in the forum to analyze the problem, you need to provide a minimal reproducer. In the unlikely case that it's a bug in Qt, it won't be fixed in an EOL version.
              You will have to upgrade at some point anyway.

              Software Engineer
              The Qt Company, Oslo

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved