1

I'm running Ubuntu 24.04 LTS (x11) and attempting to use my iPad 9th gen as an extended second display using a virtual monitor through xrandr and other methods. However, I've encountered several issues.

Steps I have tried:

  1. Using xrandr: I couldn't recall the step but the virtual display was listed in xrandr --listactivemonitors, then when I try to interact with the virtual monitor (e.g., xrandr --output VIRTUAL1 --mode 1366x768 --right-of eDP-1), I receive errors such as:
xrandr: warning: output VIRTUAL1 not found; ignoring
  1. Using Virtscreen: I tried using the Virtscreen app. Running the app showed:

enter image description here

Then clicking Enable Virtual Screen showed:

enter image description here

And Open Virtscreen showed the following error in the terminal:

❯ virtscreen
Could not initialize GLX
Aborted (core dumped)
  1. Checking monitor status: verified that xrandr --listmonitors shows the VIRTUAL1 output, but it wasn't activated for use.
❯ xrandr --listmonitors
Monitors: 2
0: +*eDP-1 1366/309x768/173+0+0  eDP-1
1: VIRTUAL1 1366/309x768/173+1366+0 

System Information:

❯ echo -e "System Information:\n" && lsb_release -a && echo -e "\nKernel Version:" && uname -r && echo -e "\nGraphics Info:" && lspci | grep -i vga && echo -e "\nDisplay Server Type:" && echo $XDG_SESSION_TYPE && echo -e "\nXrandr Version:" && xrandr --version && echo -e "\nInstalled Xorg Packages:" && dpkg -l | grep -i xorg && echo -e "\nDesktop Environment:" && echo $XDG_CURRENT_DESKTOP
System Information:

No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 24.04.2 LTS Release: 24.04 Codename: noble

Kernel Version: 6.11.0-17-generic

Graphics Info: 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02)

Display Server Type: x11

Xrandr Version: xrandr program version 1.5.2 Server reports RandR version 1.6

Installed Xorg Packages: ii python3-xkit 0.5.0ubuntu6 all library for the manipulation of xorg.conf files (Python 3) ii xorg 1:7.7+23ubuntu3 amd64 X.Org X Window System ii xorg-docs-core 1:1.7.1-1.2 all Core documentation for the X.org X Window System ii xorg-sgml-doctools 1:1.11-1.1 all Common tools for building X.Org SGML documentation ii xserver-xorg 1:7.7+23ubuntu3 amd64 X.Org X server ii xserver-xorg-core 2:21.1.12-1ubuntu1.1 amd64 Xorg X server - core server ii xserver-xorg-input-all 1:7.7+23ubuntu3 amd64 X.Org X server -- input driver metapackage ii xserver-xorg-input-libinput 1.4.0-1build1 amd64 X.Org X server -- libinput input driver ii xserver-xorg-input-wacom 1:1.2.0-1ubuntu2 amd64 X.Org X server -- Wacom input driver ii xserver-xorg-legacy 2:21.1.12-1ubuntu1.1 amd64 setuid root Xorg server wrapper ii xserver-xorg-video-all 1:7.7+23ubuntu3 amd64 X.Org X server -- output driver metapackage ii xserver-xorg-video-amdgpu 23.0.0-1build1 amd64 X.Org X server -- AMDGPU display driver ii xserver-xorg-video-ati 1:22.0.0-1build1 amd64 X.Org X server -- AMD/ATI display driver wrapper ii xserver-xorg-video-dummy 1:0.4.0-1build1 amd64 X.Org X server -- dummy display driver ii xserver-xorg-video-fbdev 1:0.5.0-2build2 amd64 X.Org X server -- fbdev display driver ii xserver-xorg-video-intel 2:2.99.917+git20210115-1build1 amd64 X.Org X server -- Intel i8xx, i9xx display driver ii xserver-xorg-video-nouveau 1:1.0.17-2build1 amd64 X.Org X server -- Nouveau display driver ii xserver-xorg-video-nvidia-550 550.120-0ubuntu0.24.04.1 amd64 NVIDIA binary Xorg driver ii xserver-xorg-video-qxl 0.1.6-1build1 amd64 X.Org X server -- QXL display driver ii xserver-xorg-video-radeon 1:22.0.0-1build1 amd64 X.Org X server -- AMD/ATI Radeon display driver ii xserver-xorg-video-vesa 1:2.6.0-1 amd64 X.Org X server -- VESA display driver ii xserver-xorg-video-vmware 1:13.4.0-1build1 amd64 X.Org X server -- VMware display driver

Desktop Environment: ubuntu:GNOME

After rebooting my system:

❯ xrandr --listmonitors
Monitors: 1
 0: +*eDP-1 1366/309x768/173+0+0  eDP-1

Any suggestions on resolving the Virtscreen error or any better way to use iPad as a 2nd monitor would be greatly appreciated.

raf
  • 579

1 Answers1

1

My present workaround for extending my Ubuntu screen on iPad with xrandr1,2 and x11vnc:

Expand and Connect

  1. Expand the main screen by setting a larger frame buffer and full panning.
    • My laptop screen is 1366×768, so I double the width horizontally:
    xrandr --fb 2732x768 --output eDP-1 --panning 2732x768+0+0/2732x768+0+0
    
  2. Adjust and limit tracking to the left half so the right half acts as an extended display.
    xrandr --fb 2732x768 --output eDP-1 --panning 1366x768+0+0/2732x768+0+0
    
  3. Start x11vnc to share the extended (right half) area:
    x11vnc -usepw -clip 1366x768+1366+0 -nocursorshape -nocursorpos -repeat
    
  4. Connect the iPad to the VNC server using a compatible app (currently testing with RealVNC).

Revert to Default

To reset the display:

  1. Kill any running x11vnc processes:
    pkill x11vnc
    
  2. Reset the screen:
    xrandr --output eDP-1 --auto --panning 0x0
    

Automate

To simplify switching between modes, I use this Fish function:

function toggle_screen
    set state_file /tmp/extended_screen
if test -f $state_file
    echo "Resetting screen and killing x11vnc..."
    # Kill any running x11vnc processes
    if pgrep x11vnc > /dev/null
        pkill x11vnc
    end
    # Reset the screen
    xrandr --output eDP-1 --auto --panning 0x0
    rm $state_file
else
    echo "Expanding screen and starting x11vnc..."
    # Expand the screen
    xrandr --fb 2732x768 --output eDP-1 --panning 2732x768+0+0/2732x768+0+0
    sleep 3
    # Limit tracking area
    xrandr --fb 2732x768 --output eDP-1 --panning 1366x768+0+0/2732x768+0+0
    # Start x11vnc
    x11vnc -usepw -clip 1366x768+1366+0 -nocursorshape -nocursorpos -repeat &
    touch $state_file
end

end


1 https://askubuntu.com/a/613361/947071
2 https://mikescodeoddities.blogspot.com/2015/04/android-tablet-as-second-ubuntu-screen.html

raf
  • 579