20

I want to create a dummy, virtual output on my Xorg server on current Intel iGPU (on Ubuntu 16.04.2 HWE, with Xorg server version 1.18.4). It is the similiar to Linux Mint 18.2, which one of the xrandr output shows the following:

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
...
eDP1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
...
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
...

In the Linux Mint 18.2, I can turn off the built-in display (eDP1) and turn on the VIRTUAL1 display with any arbitrary mode supported by the X server, attach x11vnc to my main display and I'll get a GPU accelerated remote desktop.

But in Ubuntu 16.04.2, that's not the case. The VIRTUAL* display doesn't exist at all from xrandr. Also, FYI, xrandr's output names is a little bit different on Ubuntu 16.04.2, where every number is prefixed with a -. E.g. eDP1 in Linux Mint becomes eDP-1 in Ubuntu, HDMI1 becomes HDMI-1, and so on.

So, how to add the virtual output in Xorg/xrandr?

And how come Linux Mint 18.2 and Ubuntu 16.04.2 (which I believe uses the exact same Xorg server, since LM 18.2 is based on Ubuntu, right?) can have a very different xrandr configurations?

Using xserver-xorg-video-dummy is not an option, because the virtual output won't be accelerated by GPU.

3 Answers 3

24

Create a 20-intel.conf file:

sudo vi /usr/share/X11/xorg.conf.d/20-intel.conf

Add the following configuration information into the file:

Section "Device"
    Identifier "intelgpu0"
    Driver "intel"
    Option "VirtualHeads" "2"
EndSection

This tells the Intel GPU to create 2 virtual displays. You can change the number of VirtualHeads to your needs.

Then logout and login. You should see VIRTUAL1 and VIRTUAL2 when you run xrandr.

Note if you were using the modesetting driver previously (which is the modern default) switching to the intel driver will cause the names of displays to change from, eg, HDMI-1 or DP-1 to HDMI1 or DP1.

3
  • And this also changes the xrandr display names to 'HDMI1' and 'eDP1' instead of 'HDMI-1' and 'eDP-1', as expected!
    – Paulus
    Sep 14, 2017 at 6:52
  • 1
    Doing this removed my HDMI1 screen from the list of displays as shown by xrandr. Could be that this interferes with my Nvidia X settings Jun 14, 2019 at 13:24
  • 3
    Is it any way to do the same thing with an Nvidia GPU instead of the Intel GPU? Oct 10, 2019 at 19:24
5

In case of black screen on boot with 20-intel.conf, create a 30-virtscreen.conf with these contents:

# nvidia/nouveau/amdgpu device should be configured first before Intel GPU
Section "Device"
  Identifier "nvidiagpu0"
  Driver     "nvidia" # Because you are using Nvidia proprietary driver. Change to "nouveau" if you are using open source nouveau driver
EndSection

# Then configure intel internal GPU
Section "Device"
  Identifier "intelgpu0"
  Driver     "intel"
  Option     "VirtualHeads" "2"
EndSection

I found this solution on the Issues page of the kbumsik/VirtScreen Github project.

1

Intel HD 520 on Linux Mint 20 here.

I can see VIRTUAL1 and VIRTUAL2 in xrandr, however, my system initially boots to a blank screen and I also can't see the virtual display(s) in the display manager of Linux Mint.

Editing this to add another way of adding a virtual output that someone else figured out:

https://github.com/kbumsik/VirtScreen/issues/16#issuecomment-865128729

1

You must log in to answer this question.

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