I my Toshiba Satellite laptop is usually connected to an external monitor when I'm at home. Disconnecting the monitor does not restore my laptop's display; I have to manually enable my laptop's display from the Display settings to get it working.
I tried without much success to use xrandr to automatically switch displays. The command xrandr --output LVDS1 --auto --primary --output HDMI1 --off
turns off my external monitor without activating my laptop's display.
I suspect that this is related to the fact that my laptop has two modes for its default resolution. Here's the output of xrandr:
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
LVDS1 connected (normal left inverted right x axis y axis)
1366x768 59.99 +
1360x768 59.80 59.96
1024x768 60.00
800x600 60.32 56.25
640x480 59.94
VGA2 disconnected (normal left inverted right x axis y axis)
HDMI1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 600mm x 340mm
1920x1080 60.00*+ 50.00 59.94
1920x1080i 60.00 50.00 59.94
1680x1050 59.88
1400x1050 59.95
1600x900 59.98
1280x1024 60.02
1440x900 59.90
1280x800 59.91
1152x864 59.97
1280x720 60.00 50.00 59.94
1024x768 60.00
800x600 60.32
720x576 50.00
720x480 60.00 59.94
640x480 60.00 59.94
DP1 disconnected (normal left inverted right x axis y axis)
As you can see, there are two entries for 1366x768. I also noticed that when I activate my laptop's display from the Display settings window, I have to manually change the resolution to the second 1366x768 entry for it to work.
Does anyone have an idea on how I can get xrandr to activate my laptop display? In particular, is there a way to specify that I want xrandr to activate the second mode with resolution 1366x768?
EDIT: As zje pointed out, the two row are in fact different: 1366 versus 1360 (how embarrassing!).
However, I was able to solve the problem. It turns out that my laptop's backlight was not turning on, so while my screen was "on" nothing was showing.