3

Threads/websites I searched but didn't fully help me

Context

I have a screen with a 5120x1440px screen resolution. I want to split this monitor into two virtual screens, so that I can work with this monitor as if it were a dual monitor set-up. I also want to quickly switch back to only be using one screen, so I wanted to do all this in a bash script, but this doesn't matter at the moment.

The output of xrandr is the following

Screen 0: minimum 8 x 8, current 5120 x 1440, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 connected primary 5120x1440+0+0 (normal left inverted right x axis y axis) 1mm x 1mm
   3840x1080    119.97 +  99.96    59.97  
   5120x1440    119.97*  100.00    59.98  
   2560x1440     59.95  
   2560x1080    119.88   100.00    60.00    59.94  
   1920x1080    119.88   100.00    60.00    59.94  
   1680x1050     59.95  
   1600x900      60.00  
   1440x900      59.89  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   640x480       75.00    72.81    59.94  
DP-5 disconnected (normal left inverted right x axis y axis)
USB-C-0 disconnected (normal left inverted right x axis y axis)

Implementation

Following the tutorials and posts I found, This is what I would need to do

xrandr --setmonitor VIRTUAL-LEFT 2560/0x1440/1+0+0 DP-4
xrandr --setmonitor VIRTUAL-RIGHT 2560/1x1440/1+2560+0 none 

To explain the numbers

  • VIRTUAL-LEFT
    • 2560 because that's half of 5120
    • 0 because in the examples, the axis (1mm in my case) is divided by 2 and the left display gets the rounded down number
    • 1440 because that's my screen height
    • 1 because in the examples, the other axis (also 1mm in my case) is used as is
    • 0+0 because that's the same as in the xrandr output
    • DP-4 because that's the connected primary
  • VIRTUAL-Right
    • 2560 because see above
    • 1 because see above although this takes the rounded up number
    • 1440 because see above
    • 1 because see above
    • 2560+0because that will be the offset from left and is used in the examples
    • none cause that's how it's done in EVERY example

Since I don't get a change, I do as suggested in the examples

xrandr --fb 5120x1441
xrandr --fb 5120x1440

Expected result

I would now expect, to have two virtual screens with a ready to go desktop.

Actual result

The screens are cut in half, the left screen has my current desktop, but the right screen is entirely black, however, I can move my mouse over, but I cannot configure it, I cannot see it in displays, I can't do anything with it

example


What is the solution here?

4
  • 2
    Probably xrandr has done the job correctly. I assume this because you mention that you can move your mouse over to the 2nd virtual screen. Can you also drag a window there? But perhaps your window manager cannot handle the 2nd virtual screen. What window manager or desktop environment do you use? By the way nice screen; in my opinion, what you really need for it is a tiling WM, not to be virtually splitted!
    – Krackout
    Aug 22 '20 at 15:40
  • Oh my god, sorry. I haven't been active on this page, because I switched back to Windows for gaming since many games had problems on Linux with that resolution. I'll try dragging the window tonight. My window manger is xfwm, I'm using xfce (maybe gnome would be able to handle this?) Thanks for the props for the screen, it's a Samsung C49RG94SSU. Tiling works, but what I wanted to achieve is that I have the left side for a video game (full screen) and the right side for other, so to use this monitor as 2 separate monitors. For windows there is shiftwindow to achieve that, but for linux? Aug 25 '20 at 7:30
  • The monitor has a PBP mode where you can have multiple sources and it splits the monitor itself (e.g. left half is pc, right half is laptop) I need that functionality for a single video input. I doubt a "splitter" would work, right? So that I have a Display port cable, that splits into two and then connect two of those cables, since they will just get the same signals anyway. Aug 25 '20 at 7:33
  • I can confirm that your posted commands work perfectly in i3 as well. Nov 28 '20 at 18:30
1

Taking into account the comments, I'd suggest DWM (a dynamic/tiling window manger) with fake full screen patch. This patch allows apps to "fullscreen" into space currently given to them, a window or half screen or whatever. It would be ideal for your scenario, half screen for gaming (faked full) and the rest for other apps. Though using a WM instead of DE (desktop environment like xfce, gnome, etc) is a more advanced setup.

Have in mind that in Linux you can start two X servers concurrently with different managers/environments. One can be xfce, your current setup, the other DWM. You can switch between them using ctrl + alt + F1 - F12 to switch between them.

Regarding the PBP feature of your monitor, you can use two outputs from the same PC: I suppose you have more than one output on your graphics controller, for example, a DisplayPort and HDMI or VGA. So you can connect both DisplayPort & HDMI and act as if your PC is connected to two screens. So if your PC has two outputs (most likely) you just need a separate cable, of the proper type of course.

1
  • 1
    Hi. So I just connected another DP cable to my video card (RTX2080 Ti) and it just works out of the box on both Windows AND Linux with the PBP feature enabled without any extra software. Thanks for pointing me in the right direction! :) Aug 26 '20 at 11:44
0

So I'm trying to achieve similar on ubuntu 20.04, same display (Samsung CRG9), Intel's inbuilt graphics - whatever that might be on a Core i7-9700. The mainboard has DP1.4, HDMI2.0 and DVI outputs. I'm running two cables - DP and HDMI and the setup almost works, except the following:

  1. night light settings only affect the DP share of the screen, the HDMI share doesn't seem to care
  2. when the screen is powered off, whether manually or by it's idle timeout, it will power back on with the HDMI part displaying a ridiculous 3840x1080 resolution, which of course doesn't fit on 2560x1440 pixels, so the picture is a mess. And the DP and HDMI parts of the screen switch places. This immediately comes back to normal after I either type "xrandr" or open the display settings applet. Any ideas on how to solve the above problems?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.