I've seen that black line show up when compositing gets disabled in KDE plasma 5. It seems that it can get disabled automatically if the compositor crashes (kwin I believe).
In plasma 5 check under "System Settings" > "Display and Monitor" > "Compositor" > "Enable compositor on startup". See if that is unchecked. Might also show a warning message in that window if the compositor recently crashed and disabled itself.
Alternatively you could check if your ~/.config/kwinrc has
Code:
[Compositing]
OpenGLIsUnsafe=true
Which I think is the same thing, but I've noticed it get toggled there too after a kwin crash, bringing the black line panel.
Edit: Also this is supposedly fixed in the upcoming frameworks 5.78, according to the bugfix list here
https://pointieststick.com/2020/12/1...ll-the-things/