[plasma/plasma-login-manager] src/daemon: daemon: Drop code that tries a display multiple times

Neal Gompa <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 8591a710ab7eb9a6e3777bad877425f3ebfae581 by Neal Gompa, on behalf of David Edmundson.
Committed on 02/08/2026 at 17:12.
Pushed by ngompa into branch 'master'.

daemon: Drop code that tries a display multiple times

This was a workaround for when drivers weren't loaded on time.
This is fixed by used of udevadm settle.

M  +1    -22   src/daemon/Seat.cpp
M  +0    -1    src/daemon/Seat.h

https://invent.kde.org/plasma/plasma-login-manager/-/commit/8591a710ab7eb9a6e3777bad877425f3ebfae581

diff --git a/src/daemon/Seat.cpp b/src/daemon/Seat.cpp
index 2b22554c..50760844 100644
--- a/src/daemon/Seat.cpp
+++ b/src/daemon/Seat.cpp
@@ -178,28 +178,7 @@ void Seat::createDisplay()
     display->setAutoLogin(autologinUser, autologinSession);
 
     // start the display
-    startDisplay(display);
-}
-
-void Seat::startDisplay(Display *display, int tryNr)
-{
-    if (display->start()) {
-        return;
-    }
-
-    // It's possible that the system isn't ready yet (driver not loaded,
-    // device not enumerated, ...). It's not possible to tell when that changes,
-    // so try a few times with a delay in between.
-    qWarning() << "Attempt" << tryNr << "starting the Display server on vt" << display->terminalId() << "failed";
-
-    if (tryNr >= 3) {
-        qCritical() << "Could not start Display server on vt" << display->terminalId();
-        return;
-    }
-
-    QTimer::singleShot(2000, display, [this, display, tryNr] {
-        startDisplay(display, tryNr + 1);
-    });
+    display->start();
 }
 
 void Seat::displayStopped()
diff --git a/src/daemon/Seat.h b/src/daemon/Seat.h
index 9b890d5d..09f61589 100644
--- a/src/daemon/Seat.h
+++ b/src/daemon/Seat.h
@@ -46,7 +46,6 @@ private slots:
     void displayStopped();
 
 private:
-    void startDisplay(PLASMALOGIN::Display *display, int tryNr = 1);
     bool isTtyInUse(const QString &tty) const;
 
     QString m_name;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.