As I faced exactly the same issue on my notebook with Intel+Nvidia Optimus (proprietary driver), my solution is to add
xrandr --output VGA-0 --off
to /usr/share/sddm/scripts/Xsetup
Though removing ~/.config
files is a default reaction, it didn't solve my problem. Anyway I'd recommend renaming configuration files if needed for testing purposes:
mv ~/.config/plasma-org.kde.plasma.desktop-appletsrc ~/.config/plasma-org.kde.plasma.desktop-appletsrc.bkp
It is a known bug that nvidia drivers add CTR device VGA-0 even if it is not connected. So this caused plasmashell to crash at login time. A quite comprehensible reaction to such a noobish bug IMHO.
I also tried to disable VGA-0 in KDE Display Settings, but these settings come into effect after login. Xsetup is run before sddm starts, so the CTR device is disabled even before startplasmashell-X11
which is executed by /usr/share/xsessions/plasma.desktop
Hope this helps to solve it without plasmashell --replace &
because that command slows down login time, plus grinded my nerves.
Cheers