Solution for Black Screen Issue in KDE 5

Help with the version of MX KDE officially released by the Development Team.
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
rails123
Posts: 4
Joined: Tue Jun 10, 2025 7:43 pm

Solution for Black Screen Issue in KDE 5

#1 Post by rails123 »

Hi everyone,
I wanted to share a solution for a common issue that some users might face with KDE 5. I personally encountered it across multiple Linux distributions that use KDE 5, so it’s not specific to MX Linux.

The issue:
When using dual monitors, the second screen often shows a black desktop — only the task manager appears, and nothing else is visible.

Temporary workaround I used:
I used to fix it manually by pressing [Super + P] to toggle between display modes. Once I changed the mode, the desktop would load normally on the second screen.

Permanent solution:
I explained the issue to ChatGPT and asked it to create a script that could automate this fix. After a few adjustments, the script worked perfectly.
All you need to do is add the script to KDE’s Autostart settings and make sure it’s executable.

Here’s the script:

Code: Select all

#!/bin/bash
sleep 2
kscreen-doctor output.65.enable
kscreen-doctor output.65.primary
sleep 2
kscreen-doctor output.67.enable
kscreen-doctor output.67.primary
kscreen-doctor output.65.disable
Tip:
To find the correct screen IDs (like [output.65], [output.67], etc.), you can run the following command in the terminal:

Code: Select all

kscreen-doctor -o
This will list all connected and disconnected display outputs along with their IDs, so you can adjust the script according to your specific setup.

Example output from my system:

Code: Select all

Output: 65 eDP-1 disabled connected ...
Output: 66 DP-1 disabled disconnected ...
Output: 67 HDMI-1 enabled connected ...
In my case:

[output.65] is my laptop screen (eDP-1)

[output.67] is my external monitor (HDMI-1)

So, the script enables the laptop screen briefly, sets it as primary (which helps KDE "wake up" the desktop), then switches to the external screen and disables the laptop display.

Thanks for your time!

Return to “MX KDE Official Release”