Permanently disable second screen

24,057

Solution 1

This makes linux ignore the LVDS output altogether. That way it will not be used by all login managers, and won't appear in display configuration dialogs.

Create a file /usr/share/X11/xorg.conf.d/50-disable-lvds.conf and write there:

Section "Monitor"
        Identifier      "lvds monitor"
        Option  "ignore"        "true"
EndSection
Section "Device"
        Identifier      "onboard"
        Option  "Monitor-LVDS1" "lvds monitor"
EndSection

Solution 2

Unfortunately, Halox answer didn't fix the issue, as GDM3 configures the X server on it's own and re-enables the disabled monitor (silly).

After reading the docs I added xrandr --output LVDS1 --off at the top of /etc/gdm/Init/Default and finally got it to work.

Solution 3

modify /etc/default/grub and add

video=LVDS-1:d video=VGA-1:e

:d disable :e enable.

For example mine is

GRUB_CMDLINE_LINUX_DEFAULT="video=LVDS-1:d video=VGA-1:e acpi=force elevator=noop i8042.noloop=1 usbhid.quirks=0xeef:0x1:0x40"acpi=force elevator=noop i8042.noloop=1 usbhid.quirks=0xeef:0x1:0x40"

Hope this helps

Share:
24,057

Related videos on Youtube

Lazar
Author by

Lazar

BI Engineer with a passion for SQL Server and Scala

Updated on September 18, 2022

Comments

  • Lazar
    Lazar over 1 year

    My laptop's monitor does not work any more and thus I've attached an external monitor.

    On boot, GDM still recognizes the primary laptop screen and displays it's login window on it. Which I then can't see.

    I can disable the laptop's screen by running xrandr --output LVDS1 --off after logging in. I tried putting this command into ~\.xinitrc and into a ./40-xrandr.sh in /etc/X11/xinit/xinitrc.d.

    Both to no effect at all. I had hoped that it'd at least would switch off the laptop's screen on log in.

    How do I disable the laptop's screen before GDM starts?

    • ADTC
      ADTC almost 11 years
      The BIOS might have an option to set the default monitor. A lot of the modern laptop BIOSes have this. Check your BIOS manual. When set correctly and your second monitor is plugged in, the BIOS will treat it as the primary (your OS will think this is the main screen), otherwise it will fall back to the laptop screen.
    • Lazar
      Lazar almost 11 years
      I looked for it, but the BIOS does not provide such an option.
    • ADTC
      ADTC almost 11 years
      No BIOS setting with the options like Internal LCD and External? Well, I'm sorry then. It would have been the simplest solution.
    • Lazar
      Lazar almost 11 years
      Yes, I know. I hoped for that too. And it's even a 'business system' (Dell Latitude D830) ...
    • ADTC
      ADTC almost 11 years
      Does this match your BIOS screen? I see a Video option on the left. It appears to have sub-options (as indicated by the +). What are the options available under Video? There are so much variations in BIOSes that one can't pinpoint exactly what option to use unless one looks at it. And the terminologies/descriptions used by the manufacturer are quite often inadequate, confusing or misleading.
    • Lazar
      Lazar almost 11 years
      Yes it does, but there's no option under Video that allows for disabling monitors. Pretty dull, IMHO. Thanks for you patience!
  • Lazar
    Lazar almost 11 years
    Although this should work, it didn't in combination with GDM3. Thanks for the hint.
  • JohnnyFromBF
    JohnnyFromBF almost 7 years
    Correct answer imho, since apparently video=LVDS-1:d can be ignored by the X server.