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.
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.