Score:0

No virtual display when using modesetting in Ubuntu 20.04(xrandr: Configure crtc 3 failed)

mo flag

I have two graphic cards in my laptop(os: Ubuntu 20.04).

$ lspci | grep VGA    
>> 00:02.0 VGA compatible controller: Intel Corporation UHD Graphics (rev 05)
>> 01:00.0 VGA compatible controller: NVIDIA Corporation Device 1f95 (rev a1)

I have enabled Nvidia prime in NVIDIA on-demand mode. enter image description here

The /etc/X11/xorg.conf file looks like this

section "Device"
    Identifier      "intel"
    Driver          "modesetting"
    BusID           "PCI:0:2:0"
EndSection

And I added 20-intel.conf in /usr/share/X11/xorg.conf.d/ with following contents.

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

After rebooting I ran the following commands

xrandr --addmode VIRTUAL1 1920x1080
xrandr --output VIRTUAL1 --mode 1920x1080 --left-of eDP1

After that I was able to create virtual display. But the graphics was fuzzy & videos in vlc wouldn't play or started lagging.

After changing the driver to modesetting in 20-intel.conf

Section "Device"
        Identifier "intelgpu0"
        Driver "modesetting"
        Option "VirtualHeads" "2"
        Option "TearFree" "true"
EndSection

The fuzzy graphics issue was solved. But I can't create the virtual display using the above xrandr commands I get the following error

xrandr: Configure crtc 3 failed.
Score:0
tm flag

currently I am trying to get the VIRTUAL1 Runnung as well and I think I found your answer: https://github.com/kbumsik/VirtScreen/issues/16

create: sudo vim /usr/share/X11/xorg.conf.d/30-virtscreen.conf with the content:

`# 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`

if you delete your 20-intel.conf you should be golden. CHEERS

Amit Dube avatar
mo flag
I've already tried this solution before posting this question here. This doesn't work for me. I get a black screen after ubuntu boots up.
blusser avatar
tm flag
I think this is because your default graficsdriver is modesetting. I had the same issue aswell. If you disable it, or plug in a HDMI cable and restart your displaymanager it changes to intel and nvidia and then i could use it
blusser avatar
tm flag
You can verivy this by booting without hdmi or vga plugged in, just your laptop and then enter `inxi -G` and compare the output with when it is plugged in. The folowing is a link to configuration with modesetting: I haven't tried it though. You could tell me if it worked, if you tried it. https://unix.stackexchange.com/questions/585069/unable-to-add-a-virtual-display-to-xorg/585078#585078
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.