Consider the following setup: My laptop is normally located at my desk connected to power, external keyboard and mouse and an external monitor. Since the laptop's screen is pretty small and my monitor is pretty big, I work with the laptop screen turned off using only the external monitor. Recently I wanted to take the laptop to another place to continue working there, hence I disconnected all the externals and took the device now running on battery with me.

Before doing so, I had made a break and during that break the desktop had locked itself and switched off the monitors. Therefore I did not remember that I had to change the display settings to use the internal screen as I removed the external monitor and when I ended up at my new location, I was looking into a black screen and I could not change the screen settings using the laptop's quick access keys since the desktop was locked. However, I had still access to the tty's using the CTRL+ALT+F keys and I was wondering if there was some way to access and change the respective settings from a command line without rebooting the computer, restarting the display manager or any other action that forcefully terminates the user's current session.

Of course, I could just have gone back to my desk, connect the external monitor, change the settings and disconnect again. Or I could have unlocked my desktop by entering my password blindly and then use the screen setting hotkeys, but these options might not be available in some cases.

2 Answers 2


xrandr should be what you are looking for.

Also, you may need to review the instructions Multihead instructions.

I have had good luck with xrandr on gnome 3 but it should work fine with KDE.


Just in case you can remove display settings KDE has cached (enabled/disabled, position, resolution, rotation, framerate). They are in json files with funky names under ~/.local/share/kscreen

You should be able to do that in virtual console (ctrl+alt+Fx) and then reboot.

KDE will be forced to redetect your monitors upon the next start.

On a bad side, you'll have to configure your multi-monitor setup again, but it shouldn't be a big deal for you, given you've already made that in past.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .