On Linux Mint 22.3 Cinnamon how to add a virtual display?
May 27, 11:57am

To add a virtual display on Linux Mint 22.3 Cinnamon, use one of these methods, depending on your GPU:


🔹 Method 1: Enable Intel VirtualHeads (Recommended for Intel GPUs)

If you have an Intel GPU, the driver already supports virtual outputs (VIRTUAL1, VIRTUAL2), but they may be disabled by default.

  1. Create a config file to enable virtual heads:

    bash
    sudo nano /usr/share/X11/xorg.conf.d/20-intel.conf
  2. Add this content (adjust VirtualHeads count as needed):

    ini
    Section "Device"
        Identifier  "intelgpu0"
        Driver      "intel"
        Option      "VirtualHeads" "2"
    EndSection
  3. Reboot your system:

    bash
    sudo reboot
  4. Verify the virtual displays are available:

    bash
    xrandr

    You should see VIRTUAL1 and VIRTUAL2 listed as disconnected.

  5. Enable and configure the virtual display (e.g., 1920x1080 to the right of your primary display):

    bash
    xrandr --output VIRTUAL1 --mode 1920x1080 --right-of eDP1

    Replace eDP1 with your primary display name (check with xrandr).


🔹 Method 2: Use xrandr --setmonitor (Works with xrandr ≥1.5)

If you want to split an existing output into virtual monitors (e.g., for screen sharing or multi-region setups):

  1. Check your current display name:

    bash
    xrandr

    Example output: HDMI-A-0 connected primary 1920x1080+0+0

  2. Create a virtual monitor (e.g., split HDMI-A-0 into two 1280x1024 regions):

    bash
    xrandr --setmonitor "VIRTUAL-LEFT" 1280/338x1024/270+0+0 HDMI-A-0
    xrandr --setmonitor "VIRTUAL-RIGHT" 1280/338x1024/270+1280+0 none
    • Syntax: --setmonitor "NAME" W/HxH+X+Y OUTPUT
    • none = no physical output (purely virtual).
  3. Verify with:

    bash
    xrandr --current

🔹 Method 3: Use a Disconnected Output (Works with Most GPUs)

If your GPU exposes disconnected outputs (e.g., HDMI-2, DP-1, VIRTUAL1):

  1. List disconnected outputs:

    bash
    xrandr | grep disconnected

    Example: VIRTUAL1 disconnected (normal left inverted right x axis y axis)

  2. Add a custom mode (if needed):

    bash
    xrandr --newmode "1920x1080_60" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
    xrandr --addmode VIRTUAL1 "1920x1080_60"
  3. Enable the virtual display:

    bash
    xrandr --output VIRTUAL1 --mode 1920x1080 --right-of eDP1

🔹 Method 4: Use xserver-xorg-video-dummy (Fallback)

If the above methods fail, install the dummy driver:

  1. Install the dummy driver:

    bash
    sudo apt install xserver-xorg-video-dummy
  2. Create a config file:

    bash
    sudo nano /usr/share/X11/xorg.conf.d/10-dummy.conf

    Add:

    ini
    Section "Device"
        Identifier  "DummyDevice"
        Driver      "dummy"
        VideoRam    256000
    EndSection
    
    Section "Screen"
        Identifier  "DummyScreen"
        Device      "DummyDevice"
        Monitor     "DummyMonitor"
        DefaultDepth 24
        SubSection "Display"
            Depth   24
            Modes   "1920x1080"
        EndSubSection
    EndSection
  3. Reboot and enable with xrandr:

    bash
    xrandr --output Dummy-0 --mode 1920x1080 --right-of eDP1

⚠️ Notes

  • Intel GPUs: Method 1 (VirtualHeads) is the cleanest and GPU-accelerated.
  • NVIDIA/AMD: Use Method 2 (--setmonitor) or Method 3 (disconnected outputs).
  • Persistence: Add the xrandr command to Startup Applications or ~/.xprofile to auto-enable on login.
  • Cinnamon GUI: Virtual displays may not appear in the GUI settings; use xrandr for configuration.
May 27, 11:57am
After following *Method 1: Enable Intel VirtualHeads (Recommended for Intel GPUs)*:

```bash
xrandr
```
```
Screen 0: minimum 8 x 8, current 2256 x 1504, maximum 32767 x 32767
eDP1 connected primary 2256x1504+0+0 (normal left inverted right x axis y axis) 280mm x 190mm
2256x1504 60.00*+ 48.00
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)
DP4 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
VIRTUAL2 disconnected (normal left inverted right x axis y axis)
```

```bash
xrandr --output VIRTUAL1 --mode 1920x1080 --right-of eDP1
```
```
xrandr: cannot find mode 1920x1080
```

How to solve this error?
May 27, 3:50pm

The error occurs because 1920x1080 is not a predefined mode for VIRTUAL1. You need to create the mode first, then add it to the output.

Solution: Create and Add the Mode

Run these commands in order:

bash
# 1. Create a new mode for 1920x1080 @ 60Hz
xrandr --newmode "1920x1080_60" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

# 2. Add the mode to VIRTUAL1
xrandr --addmode VIRTUAL1 "1920x1080_60"

# 3. Enable VIRTUAL1 with the new mode
xrandr --output VIRTUAL1 --mode "1920x1080_60" --right-of eDP1

Alternative: Use --auto

If you just want to enable VIRTUAL1 with a default mode (no need to specify resolution):

bash
xrandr --output VIRTUAL1 --auto --right-of eDP1

Verify

Check if it worked:

bash
xrandr

You should see VIRTUAL1 connected 1920x1080+2256+0 (or similar).


🔹 Persist Across Reboots

Add the commands to Startup Applications or ~/.xprofile:

bash
echo 'xrandr --newmode "1920x1080_60" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync && xrandr --addmode VIRTUAL1 "1920x1080_60" && xrandr --output VIRTUAL1 --mode "1920x1080_60" --right-of eDP1' >> ~/.xprofile
May 27, 3:50pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.

Vibe can make mistakes. Check answers. Learn more