Linux systems are normally configured to automatically lock the screen after the user is idle after a set period. It is also by default configured to lock the screen when the system wakes up from system sleep or suspend.
The lock screen brings you to SDDM's login screen for KDE-based distributions such as Kubuntu. The automatic lock screen for KDE can be disabled or configured from KDE's System Settings.
Change the time to set the idle time required to trigger automatic screen lock. Uncheck the After waking from sleep option not to launch screen lock when the system wakes up from sleep.
Comment anonymously. Login not required.