How do I perform easy switching to external monitor

9,490

The nvidia tool nvidia-settings can be used from command line, but is not capable to activate or deactivate screens. xrandr is not supported by the propietary NVIDIA-drvers.

To switch displays you can use the tool disper: disper on launchpad It's a command line tools, wich exactly fits your problem an is easy to use.

Some example scripts for automatic switching at startup can be found here: Ubuntuusers.de wiki

I use these scripts to switch my monitors. It works perfectly.

Share:
9,490

Related videos on Youtube

YXD
Author by

YXD

o.O

Updated on September 18, 2022

Comments

  • YXD
    YXD over 1 year

    I am currently changing between my laptop and my external monitor with the NVidia X Server Settings program and I'm sure I'm doing it in a really dumb way:

    I currently select the external monitor, set it from "Disabled" to "TwinView", then then select the laptop screen and change it to "Disabled". Then I press "Apply" and it's done. I do this in reverse when I need to disconnect.

    It's the only way I've managed to switch monitors (both VGA and DisplayPort connections on my ThinkPad), and it's a really fiddly process which I have to perform multiple times per day.

    enter image description here

    However I really want to be able to switch with Fn-F8 or some other keyboard shortcut but this doesn't appear to work with any connection method. Is there anything better than I can do?

    • Benji
      Benji over 12 years
      I've wrestled with this issue too. I know that my Fn-F5 (or whatever it is) keyboard shortcut works in the rare occasion when I boot into windows. So, for at least some laptops, this keyboard shortcut works through software, not hardware.
    • YXD
      YXD over 12 years
      Fn-F5 turns wifi on and off, Fn-F8 enables and disables the touchpad it seems...
    • Bruno Pereira
      Bruno Pereira over 12 years
      Can you please add your xorg.conf file?
    • YXD
      YXD over 12 years
      @brunopereira81 : pastebin.com/QC4UnBve
    • Nagendhiran
      Nagendhiran over 10 years
      Excellent, I just used the disper (disper --direction=left -e) and able to move the external display to left side. Good tool to have in place for developer and gaming enthusiasts.
  • YXD
    YXD over 12 years
    Thanks, I'm away from the office until next week but I'll give it a try then.
  • lbo
    lbo almost 4 years
    disper is in the repositories as of Trusty (14.04) and Xenial (16.04), so it can be installed via sudo apt-get install disper. Unfortunately, that's no longer true in Focal (20.04). What a pity!