-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Using xrandr to create a virtual display (Linux) #42
Comments
I think this seems like a good idea! I was a bit amused when I saw the requirement for a Display Dummy Plug, but it kind of defeats the purpose as I'd have to unplug my actual monitor (and buy a dummy) to do that — was thinking that surely this should be doable in pure software, at least on Linux where we should be able to hack around with anything we want... I'll give this a try :) |
For dummy video drivers check: xvfb and xorg-video-dummy |
Hey everyone, I created a discussion thread for sharing knowledge on how to get rid from Display Dummy Plugs: https://github.com/pavlobu/deskreen/discussions/37#discussion-2016522 Feel free to comment there |
Let me guess, this does not work with Wayland? (as it's called xrandr?) |
Edit: I missed a crucial part of the cmd crisszkutnik gave, his solution works for me now and seems like the cleaner approach. I will leave the following here just so interested parties can follow the discussion. First, thanks for the tool itself and for the trick to use xrandr without a dummy plug.
I do get the following, as expected:
but deskreen does not show the newly created DVI-D-0.
This can then be shared with deskreen.
and |
You are missing the mode on the second command. It should be:
|
Thanks! |
Using Nvidia with proprietary drivers (I don't know about Nouveau), |
Does anyone know a way to use this with an amd graphics card |
is needed to have an free output to it works? here i cant use that to create a virtual screen |
Hey @crisszkutnik I don't have a virtual screen right now. I know using 20-intel.conf I can add it but that seems to be tearing up my screen. I tried using HDMI outputs but the screen stays black. Any suggestions? |
I need an free real display output? |
Pretending there is a second monitor with xrandr seems to work. The big issue is that neither the DE nor software that should be able to use it seems to be able to see it. For instance, on my system (linux, intel graphics) I can get the Unfortunately KDE plasma only partially sees it:
Most important Libreoffice does not see it at all:
Note that the last point would be quite useful to do presentations with microsoft teams, etc. on linux where you would like to share the virtual screen. Any clue? Do you really need a virtual HDMI adapter dongle? |
Thank you so much for this guide!
|
I used I use HP 250 G6 notebook |
Works perfectly <3 |
It was very easy to get it working, thanks! |
hello! I have a server and want to use my laptop as a display for it. This setup seems nice as i can just split-screen my display into two pieces. The only thing is that I don't want to use deskreen to extend my server display. I can get a VGA output from the server and plug it into the laptop, but the laptop refuses to acknowledge that the server is an input, not an output. Is there a way (using "xrandr" maybe), to tell the virtual second display to take input from my laptop's VGA plug? |
It didn't work with my PC lol.
The command above does generate a virtual display, but the display shared by deskreen is messy. @oetwis I have try his method, It doesn't work for my PC too. I think my hardware is too old. So it's more convenient for me to buy a graphics card deceiver directly. |
I haven't tried yet deskreen, but seeing here that
I actually used this with Sunshine (Moonlight), so it's working there, but the wrong resolution was detected by Sunshine / video compressor, so I still ended up with black bars when streaming to my iPad. |
Is it possible to create a virtual display output on a headless system? For example I'm trying to create a virtual display for qemu/kvm ubuntu 21.10 guest VM but since the VM does not have any display device at all |
wonderful works like magic! :) |
In case you don't have any disconnected outputs when you run If you're not an Ubuntu user and you don't have
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "Superuser privilege is required, try \"sudo !!\"" 2>&1
exit 1
fi
name=evdi
ver=1.14.1
cp -r . /usr/src/${name}-${ver}
dkms add -m ${name} -v ${ver}
dkms build -m ${name} -v ${ver}
dkms install -m ${name} -v ${ver}
echo -e "\nFinished."
to
to |
Similar to this post I could only make it work with a resolution that's exactly the same as that of my primary monitor. I set-up a small script to do this as:
So this always works no problem, but when I try to set a smaller resolution (e.g. Is this expected? Is there a workaround? |
This Does not work for me |
My xrandr output just shows two output modes, I don't have any free outputs, can I still add a virtual screen and connect it to my spare 10" android tablet ? Please help |
Hello @Elkellympia @tomchor Can you help me, it's urgent. Thanks and Regards, |
Hello @jakre1234 , i do not think so, i found this which may help you achieve that, but it depends on which gpu are you using (i think) , i do not know enough about xorg to help you in this |
This causes the amdgpu driver to crash for me:
|
I have the exact same problem, and my primary display's resolution (5120x1440) is the reason I'm trying to make this work. |
im getting the error xrandr: Configure crtc 1 failed when running the above commands |
Hello, I am using GNOME and Wayland on Ubuntu You can make a virtual display by creating a file in
And you will have a 1920x1080 and 1366x768 virtual monitor. If you want to disable the monitor, you can turn it off in the settings app. |
its working! 🎉 xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
# selected disconnected Screen, such as HDMI-1
xrandr --addmode HDMI-1 1920x1080_60.00
xrandr --output HDMI-1 --mode "1920x1080_60.00" --right-of eDP-1
xrandr
# see has * is runing.
# ...
# HDMI-1 disconnected 1920x1080+2880+0 (normal left inverted right x axis y axis) 0mm x 0mm
# 1920x1080_60.00 59.96*
# ...
# Off
xrandr --output HDMI-1 --off
# and use vnc server to use
x11vnc -forever -usepw -display :0 |
mark |
I HAVE THE SAME OUTPUT WHEN USING --ADDMODE. DID YOU FIND A SOLUTION? |
@SwirlyStone5877, try another output. for example, |
@absolutelynothelix, hi there. I am grateful for your response, but you were slightly too late. I've gotten a new PC, and everything works as intended out of the box. At least I know how to get things to work on my old PC now. Thank you! |
Creating a virtual display with xrandr that can be broadcasted as an extra monitor is fairly easy on Linux. I think that this method should be implemented as a guide as it is a viable method for Linux users without the need of extra drivers or a dummy plug. To achieve this I did the following:
First, run the following command:
xrandr
Command output
Here I selected one of the disconnected outputs. For this example I am going to use DVI-D-0
If there is no output mode, one can be added with
xrandr --addmode DVI-D-0 1920x1080 # you may use the output you selected and the resolution you want
Next step is to identify the display you are going to use to position your new display. For example, I want to place my virtual display to the left of my primary display, which is HDMI-A-0, so I run the following command:
Finally, when running deskreen:
The virtual display is available (Screen 2).
If you want to disconnect the display, just run:
xrandr --output DVI-D-0 --off
I am willing to do a complete guide and open a pull request if you think it is a good enough method.
The text was updated successfully, but these errors were encountered: