Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VIRTUAL1 option not available (UBUNTU 17.10, X.org) #16

Open
AndreFvchs opened this issue Sep 11, 2018 · 55 comments
Open

VIRTUAL1 option not available (UBUNTU 17.10, X.org) #16

AndreFvchs opened this issue Sep 11, 2018 · 55 comments
Assignees
Labels
Resolved Resolved Issue xrandr Problems with adding/output modes with XRandR commands

Comments

@AndreFvchs
Copy link

AndreFvchs commented Sep 11, 2018

I would like to use VirtScreen to turn my iPad Mini 4 into a secondary monitor but the VIRTUAL1 option is not available to choose from.

Laptop Specs:

  • UBUNTU 17.10 - X.org NOT Wayland
  • Processor: Intel® Core™ i7-3520M CPU @ 2.90GHz × 4
  • Graphics: Intel® Ivybridge Mobile
  • GNOME: 3.26.2
  • 64-bit

Tablet Specs:

What I tried so far:

  • Rebooted the devices
  • Reinstalled the .deb package (version virtscreen_0.2.4-1_all.deb)
  • Reinstalled x11vnc (version 0.9.13-2)
  • Different settings, devices and VNC Clients/Viewer
  • It's the same issue on Android 8.1 and iOS 11.4.1 (only connect and mirror works)

I can connect and mirror my laptop screen to my iPad.
How to enable the VIRTUAL1 option to make it into a secondary monitor?

Any help is really appreciated. (Can anyone confirm that it works on Ubuntu 18.04.1?)

@kbumsik kbumsik self-assigned this Sep 11, 2018
@kbumsik kbumsik added the bug Something isn't working label Sep 11, 2018
@kbumsik
Copy link
Owner

kbumsik commented Sep 11, 2018

Thank you posting an issue here, and I'd like to help!
I think it is a bug of VirtScreen. I'd test it on Ubuntu 17.10 and see if VIRTUAL1 does not appear in my machine too (it might take a few days).

Firstly could you post a result of xrandr --verbose? It would help solving the issue. BTW, I also update the package to v0.2.5, so please check it out too.

@AndreFvchs
Copy link
Author

The result of xandr --verbose as requested:

Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS-1 connected primary 1366x768+0+0 (0x4b) normal (normal left inverted right x axis y axis) 277mm x 156mm
Identifier: 0x42
Timestamp: 525077
Subpixel: horizontal rgb
Gamma: 1.0:1.0:1.0
Brightness: 1.0
Clones:
CRTC: 0
CRTCs: 0 1 2
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
EDID:
00ffffffffffff0030e4d80200000000
00140103801c1078ead4e59559578b28
20505400000001010101010101010101
010101010101601d56d8500018303040
4700159c1000001b0000000000000000
00000000000000000000000000fe004c
4720446973706c61790a2020000000fe
004c503132355748322d534c42310084
scaling mode: Full aspect
supported: Full, Center, Full aspect
link-status: Good
supported: Good, Bad
1366x768 (0x4b) 75.200MHz +HSync -VSync *current +preferred
h: width 1366 start 1414 end 1478 total 1582 skew 0 clock 47.53KHz
v: height 768 start 772 end 779 total 792 clock 60.02Hz
1360x768 (0x4c) 84.750MHz -HSync +VSync
h: width 1360 start 1432 end 1568 total 1776 skew 0 clock 47.72KHz
v: height 768 start 771 end 781 total 798 clock 59.80Hz
1360x768 (0x4d) 72.000MHz +HSync -VSync
h: width 1360 start 1408 end 1440 total 1520 skew 0 clock 47.37KHz
v: height 768 start 771 end 781 total 790 clock 59.96Hz
1024x768 (0x4e) 133.475MHz -HSync +VSync DoubleScan
h: width 1024 start 1100 end 1212 total 1400 skew 0 clock 95.34KHz
v: height 768 start 768 end 770 total 794 clock 60.04Hz
1024x768 (0x4f) 65.000MHz -HSync -VSync
h: width 1024 start 1048 end 1184 total 1344 skew 0 clock 48.36KHz
v: height 768 start 771 end 777 total 806 clock 60.00Hz
960x720 (0x50) 117.000MHz -HSync +VSync DoubleScan
h: width 960 start 1024 end 1128 total 1300 skew 0 clock 90.00KHz
v: height 720 start 720 end 722 total 750 clock 60.00Hz
928x696 (0x51) 109.150MHz -HSync +VSync DoubleScan
h: width 928 start 976 end 1088 total 1264 skew 0 clock 86.35KHz
v: height 696 start 696 end 698 total 719 clock 60.05Hz
896x672 (0x52) 102.400MHz -HSync +VSync DoubleScan
h: width 896 start 960 end 1060 total 1224 skew 0 clock 83.66KHz
v: height 672 start 672 end 674 total 697 clock 60.01Hz
960x600 (0x53) 77.000MHz +HSync -VSync DoubleScan
h: width 960 start 984 end 1000 total 1040 skew 0 clock 74.04KHz
v: height 600 start 601 end 604 total 617 clock 60.00Hz
960x540 (0x54) 69.250MHz +HSync -VSync DoubleScan
h: width 960 start 984 end 1000 total 1040 skew 0 clock 66.59KHz
v: height 540 start 541 end 544 total 555 clock 59.99Hz
800x600 (0x55) 81.000MHz +HSync +VSync DoubleScan
h: width 800 start 832 end 928 total 1080 skew 0 clock 75.00KHz
v: height 600 start 600 end 602 total 625 clock 60.00Hz
800x600 (0x56) 40.000MHz +HSync +VSync
h: width 800 start 840 end 968 total 1056 skew 0 clock 37.88KHz
v: height 600 start 601 end 605 total 628 clock 60.32Hz
800x600 (0x57) 36.000MHz +HSync +VSync
h: width 800 start 824 end 896 total 1024 skew 0 clock 35.16KHz
v: height 600 start 601 end 603 total 625 clock 56.25Hz
840x525 (0x58) 73.125MHz -HSync +VSync DoubleScan
h: width 840 start 892 end 980 total 1120 skew 0 clock 65.29KHz
v: height 525 start 526 end 529 total 544 clock 60.01Hz
840x525 (0x59) 59.500MHz +HSync -VSync DoubleScan
h: width 840 start 864 end 880 total 920 skew 0 clock 64.67KHz
v: height 525 start 526 end 529 total 540 clock 59.88Hz
800x512 (0x5a) 51.562MHz +HSync +VSync DoubleScan
h: width 800 start 800 end 828 total 832 skew 0 clock 61.97KHz
v: height 512 start 512 end 514 total 515 clock 60.17Hz
700x525 (0x5b) 61.000MHz +HSync +VSync DoubleScan
h: width 700 start 744 end 820 total 940 skew 0 clock 64.89KHz
v: height 525 start 526 end 532 total 541 clock 59.98Hz
640x512 (0x5c) 54.000MHz +HSync +VSync DoubleScan
h: width 640 start 664 end 720 total 844 skew 0 clock 63.98KHz
v: height 512 start 512 end 514 total 533 clock 60.02Hz
720x450 (0x5d) 53.250MHz -HSync +VSync DoubleScan
h: width 720 start 760 end 836 total 952 skew 0 clock 55.93KHz
v: height 450 start 451 end 454 total 467 clock 59.89Hz
640x480 (0x5e) 54.000MHz +HSync +VSync DoubleScan
h: width 640 start 688 end 744 total 900 skew 0 clock 60.00KHz
v: height 480 start 480 end 482 total 500 clock 60.00Hz
640x480 (0x5f) 25.175MHz -HSync -VSync
h: width 640 start 656 end 752 total 800 skew 0 clock 31.47KHz
v: height 480 start 490 end 492 total 525 clock 59.94Hz
680x384 (0x60) 42.375MHz -HSync +VSync DoubleScan
h: width 680 start 716 end 784 total 888 skew 0 clock 47.72KHz
v: height 384 start 385 end 390 total 399 clock 59.80Hz
680x384 (0x61) 36.000MHz +HSync -VSync DoubleScan
h: width 680 start 704 end 720 total 760 skew 0 clock 47.37KHz
v: height 384 start 385 end 390 total 395 clock 59.96Hz
576x432 (0x62) 40.810MHz -HSync +VSync DoubleScan
h: width 576 start 608 end 668 total 760 skew 0 clock 53.70KHz
v: height 432 start 432 end 434 total 447 clock 60.06Hz
512x384 (0x63) 32.500MHz -HSync -VSync DoubleScan
h: width 512 start 524 end 592 total 672 skew 0 clock 48.36KHz
v: height 384 start 385 end 388 total 403 clock 60.00Hz
400x300 (0x64) 20.000MHz +HSync +VSync DoubleScan
h: width 400 start 420 end 484 total 528 skew 0 clock 37.88KHz
v: height 300 start 300 end 302 total 314 clock 60.32Hz
400x300 (0x65) 18.000MHz +HSync +VSync DoubleScan
h: width 400 start 412 end 448 total 512 skew 0 clock 35.16KHz
v: height 300 start 300 end 301 total 312 clock 56.34Hz
320x240 (0x66) 12.587MHz -HSync -VSync DoubleScan
h: width 320 start 328 end 376 total 400 skew 0 clock 31.47KHz
v: height 240 start 245 end 246 total 262 clock 60.05Hz
VGA-1 disconnected (normal left inverted right x axis y axis)
Identifier: 0x43
Timestamp: 525077
Subpixel: unknown
Clones:
CRTCs: 0 1 2
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
link-status: Good
supported: Good, Bad
HDMI-1 disconnected (normal left inverted right x axis y axis)
Identifier: 0x44
Timestamp: 525077
Subpixel: unknown
Clones:
CRTCs: 0 1 2
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
aspect ratio: Automatic
supported: Automatic, 4:3, 16:9
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
link-status: Good
supported: Good, Bad
DP-1 disconnected (normal left inverted right x axis y axis)
Identifier: 0x45
Timestamp: 525077
Subpixel: unknown
Clones:
CRTCs: 0 1 2
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
link-status: Good
supported: Good, Bad
HDMI-2 disconnected (normal left inverted right x axis y axis)
Identifier: 0x46
Timestamp: 525077
Subpixel: unknown
Clones:
CRTCs: 0 1 2
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
aspect ratio: Automatic
supported: Automatic, 4:3, 16:9
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
link-status: Good
supported: Good, Bad
HDMI-3 disconnected (normal left inverted right x axis y axis)
Identifier: 0x47
Timestamp: 525077
Subpixel: unknown
Clones:
CRTCs: 0 1 2
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
aspect ratio: Automatic
supported: Automatic, 4:3, 16:9
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
link-status: Good
supported: Good, Bad
DP-2 disconnected (normal left inverted right x axis y axis)
Identifier: 0x48
Timestamp: 525077
Subpixel: unknown
Clones:
CRTCs: 0 1 2
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
link-status: Good
supported: Good, Bad
DP-3 disconnected (normal left inverted right x axis y axis)
Identifier: 0x49
Timestamp: 525077
Subpixel: unknown
Clones:
CRTCs: 0 1 2
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
link-status: Good
supported: Good, Bad
1024x1368_virt (0x147) 118.250MHz -HSync +VSync
h: width 1024 start 1104 end 1208 total 1392 skew 0 clock 84.95KHz
v: height 1368 start 1371 end 1381 total 1418 clock 59.91Hz
1368x1024_virt (0x148) 115.500MHz -HSync +VSync
h: width 1368 start 1448 end 1592 total 1816 skew 0 clock 63.60KHz
v: height 1024 start 1027 end 1037 total 1063 clock 59.83Hz
1366x768_virt (0x158) 85.250MHz -HSync +VSync
h: width 1368 start 1440 end 1576 total 1784 skew 0 clock 47.79KHz
v: height 768 start 771 end 781 total 798 clock 59.88Hz

