Fixing a blank screen in KDE

I have Fedora 21 installed on my laptop (a ThinkPad) and use the KDE window manager.  Recently (today, actually) I ran into a bizarre problem with it: after undocking it, the screen went blank.  Or technically, it stayed blank instead of turning on, since when it is docked I only use external monitors (two hooked up via the DisplayPort outputs on the dock, and one connected to the DisplayPort output on the laptop itself).  It took some troubleshooting but eventually I solved it.

The symptoms were as follows:

  1. Any time there were no external monitors connected, the screen would be blank.
  2. I could dock or plug in one external monitor (e.g. using an onboard display output) and reconfigure the displays such that the built-in display was enabled, but subsequently removing the external displays still disabled the built-in display.
  3. Rebooting didn’t help. The built-in display would be enabled and I could log in, but as soon as KDE loaded the display turned off.

From the above it was apparent that something in KDE was doing this.  But what?  If you’ve used KDE on a laptop you may have noticed that the display settings are remembered, which is really useful for a laptop.  So for example if you dock the laptop, the settings you used when it was previously docked are remembered.  The same applies if you connect an external monitor, or make any other change to the physical layout of the displays.  Somehow, apparently the “wrong” display settings were being remembered for my laptop when no external monitors are connected.

First I poked around the Display and Monitor section in System Settings.  I could configure the displays but I couldn’t find anything relevant for the issue.  I searched Google a bit and didn’t find anyone reporting similar problems.  I found complaints of the display settings not being remembered, but nothing completely applicable to my issue.  What I did find was a possible culprit: KScreen.  I couldn’t immediately find documentation useful for my issue so I took a look at the configuration myself.  This meant checking out the contents of ~/.kde/share/apps/kscreen/.  Personally I just used Konsole but Dolphin would have also worked.  There I found text files with filenames that appeared to be checksums.  There were a dozen or so such file, so I assume these represented each unique physical display configuration I’ve used with my laptop.

I was in a hurry so rather then trying to edit any of the files in the kscreen directory I went with the “nuke from orbit” option and deleted the entire directory.  The very next time I unplugged the external displays the issue was solved, the built-in display was enabled, and I could actually use the laptop!  The kscreen directory was regenerated, too.  This issue was annoying to have but luckily it was an easy fix.

This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

5 Responses to Fixing a blank screen in KDE

  1. Nico N. says:

    I actually had the same issue today, but the other way around.
    I first configured the 2nd monitor I plugged in. However I probably made a mistake in there.
    Now every time I plugged in that monitor, my laptop screen and the 2nd screen would go blank.
    If I unplug it, the laptop monitor would show something again.
    I was searching the whole web until I found your blog entry.
    After deleting two files in that folder, which should be my TV and my 2nd monitor, everything works fine again!
    Thank you so damn much, I thought I could never get it to work again.

  2. Daniel says:

    You might consider turning this into a Super User (at StackExchange) question, it is really helpful.

    I also have a ThinkPad, on an Ubuntu with KDE, and deleting the files in the kscreen directory solved my issue.

  3. Jerry says:

    Had the same issue on Fedora KDE lately. Finally found this today and yes, the issue is solved! Thanks!

  4. Adrian says:

    This saved me a lot of time! Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.