I need to create mirror fake displays in one physical monitor. I installed fakexrandr and now I have two fake displays(683x768) on 1366x768(max/prefered) monitor of my laptop.
When I run xrandr --output eDP1~1 --same-as eDP1 --verbose
command I'm gettings this error:
*also xrandr --fb 683x768
is printing the same error.
Phillip Berndt (owner/creator of fakexrandr) said "It is up to the graphics driver to actually apply any settings." in this issue. But it was not a satisfying answer for me.
For track down the issue I recorded the output of xrandr --verbose
on a two physical monitor setup. You can follow the commits in this repository to see the behavior of the output of xrandr --verbose
.
- After I did this I realized
xrandr --output eDP1~1 --same-as eDP1
command is trying to assigncurrent 683x768
toScreen 0:
. But graphic driver or physical monitor on my laptop has no683x768
output option/support. Maybe this could be the problem.(I'm not sure the accuracy of this paragraph, maybe it could be completely wrong.)
All in all: What is the actual reason of this error in the screenshot and the workaround for this problem?
RandR is an extension to the X11 server that is used to communicate the configuration of outputs between the server's clients (= applications) and the graphics driver. Most applications don't actually speak the protocol themselves, but instead use a library called
libXrandR
. FakeXRandR replaces this library with one that still asks the graphics driver for the configuration, but then fiddles with the result to cheat applications into believing that there was an entirely different configuration present than there actually is. Since this necessarily leads to errors if one tries to alter one of the fake outputs, it tries to mitigate the worst issues by replacing any configuration requests on fake outputs with change requests against the original, physical output. But those are, of course, still bound to fail if you try to apply a resolution that only exists on the fake outputs.A good analogy might be the situation when you have a fairly old car that is able to drive 50 kph. You now want to drive on a street that requires you to be able to drive 100 kph. The solution that FakeXRandR pursues is to replace the numbers on the tachometer such that the needle now shows 180 kph when you are actually driving 50. If you are stopped in a traffic control, you can say "See officer, my speedmeter says I can go 180, so I'm fine", and he'll probably accept this. But you actually still can not drive any faster, because to do that you had to replace the engine, not some printed numbers on your dashboard.
tl;dr: FakeXRandR is the wrong tool for your task.
If you really need to do this on a RandR level, you'll have to patch your graphics driver, both in the X11 and kernel code. I wrote some hits on where to look in another bug report for FakeXRandr. A simpler solution, if all you want is to have the right half of your screen mirror the left, would be to use an advanced compositing window manager like Compiz. Compositing managers add a redirection layer between application windows and what you actually see. This allows them to, in this case, draw each window twice, first on the left side of the output, then on the right side; which would effectively clone your output. There either already is a plugin available for this (install all compiz packages, especially compizconfig-settings-manager, ccsm, and search it for what you need), or it should at least be possible to write one that does what you want with not-too-much effort.