@kbumsik
Copy link
Owner

kbumsik commented Sep 12, 2018

It looks like VIRTUAL* is not enabled by default on old X11. According to the Arch Linux Wiki you can enable VIRTUAL* by adding the following configuration for X11:

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

Copy/paste the above code in /etc/X11/xorg.conf.d/20-intel.conf or /usr/share/X11/xorg.conf.d/20-intel.conf, and then reboot the system. This tells the Intel driver to create one virtual display, VIRTUAL1. You can change the number "1" in Option "VirtualHeads" "1" to any number to create VIRTUAL1, VIRTUAL2, ... and VIRTUALn (which is unnecessary for VirtScreen use case),

@AndreFvchs
Copy link
Author

That fixed the issue for me, thank you.
For those who need to add this fix as well:

  1. You need root access to create 20-intel.conf
  2. You need gsku - Open the terminal and run sudo apt install gksu
  3. Follow this steps to get root access: https://askubuntu.com/a/6968/780219
  4. Navigate to the folder an paste the file 20-intel.conf

@AndreFvchs
Copy link
Author

You can change the number "1" in Option "VirtualHeads" "1" to any number to create VIRTUAL1, VIRTUAL2, ... and VIRTUALn (which is unnecessary for VirtScreen use case),

That is interesting. Would it be possible to create multiple monitors (e.g. 1 iPad Pro + 1 iPad Mini 4) with VirtScreen instead of one?

