To give some background, I almost exclusively use docking stations with my laptop. I have a few monitors connected to the docking station and always have my laptop closed when in this configuration. In addition, since the laptop is closed, I also disable the monitor in the Display manager.

The problem is that if I remove the laptop from the docking station the monitor will remain off. This tends to happen either if I have suspended the OS prior to removal or not. It only sometimes happens, to make things more difficult, and I have no information regarding any possible triggers that may cause it since I cannot access the machine in this state. I have not gone so far as to ssh into it. I am, however, able to remount the laptop to the docking station and drive the external monitors as expected when in this state.

Are there any known problems with something like this in Mint?

tl;dr Is there a method to re-enable the laptop's main (integrated) monitor via command line? I could bind this to some kind of key combination or udev rule possibly.


xrandr output with no external monitors connected and dislocated from the docking station

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 32767 x 32767
eDP1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080      60.0*+   59.9     48.0  
   1680x1050      60.0     59.9  
   1600x1024      60.2  
   1400x1050      60.0  
   1280x1024      60.0  
   1440x900       59.9  
   1280x960       60.0  
   1360x768       59.8     60.0  
   1152x864       60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA2 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)

HDMI3 disconnected (normal left inverted right x axis y axis) VIRTUAL1 disconnected (normal left inverted right x axis y axis) VGA-1-0 disconnected

  • Yes, this can be easily scripted using xrandr. Please edit your question and show us the output of xrandr when docked. When you do, make sure to explain which screen is which.
    – terdon
    Commented Jan 19, 2016 at 17:26
  • @terdon, updated. The output corresponds to no externally connected monitors; only the laptops integrated monitor is connected.
    – sherrellbc
    Commented Jan 19, 2016 at 18:09
  • OK, then see Jacob Minshall's updated answer. xrandr --output eDP1 --auto should do it.
    – terdon
    Commented Jan 20, 2016 at 12:21

2 Answers 2


Here are a few lines from my .bash_alias file, you would be most interested in the laptop command:

# switch between dual screen and laptop screen...
_vga=$( xrandr  | sed -n 's/^\(VGA.\).*/\1/pg')
alias laptop='xrandr --output LVDS1 --auto --output $_vga --off'
alias monitor='xrandr --output LVDS1 --off --output $_vga --auto'
alias dual='xrandr --output LVDS1 --auto --left-of $_vga --output $_vga --auto'

So, if your laptop's screen is eDP1, you can enable it with:

xrandr --output eDP1 --auto

While you could bind this to a udev rule, I suggest you simply bind it to a shortcut key which you can run when the screen dies on you.


I've had a similar problem with a Ubuntu install and I noticed that when you lower the resolution in the display settings I didn't get that issue when I undocked. I ended up doing that every time before undocking. I wrote an alias to do it, then I would undock and the it would turn the resolution back again.

So try turning down the resolution in the display settings, clicking apply, and then undocking. The integrated ought to stay on. If it does, we can try furthering a solution.

Oops: didn't see you requested via command line. I said the other option for debugging. Its a common issue. Other solution is to create an alias: alias laptop 'xrandr --output eDP1 --auto' or set to a key binding Example

You must log in to answer this question.

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