diff --git a/startkde/startplasma-waylandsession.cpp b/startkde/startplasma-waylandsession.cpp --- a/startkde/startplasma-waylandsession.cpp +++ b/startkde/startplasma-waylandsession.cpp @@ -59,7 +59,7 @@ if (!startKDEInit()) return 3; - if (!startKSMServer()) + if (!startKSMServer(true)) return 4; // Anything after here is logout diff --git a/startkde/startplasma-x11.cpp b/startkde/startplasma-x11.cpp --- a/startkde/startplasma-x11.cpp +++ b/startkde/startplasma-x11.cpp @@ -100,7 +100,7 @@ if (!startKDEInit()) return 1; - if (!startKSMServer()) + if (!startKSMServer(false)) return 1; // Anything after here is logout diff --git a/startkde/startplasma.h b/startkde/startplasma.h --- a/startkde/startplasma.h +++ b/startkde/startplasma.h @@ -45,7 +45,7 @@ void setupX11(); bool startKDEInit(); -bool startKSMServer(); +bool startKSMServer(bool wayland); void waitForKonqi(); diff --git a/startkde/startplasma.cpp b/startkde/startplasma.cpp --- a/startkde/startplasma.cpp +++ b/startkde/startplasma.cpp @@ -338,7 +338,7 @@ return true; } -bool startKSMServer() +bool startKSMServer(bool wayland) { // finally, give the session control to the session manager // see kdebase/ksmserver for the description of the rest of the startup sequence @@ -355,8 +355,12 @@ QStringList ksmserverOptions = { QStringLiteral(CMAKE_INSTALL_FULL_BINDIR "/ksmserver") }; - if (desktopLockedAtStart) { - ksmserverOptions << QStringLiteral("--lockscreen"); + if (wayland) { + ksmserverOptions << QStringLiteral("--no-lockscreen"); + } else { + if (desktopLockedAtStart) { + ksmserverOptions << QStringLiteral("--lockscreen"); + } } const auto exitCode = runSync(QStringLiteral("kwrapper5"), ksmserverOptions);