I have got a widescreen monitor and need to share may screen alot during meetings. I can usually share the whole screen or just one application. since I need to use multiple programs I usually have to share the whole screen. this creates two problems:
not everybody has a widescreen monitor, hence my shared screen has to fit their screens and it scales down
I don’t want them to see everything, because it is a distraction from the content and there is always secret stuff.
current solution: I use OBS Studio and share my screen via a virtual camera and define a small frame to share.
problem: modern laptops are incredible thin and incredible noisy under load. and it is just feels like a bad solution.
idea: I want to create a virtual monitor/screen/display that overlaps with 2/3 of the widescreen. during meetings I want to share that virtual screen.
what did I do: I tried to use xrandr to set up a monitor that overlaps with 2/3 of the widescreen:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 43 ()
Value in failed request: 0x359
Serial number of failed request: 41
Current serial number in output stream: 42
is my solution even feasible? if so: how do I set up the virtual monitor?
I am using Manjaro KDE, I don’t hav a dedicated gpu, just intel graphics. the widescreen is connected via hdmi since it does not recognize the dp.
xrandr is used as a software solution to adjust the graphics output to a monitor, ex resolution, brightness, color correction, etc. It’s not a program for a virtual display.
Something like a VM will do the job; the window for a VM is the virtual display. But VM is more resource consuming than OBS for your case.
I know only Snowmix and OBS for live video streaming, with OBS the most popular one. So your best choice is to use OBS.
There are several laptop categories, like gaming laptop, content creator laptop, thin laptop, etc. And you have the wrong laptop spec; you probably have a thin laptop for simple everyday use.
Depending on the OEM website, you can search for a content creator (video editing, streaming, photography, graphic design, animation, or such similar terms) laptop. So this will be your lesson the next time you buy a laptop.
thx for the (rather unsatisfying) answer. in my defense: the laptop came first and the widescreen second and I might not have thought this through entirely.
there are people who split their monitor into two. effectively that means the first screen is resized and a second, virtual one is created. I want to do nearly the same thing except the first one is not resized, so the two overlap. what do I not understand?
and in both cases you have to give the width in pixels but also in mm as also the height in pixels and mm … plus you give the offset to the second virtual monitor … then you set or refresh the framebuffer to real resolution so you can see now both virtual monitors
xrandr --fb 3440x1440
In principle all this could be done with one script, lets call it virtmon, placed in ~/.local/bin/ and set as executable, with this content in it:
after trying to deactivate the virtual monitors, but actually activating the laptop screen I got:
~/.local/bin sh virtmon
virtmon: line 2: [: missing »]«
I ran, because the widescreen is connected via hdmi:
xrandr --output HDMI-1 --auto
it did not work, so I tried:
xrandr --output DP1 --auto
which did work, but messed up the screen resolution entirely.
Ok, so setting up the virtual monitor works, but deactivating it does not. I am quiet happy, but only half way there. can you help me with the rest please? I don’t see where a “]” could be missing. can this even be the reason for the deactivation not working?
You probably need to set the framebuffer size again, you may also need to reset the position of one or both monitors. I tried the method earlier and I had to do both (one screen was +13 in y instead of +0).
xrandr --fb 5360x1440 # I think that's right for your setup
Try specifying the resolution instead of auto and it’s called DP1 even if it is connected by HDMI.
I can’t see a missing ] either, but you’ve specified zsh and than ran it using sh. Try using bash, or sh as it was written.
Does this work on your widescreen? No display anomalies? The height is 1440 px, the same as the widescreen native height. But the width here is 3440 + 2293 = 5733, which is larger than the widescreen native width 3440. This doesn’t seem right. If you want to split your screen width to 2:1 ratio, then it should be 2293 and 1147:
Take xrandr --fb 5360x1440 for example, this will set the entire display to 5360x1440. Your laptop native resolution is 1920x1080, which is smaller than 5360x1440 and you will get blank screen. xrandr --output eDP1 --auto adjusts the proper settings including resolution for your laptop screen, so that’s why your laptop screen worked fine again.
But then again, do you really want to split your widescreen to 2:1 ratio? The 1/3 part 1147/267x1440/330 may not look nice. Maybe it’s better for you to extend your screen, not duplicating; so your personal work is on the widescreen and you can screen share your laptop screen with your work stuffs.
There should be a space before it. I should’ve got that straight away.
Yes, imagine a bounding box around all monitors, that’s the framebuffer, +0+0 is the top left corner. Why do you want the monitors like that? They should be next to each other without spaces. Empty space still has to be moved through. You’ll be blocked from moving to the laptop screen at the top of the widescreen, and blocked from moving to the widescreen from the bottom of the laptop screen.
I’m not sure virtual screens are what you’re looking for, but I’ve only just starting playing with them.
if [ -z "$(xrandr --listactivemonitors | grep 'DP1-1')"]; then
xrandr --output eDP1 --pos 3440x0
xrandr --output DP1 --0x0
xrandr --setmonitor DP1-1 3440/797x1440/333+0+0 DP1
xrandr --setmonitor DP1-2 2293/531x1440/330+0+0 none
xrandr --fb 5360x1440 # This should only need to be run once, since we're not changing fb size again
xrandr --delmonitor DP1-1
xrandr --delmonitor DP1-2
xrandr --output eDP1 --pos 3440x0
xrandr --output DP1 --0x0
I changed the odd places of the monitors, but left the gap between them since in KDE windows cast a shadow and it looks strange when they appear on the other screen. I also adjusted the DP1-2 to exclude the task bar. my sharing experience is now terrific.