@kbumsik
Copy link
Owner

kbumsik commented Sep 12, 2018

That's great you solved the problem :)

@AndreFvchs VirtScreen currently grabs only one virtual display at a time. I personally haven't tested yet but it sounds theoretically possible to add that feature.

But due to some design challenges (e.g. how to design a GUI for users to easily setup multiple resolutions/rotations in such a small VirtScreen app window?), this feature is not a goal of this project for now. I might consider that if VirtScreen gets a stable version in the future.

FYI, VirtScreen merely is a GUI app that generates xrandr and x11vnc terminal commands for user convenience. So if you want to create multiple virtual screens now you may call those commands manually.

@AndreFvchs
Copy link
Author

Thanks for the explanation. Do I understand correctly that it would currently be possible to run VIRTUAL1 from the GUI app and spin up a second secondary monitor VIRTUAL2 from the command line?

@kbumsik
Copy link
Owner

kbumsik commented Sep 15, 2018

Yes you can mix them togather.
Oh...I got an idea. It is a bit crazy but you can actually start TWO VirtScreen and set the, for each VIRTUAL*. You have to set up different VNC ports though.

@AndreFvchs
Copy link
Author

Yes you can mix them togather.
Oh...I got an idea. It is a bit crazy but you can actually start TWO VirtScreen and set the, for each VIRTUAL*. You have to set up different VNC ports though.

Sounds great, could you please post an example on what do I need to change or run to archive that. Thank you

@kbumsik kbumsik added good first issue xrandr Problems with adding/output modes with XRandR commands Resolved Resolved Issue and removed bug Something isn't working good first issue labels Sep 22, 2018
@kbumsik
Copy link
Owner

kbumsik commented Sep 24, 2018

I added how to do it in #17.

@Homio
Copy link

Homio commented Nov 17, 2018

It looks like VIRTUAL* is not enabled by default on old X11. According to the Arch Linux Wiki you can enable VIRTUAL* by adding the following configuration for X11:

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

Copy/paste the above code in /etc/X11/xorg.conf.d/20-intel.conf or /usr/share/X11/xorg.conf.d/20-intel.conf, and then reboot the system. This tells the Intel driver to create one virtual display, VIRTUAL1. You can change the number "1" in Option "VirtualHeads" "1" to any number to create VIRTUAL1, VIRTUAL2, ... and VIRTUALn (which is unnecessary for VirtScreen use case),

I have met the same thing. My system is Ubuntu 18.04.
When I press the ENABLE VIRTUAL SCREEN, It shown that: No virtual screen name found.
I find that there is no 20-intel.conf under this folder /usr/share/X11/xorg.conf.d
There are 7 files in this folder:

10-amdgpu.conf 10-quirks.conf 11-nvidia-prime.conf 70-wacom.conf
10-nvidia.conf 10-radeon.conf 40-libinput.conf

I have try to attach the configuration in the 10-nvidia.conf, but the system can't start normally. (when I typed the password and pressed the ENTER, It came back to the start page)
And I also try to create this file (20-intel.conf), but it just the same to above.
Now I just can have a copy of the primary screen on my iPad, not the external.

@kbumsik
Copy link
Owner

kbumsik commented Nov 17, 2018

