3

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.

1 Answer 1

1

Unless I'm misunderstanding what you're saying, from looking at your output, it appears there is one entry for 1366x768 and another for 1360x768. (By entries, I assume you meant rows in output).

If this is the case, then it appears that you want 1360x768.

Does

xrandr --output LVDS1 --mode 1360x768 --primary --output HDMI1 --off

Do the trick?

Also, you may want to try with/without the --primary flag in case it doesn't work.

5
  • I feel like an idiot. I read 1360 as 1366!. And unfortunately, your suggestion doesn't work; for whatever reason my laptop screen remains black. Jun 3, 2015 at 16:00
  • What about giving HDM1 --auto instead of --off? Sorry, hard for me to find what would work on your hardware :-/
    – zje
    Jun 3, 2015 at 16:04
  • 1
    Actually I just solved the problem. For whatever reason my laptop's backlight was not turning on. Thanks for your help though. Jun 3, 2015 at 16:11
  • Cool, glad it works! You are probably doing this already, but if you have xbacklight installed, you can add that after your xrandr command to flip the backlight on.
    – zje
    Jun 3, 2015 at 16:13
  • Yes, that's exactly what I'm doing, thanks for the suggestion though. Jun 3, 2015 at 16:16

You must log in to answer this question.

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