Kubuntu black screen after logging in

Recently I’ve had a problem with updating the system: The Discovery app crashed every time I tried to update. After a couple of hours I’ve tried again and the app didn’t crash, the update did complete. However, after rebooting and logging I get a flickering black screen (I can see the wallpaper and my icons for a moment). I took a video with my phone:

https://www.youtube.com/watch?v=lUmT2wU8Sck