@Homio I think those problem is caused by Xorg used by Ubuntu that cannot automatically detect gpu devices. Could you tell me the following?:

  1. Are you using a desktop or a laptop?
  2. If you are using a desktop, did you enable "IGD Multi-Monitor" or similar things in BIOS?
  3. The output of lspci (Please use https://pastebin.com/)
  4. The output of ~/.local/share/xorg/Xorg.0.log or /var/log/Xorg.0.log (Please use https://pastebin.com/ as well)

@Homio
Copy link

Homio commented Nov 18, 2018

@kbumsik
1, I use a laptop.
Laptop Specs:

  • Dell Inspiron14R - 5437
  • Processor: Intel® Core™ i5-4200U CPU @ 1.60GHz × 4
  • Graphics: GeForce GT 750M/PCIe/SSE2
  • GNOME: 3.28.2
  • 64-bit
  • Ubuntu 18.04.1 LTS
    Tablet Specs:
  • iPad 2018
  • iOS 12.1
  • VNC Viewer app by RealVNC (https://www.realvnc.com/en/connect/download/viewer/ios/) version:3.6.0.038985

2, Because I use a laptop, I can't find the IGD tap in the BIOS.

3, result:https://pastebin.com/pgAYQB2T

4, result: https://pastebin.com/WSYkeDy3 and https://pastebin.com/Vc9Mj2cC (I did't know if I get a right file.)
screenshot from 2018-11-18 10-40-59

@kbumsik
Copy link
Owner

kbumsik commented Nov 18, 2018

@Homio Thank you for your valuable information. Alright, I did some research to figure it out. Here is your new /usr/share/X11/xorg.conf.d/30-virtscreen.conf

# 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"
	# You may put Option "VirtualHeads" "1" here but it seem you don't need to put this for Ubuntu 18.04.
EndSection

Could you copy can paste this and try it? Please tell me if it works.

@Homio
Copy link

Homio commented Nov 18, 2018

@kbumsik
Thanks very much for the new configuration. The VIRTUAL screen was definitely appeared in the "VirtScreen". But I can't still achieve to expand the screen (The 1st and 2nd screen are all in the iPad, and the mouse can't move to the 2nd screen).
image
image
vid_20181118_144829_1

@kbumsik
Copy link
Owner

kbumsik commented Nov 18, 2018

@Homio Firstly the mouse pointer problem is discussed in #19: Use Screens 4 app for VNC or manually build and install the latest x11vnc.
The two screens problem is totally unexpected and should be considered as bug. Could you do the following:

  1. Run rm -rf ~/.config/virtscreen to reset VirtScreen configuration
  2. Set VIRTUAL1 as device and try it again.
  3. If it still has the problem, could you post the result of xrandr?

@Homio
Copy link

Homio commented Nov 18, 2018

@kbumsik
I’m so sorry that I didn't succeed in updating the x11vnc into the last version, (It seems so hard.) and the Screens 4 seems not free. My problem is that I can't move the mouse pointer into the second screen.

The result of xrandr: https://pastebin.com/CvfdiXT6

@tobyclh
Copy link

tobyclh commented Nov 23, 2018

Hello, I am having a similar problem, only that I run this on an AMD cpu with no internal graphics, and external Nvidia GPU, so the intel driver solution doesn't really help.
Any idea?
(if you think I should open another issue please let me know)

@Homio
Copy link

Homio commented Nov 25, 2018

@tobyclh Sorry, I really have no idea. And I have given up it. My system is changed into CentOS, and I do not ready to use this tool recently.

@kbumsik
Copy link
Owner

kbumsik commented Nov 25, 2018

@tobyclh AMD cpu is totally different story. Could you post a new issue for that case?

@kbumsik
Copy link
Owner

kbumsik commented Nov 25, 2018

@Homio I'm sorry to hear that. I'm looking at your xrandr result it I cannot see any problem with my system. I think I need to implement a better bug report tool to deal with the problems much easier. Thanks for you data anyway.

@seffs
Copy link

seffs commented Jun 12, 2020

Found solution for NVIDIA/Intel systems. See above

@MarcoEddizzo83
Copy link

MarcoEddizzo83 commented Jun 25, 2020

Hi. I'd find kind of solution to create ad use a Virtual Display on AMD/ATI based Pc - Graphic Card. Spent almost a week to figure it out. Writing the procedure above, hope to be usefull for somebody.
Following the characteristics of my pc for reference:
-system 80XS (LENOVO_MT_80XS_BU_idea_FM_idea
-processor AMD A12-9720P RADEON R7, 12 COMPUTE
-display Wani [Radeon R5/R6/R7 Graphics]
-display Topaz XT [Radeon R7 M260/M265 / M340
-generic Carrizo Platform Security Processor
-OS Ubuntu 18.04 LTS - Kernel 5.3.0.59 Generic
After a quite of research I discover I've been mounted a graphic card "AMD Radeon 530 Mobile Graphics" 2 graphic card 1 virtual 1 dedicated (wani-Topaz). Is not supported by AMD to any AMDGPUPRO Upgrade.
As driver I run Open Source AMDGPU only (radeon disabled). My PC has only 1 HDMI Out, no compatibility with any DirectLink external graphic card (I tried 165 Usb-Vga, doesn't work at all. Not tried earlier card).
By the way, I discover that AMD release a patch in 2007 that make possible to enable a virtual display using AMDGPU driver. To check if your system have the udpdated driver installed, check the following path:
/sys/module/amdgpu/parameters
Inside this path should be a file named "virtual_display". If is present, is it possible to enable virtual display.
Open a terminal and verify the address of the PCI card:
lspci | grep -E 'VGA|Display|3D'
Should be the one highlighted in red "DISPLAY". The address is at the beginning of the line (example for me: 30:00.0). Copy and paste in notepad file this value and write down in this way: 0000:30:00.0
Next step is to enable the virtual display using a modbprobe.b conf file. Open a terminal and type:
sudo nano /etc/modprobe.d/amdgpu.conf
A new file should be open. Enabling a virtual display for the modprobe during the boot should be link at the PCI card. Inside the file write:
options amdgpu virtual_display=0000:03:00.0,1
For me the graphic card was 0000:03:00.0. Your value would be the output of the command lspci | grep -E 'VGA|Display|3D' with 0000 placed in front (the same value that you would have wrote in the notepad document). Please note the comma and the number following the comma (1 in my case). This is the number of virtual display that will be created by the modprobe. In this way you would create a virtual display on amdgpu driver. Save the file (CTRL+O) and close (CTRL+X). Than reboot your system.
At restart, after the login, if everything went right, open the Display settings and you would be able to see the additional diplay. Another check should be done by typing in terminal windows
xrandr
You should find a line like this:
Virtual-1-0 connected (normal left inverted right x axis y axis)
Good, the virtual display has been enabled created.
At this time I wasn't be able to run it by VirtualScreen.appimage. But I successfully run it by X11vnc using a raspberry PI linked to my TV as VNC viewer.
Cause I've already 1 additional monitor linket to my HDMI, I bought a Raspberry PI zero to use as a client for VNC viewer to use another monitor mounted on top of my actual PC (would be the third). When X11vnc is used is it necessary to set the Geometry of the monitor that would be show on the VNC viewer. By virtual display and X11vnc is easy using the command
x11vnc -clip xinerama0
Change the value of "0" to change the display (teorically speaking).
Now I just waiting to receive the raspberry Pi 0 to test it with the third monitor.

I'm adding some link for reference:
AMDGPU Patch argument
Amdgpu Patch reference
Kernel module Modprobe
Linux kernel documentation for AMDGPU
X11vnc guide
X11vnc commands

NOTE: if something go wrong after the reboot and you have a Black Screen or unable to see or login your account, reboot and run ubuntu in recovery mode. Select "Run a shell with priviledge" and remove the "amdgpu.conf" file by typing in the terminal
rm /etc/modeprobe.d/amdgpu.conf
Than reboot and you should be able to access again to ubuntu GUI.
If this happen, something goes wrong with some settings...

@gsepulvedak
Copy link

Well done @MarcoEddizzo83! I succeeded following your post.
I had to change the created virtual output's name in .config/virtscreen/config.json in order to run virtscreen from the command line (the GUI crashes when opening). But from the terminal it works perfectly.
Thanks a lot for your great post!

@orsett0
Copy link

orsett0 commented Sep 9, 2020

Hi, i'm having a similar problem, only that i'm using an AMD APU whit amdgpu
I tried to follow the solution posted by @MarcoEddizzo83 but after a reboot the PC get stuck at HP logo (after the GRUB) and I can access the system only using ssh
Searching on internet, I figured out that virtual_display option disables physical output, as indicated in this discussion, but based on the post of @MarcoEddizzo83 and @gsepulvedak, I understand that there's a way to make virtual and physical output coexist.
Can anyone tell me how to do it?
(Let me know if I should open another issue, and... sorry if my english is not among the best :/)

@gsepulvedak
Copy link

Hi @alessiorsini. I just did what @MarcoEddizzo83 described, are you sure you didn't miss any step? As a summary, what I did was:

  • Check if /sys/module/amdgpu/parameters/virtual_display exists.
  • Get the address of the pci card using lspci | grep -E 'VGA|Display|3D' (in my case, it was 01:00.0)
  • Open /etc/modprobe.d/amdgpu.conf and add this line: options amdgpu virtual_display=0000:01:00.0,1

That's it. Hope it helps!

@zhado
Copy link

zhado commented Sep 24, 2020

I tried following @MarcoEddizzo83 's instructions on my Lenovo V155-15API laptop with AMD Ryzen 3 3200U CPU/GPU (it only has integrated graphics) and the screen froze at boot. At first I thought the kernel was crashing but the logs were "clean" so I tried ssh-ing and it worked like normal. So I think that 'virtual_display' option disables physical outputs just like @alessiorsini said. I'm sure I didn't miss any step because the when ssh-ed in the amdgpu was loaded normally and also the parameter was set in /sys/module/amdgpu/parameters/virtual_display like it should be.

Additional info: I'm running Arch Linux x86_64 with 5.8.10-zen1-1-zen kernel.

@aquatic7
Copy link

aquatic7 commented Oct 1, 2020

Would love a solution for amd gpu's too.
I followed @MarcoEddizzo83 steps too but got a black screen when booting and had to rm /etc/modeprobe.d/amdgpu.conf
;(

@zhado
Copy link

zhado commented Oct 1, 2020

@aquatic7 Got virtual outputs working by using this, but if you load the module before Xorg/X, X segfaults. Also there was some flickering and tearing.

@420coupe
Copy link

never mind I made it work doing the same as #16 (comment)

Can you elaborate how you were able to make it work, if i use those configs it destroys my main display distorting it.

can explain in spanish if needed.

@kavin1002
Copy link

kavin1002 commented Dec 28, 2020

hai I'm using HP Pavillion laptop
intel i5 4th gen processor
my display driver is AMD Radeon
Ubuntu OS I'm not getting the VIRTUAL 1
could u please explain to me in detail how to do it I'm a newbie so please could u @kbumsik

@ductm208
Copy link

ductm208 commented Mar 1, 2021

@aquatic7 Got virtual outputs working by using this, but if you load the module before Xorg/X, X segfaults. Also there was some flickering and tearing.

I also having the issue of screen tearing if enabling virtual screen for intel driver. It not related to virtscreen, only xorg does not function well. Are you able to fix this issue?

@HenzelMoras
Copy link

@aquatic7 Got virtual outputs working by using this, but if you load the module before Xorg/X, X segfaults. Also there was some flickering and tearing.

I also having the issue of screen tearing if enabling virtual screen for intel driver. It not related to virtscreen, only xorg does not function well. Are you able to fix this issue?

where u able to find a solution ?

@ductm208
Copy link

ductm208 commented Mar 3, 2021

@aquatic7 Got virtual outputs working by using this, but if you load the module before Xorg/X, X segfaults. Also there was some flickering and tearing.

I also having the issue of screen tearing if enabling virtual screen for intel driver. It not related to virtscreen, only xorg does not function well. Are you able to fix this issue?

where u able to find a solution ?

Not yet buddy, my Lenovo P1 Gen 3 have dual cards (nvidia T1000 and Intel Mesa enabled). Nvidia does not work with virtual screen (30xxx.conf) (and I actually dont care because I use machine for coding), intel works (20xxx.conf, drag and drop is perfect across devices) but screen shows fuzzy colors.

@YaoLiMuMu
Copy link

@MarcoEddizzo83 I have done as you step, but after reboot I have a Black Screen or unable to see or login your account, have any other resolve?

@HenzelMoras
Copy link

@MarcoEddizzo83 I have done as you step, but after reboot I have a Black Screen or unable to see or login your account, have any other resolve?

no solution atm better

@0140454
Copy link

0140454 commented Jun 21, 2021

The following is a way used by me in AMD system.

Edit 1: I deleted sentence about lag and cursor shining. After I changed VNC settings, it becomes better.
Edit 2: Compared with x11vnc, tigervnc's x0vncserver performs better than it in my system.

The following is my environment for reference.

  • Hardware
    • CPU: AMD Ryzen 5 3600
    • GPU: AMD Radeon RX 570
  • Software
    • Arch Linux
    • KDE Plasma 5.22 / X11
    • evdi

I follow steps mentioned these two article:

  1. Install evdi
    yay -S evdi
    
  2. Create a virtual monitor
    sudo modprobe evdi initial_device_count=1
    

    You can see new provider in the output of xrandr --listproviders

  3. Connect virtual provider to main provider
    xrandr --setprovideroutputsource 1 0
    
  4. Make virtual port be connected
    echo on | sudo tee /sys/kernel/debug/dri/1/DVI-I-1/force
    

    Note that the number after dri is virtual provider number, and next is virtual port name

    By the way, I think this step is not necessary if your virtual port has been connected automatically after step three.
    I just use this method to make it be connected forcibly since the virtual port is always disconnected in my system.

  5. Add mode you want to use
    xrandr --addmode DVI-I-1-1 1920x1080
    
  6. Enable virtual port
    xrandr --output DVI-I-1-1 --mode 1920x1080 --right-of HDMI-A-0
    
  7. Use VNC to show it

@YaoLiMuMu
Copy link

@0140454 it doesn't work on Ubuntu 20

@0140454
Copy link

0140454 commented Jun 27, 2021

Sadly to hear that. Maybe there is something needed to be setup on Ubuntu. But I cannot diagnose that since I don't use Ubuntu now.

@anir92
Copy link

anir92 commented Sep 29, 2021

Hi @0140454
I have been able to follow till step 6. A virtual display has been created. But I didn't understand step 7. How to ultimately use my iPad from here ? Please let me know.

N.B- When I open the "virtscreen", I still can't start the VNC server, because it says no virtual screen selected. However, a virtual display has been created, that I can see from my Ubuntu System app, under option "displays".

Screenshot from 2021-09-29 10-59-02
Screenshot from 2021-09-29 10-59-15
Screenshot from 2021-09-29 11-03-05
.

@0140454
Copy link

0140454 commented Sep 30, 2021

Hi @0140454 I have been able to follow till step 6. A virtual display has been created. But I didn't understand step 7. How to ultimately use my iPad from here ? Please let me know.

N.B- When I open the "virtscreen", I still can't start the VNC server, because it says no virtual screen selected. However, a virtual display has been created, that I can see from my Ubuntu System app, under option "displays".

...

Hi @anir92
I start VNC server via command line as the following, not "virtscreen".

x0vncserver -Geometry=1920x1080+0+0 ...(Any arguments you want to use)

@anir92
Copy link

anir92 commented Sep 30, 2021

x0vncserver -Geometry=1920x1080+0+0 ...(Any arguments you want to use)

Hi, from where can I get x0vncserver ? I am using Ubuntu 20.04. x0vncserver is not available in apt repository.

@0140454
Copy link

0140454 commented Oct 1, 2021

I think x0vncserver is not required. You can use any VNC server, which is available in Ubuntu apt repository. Just remember to modify command line argument according to its manual.

@horror-vacui
Copy link

Hi @anir92 I start VNC server via command line as the following, not "virtscreen".

x0vncserver -Geometry=1920x1080+0+0 ...(Any arguments you want to use)

I face the same issue what @anir92. The created DVI-I-1 screen is grayed out in the drop-down menu in virtscreen, and starting the vnc server from the command line also tells me, that this screen is not available:

x0vncserver -Geometry=1920x1080+0+0 -rfbauth ~/.vnc/passwd -display "DVI-I-1-1"                                                                                                                   
x0vncserver: unable to open display "DVI-I-1-1"

If I do not define this display, then the VNC server will connect one of my monitors. (for testing I use my dual monitor setup)

@pinkpigeonltd
Copy link

pinkpigeonltd commented Jan 6, 2022

Linux Mint 20.2, Intel HD 520, Kernel 5.4.0-92 here

I am trying to follow the instructions here:

Using a virtual output

Some drivers, like the old "intel" driver, support virtual displays. In this case, create at-least one virtual display in xorg

/etc/X11/xorg.conf.d/20-intel.conf

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

The name of the output will normally be VIRTUAL1 (you can check with xrandr without any argument). The virtual display can then be activated using.

$ xrandr --output VIRTUAL1 --mode

I can see VIRTUAL1 when running 'xrandr', however, in the display manager, or other tools it's not shown. Xrandr shows it as 'disconnected'.

I tried 'connecting' it by running xrandr --output VIRTUAL1 --mode<resolution>, but it just says 'cannot find mode'. How do I add a mode to a virtual display?

Edit: I tried adding a mode by using xrandr --addmode VIRTUAL1 1920x1080 and then ```xrandr --output VIRTUAL1 --mode 1920x1080 --right-of eDP1``

But this just corrupts my screen and crashes Cinnamon.

@Mr-MubelBubel
Copy link

Mr-MubelBubel commented Apr 16, 2022

Hi, I can't see any "VIRTUAL 1". I've tried a lot of things and I can't get any result.
I work with a Debian system and I have no idea what I can do that it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolved Resolved Issue xrandr Problems with adding/output modes with XRandR commands
Projects
None yet
Development

No branches or pull requests