Opened 10 years ago
Last modified 16 months ago
#56 new enhancement
add new resolutions to Xdummy on the fly - dummy driver needs randr support added?
Reported by: | Antoine Martin | Owned by: | Antoine Martin |
---|---|---|---|
Priority: | major | Milestone: | improbable |
Component: | platforms | Version: | |
Keywords: | dummy x11 | Cc: | thomas@… |
Description
Instead of finding the nearest match, we should just add the modeline, assign it to the output then select it.
This would allow us to match the client's screen size exactly.
(somewhat blocked by #10)
Attachments (9)
Change History (41)
Changed 10 years ago by
Attachment: | add-screen-size.patch added |
---|
comment:1 Changed 10 years ago by
Owner: | changed from Antoine Martin to Antoine Martin |
---|---|
Status: | new → accepted |
Summary: | add new resolutions to Xdummy on the fly → add new resolutions to Xdummy on the fly - dummy driver needs randr support added? |
After asking xorg-devel, it would seem that the dummy driver does not support randr - or at least not fully.
The patch above attempts to replicate xrandr's command line functionality and even includes its own modeline calculator, so from xpra's side it is pretty much ready.
comment:2 Changed 10 years ago by
Component: | android → platforms |
---|---|
Milestone: | 0.0.7.x → 0.2 |
comment:3 Changed 10 years ago by
Milestone: | 0.2 → future |
---|
Not heard back, and less critical now that the default config contains many of the typical resolutions found on desktops and even android devices.
Changed 10 years ago by
Attachment: | _add-screen-size.patch added |
---|
refreshed patch to apply over 0.6.1
comment:5 Changed 9 years ago by
Cc: | thomas@… added |
---|
comment:6 Changed 8 years ago by
Asked xorg dev again: RFC: dummy driver RandR improvements?
Some other links:
comment:7 Changed 8 years ago by
Forgot to update this ticket:
- we now have wiki/FakeXinerama support
- better DPI support (see #163)
comment:8 Changed 8 years ago by
Milestone: | future → 0.15 |
---|
Nicolas Boichat has just posted X11 patches to do exactly this!: PATCH dummy: Add support for custom resolutions (RandR 1.2)
Maybe this will fix #728
We'll just have to ensure this works with DPI (#163) - that we deal with #732 if possible, see also #349
comment:9 Changed 7 years ago by
Milestone: | 0.15 → 0.16 |
---|
Looks like the discussion of what to do for randr 1.2 support is ongoing: Cleanups and RandR 1.2 support, with different implementations suggested.
And so this will have to wait until this gets merged in one form or another, and maybe we only have to package it then which would be great (assuming that the new code can be built against older servers that is...)
comment:10 Changed 7 years ago by
Maybe this can help us: RandR 1.5 Brings Monitor Objects & Tile Support For X.Org
comment:11 Changed 7 years ago by
Re-post: xvfb: add randr support (v2)
I think we should update the dummy driver with the same changes.
comment:12 Changed 7 years ago by
In one of the responses to the patch above: http://lists.x.org/archives/xorg-devel/2015-June/046666.html links to: PATCH xf86-video-dummy 0/6: Cleanups and RandR 1.2 support - which is a better approach IMO.
comment:13 Changed 7 years ago by
See also #969, in particular the ramdac fix in ticket:969#comment:3
Changed 7 years ago by
Attachment: | 1001-remove-pointless-functions.patch added |
---|
dummy randr 1.2: patch 1 Remove pointless empty functions
Changed 7 years ago by
Attachment: | 1002-delete-xv-stuff.patch added |
---|
dummy randr 1.2: patch 2 Delete XV stuff
Changed 7 years ago by
Attachment: | 1003-delete-screensaver.patch added |
---|
dummy randr 1.2: patch 3 Delete dPtr->screenSaver
Changed 7 years ago by
Attachment: | 1004-remove-dga.patch added |
---|
dummy randr 1.2: patch 4 Remove DGA support
Changed 7 years ago by
Attachment: | 1005-remove-fbbase.patch added |
---|
dummy randr 1.2: patch 5 Get rid of dPtr->FBBase
Changed 7 years ago by
Attachment: | 1006-randr12.patch added |
---|
dummy randr 1.2: patch 6 Support RandR 1.2
comment:14 Changed 7 years ago by
just tried the patch series above and hit a snag: my xorg-devel reply
comment:15 Changed 7 years ago by
See also: MST monitors and the proposal for RandR 1.5 which would have the concept of "monitors" (without requiring us to have virtual CRTCs attached to them apparently)
comment:16 Changed 7 years ago by
Keywords: | dummy x11 added |
---|---|
Milestone: | 0.16 → 1.0 |
Priority: | major → critical |
No movement on this upstream, re-scheduling.
comment:17 Changed 6 years ago by
Milestone: | 1.0 → 0.17 |
---|
The randr v2 patch has been merged: http://lists.x.org/archives/xorg-devel/2015-December/048228.html.
Commit: 3d68d1f26709ecb5ce22a9baa0d3d8162574ed6a.
So either we figure out how to use the same code in Xdummy, or we switch back to Xvfb with newer versions?
Will have to test this new stuff: re-scheduling.
comment:19 Changed 6 years ago by
We're not alone in needing this: xf86-video-dummy: resize to exact resolution from Chrome Remote Desktop developer Erik Jensen.
comment:21 Changed 6 years ago by
Milestone: | 1.0 → future |
---|
I don't have time for this, new links:
- re: xf86-video-dummy: resize to exact resolution: Xvfb is as maintained as any other server we build
- re: xf86-video-dummy: resize to exact resolution: Which approach seems more likely to gain traction? Without a champion for either one, neither. :)
Changed 6 years ago by
Attachment: | dummy-remove-functions.patch added |
---|
for testing the latest upstream patches for dummy
comment:22 Changed 6 years ago by
Recent discussion: remove dead code in dummy driver: In 2014 I had also modified the dummy driver while working with Teradici Corporation to support not only arbitrary pixel dimensions, but also multiple monitors. The latter feature might not make sense to some folks, but if you have a server-side Xserver mapped to a hardware thin client sitting across a network, which has multiple physical monitors attached, you want the Xserver to be configured in the exact same manner as the tin client. Even though there is just a virtual framebuffer in main memory, X applications need to know the number/size/location of monitors so that toolbars are placed properly, windows are fullscreen'ed properly, etc. And when the user moves from one hardware thin client to another, which may have a different monitor configuration, the Xserver session needs to change to that configuration.
comment:24 Changed 5 years ago by
Milestone: | future → 3.0 |
---|
Raising again.
This is the commit that added randr to Xvfb: vfb: add randr support (v2)
comment:25 Changed 5 years ago by
Done for Xvfb in r16994.
To use it, switch to Xvfb in browser/xpra/trunk/src/etc/xpra/conf.d/55_server_x11.conf.in.
The server should then create new resolutions for every client, the "-d screen,randr" debug output looks like this (shown here for 1080p, but this works for any reasonable resolution):
dpi=120, dpi.x=120, dpi.y=120, double_click_time=400, double_click_distance=(-1, -1), \ antialias={'hinting': True, 'enabled': True, 'orientation': 'NONE', 'contrast': 1000, 'hintstyle': 'hintslight'}, \ cursor_size=24 Python/Gtk2 Linux Fedora 26 TwentySix x11 client version 2.2-r16976 64-bit connected from 'desktop' as 'antoine' - 'Antoine Martin' mmap is enabled using 256MB area in /run/user/1000/xpra/xpra.7Ap0oy.mmap client root window size is 3840x2160 with 1 display: :1.0 (1016x572 mm - DPI: 96x95) workarea: 3840x2126 at 0x34 monitor 1 (708x398 mm - DPI: 137x137) maximum client resolution is 3840x2160 (current server resolution is 5760x2560) set_screen_size(3840, 2160) set_screen_size(3840, 2160) xdpi=120, ydpi=120 set_dpi(120, 120) add_screen_size(3840, 2160) Modeline 3840x2160 230 3840 4108 4492 5068 2160 2161 2164 2293 XRRCreateMode returned 0x275 screen_resources: crtcs=1, outputs=1, modes=2 adding mode 0x275 to output 0x3d randr_added_sizes=[(3840, 2160)] using XRRSetScreenConfigAndRate with 3840x2160 XRRSetScreenSize(0x555a8dbc8240, 0x25c, 3840, 2160, 813, 457)
Still TODO:
- ideally, replace the synchronous sleep with an asynchronous handler: we have to wait for the X11 server to reconfigure its outputs, this makes the connection setup slower than it used to be...
- maybe start removing old resolutions after we have added a few hundred, which can happen quite quickly
- update the HTML5 client to remove the black borders
comment:26 Changed 5 years ago by
Status: | accepted → new |
---|
r16996: improvements, client fixes (inc html5)
comment:27 Changed 5 years ago by
Owner: | changed from Antoine Martin to J. Max Mena |
---|
@maxmylyn: ready for some testing as it is.
comment:28 Changed 5 years ago by
Owner: | changed from J. Max Mena to Antoine Martin |
---|
With a Trunk r17074 Fedora 25 server and client, I played around with this for a few minutes:
I edited my conf file to uncomment the default Xvfb command for Ubuntu, so it read:
Xvfb +extension Composite -nolisten tcp -noreset \ -auth $XAUTHORITY \ -screen 0 5760x2560x24+32
And played around with it for a bit. I made sure to turn on -d screen,randr
and saw I got the relevant prints. Nothing seems to have been broken, and resizing the HTML5 client seems to work fine. But, I didn't do much other than some xterms and glxgears. Is there anything in particular we should be looking at?
Of note:
I booted my local test bot up, but I need to reconfigure its display settings to work headless. Once I do that, I can do a run-through of the automated tests with Xvfb, maybe that'll catch something I wouldn't.
(Thanks for mentioning that, Smo)
comment:29 Changed 5 years ago by
NOTE:
test bot up and running. The tests are failing after the first run because the server does not get shut down properly. This will require editing the test_measure_perf.py
file.
comment:30 Changed 5 years ago by
- r17075 adds GLX to Xvfb command line, not sure if that makes any difference. There are other switches that may impact performance:
+iglx
/-iglx
, etc. - r17080 removes old modes so we don't end up with thousands of modes (which could cause problems with some applications - known to cause crashes with some gnome applications for example), currently set to keep a maximum of 32 resolutions, for testing this can be changed using the env var
XPRA_RANDR_MAX_NEW_MODES=VALUE
- when comparing the performance of Xvfb vs Xdummy, make sure that you don't use virtualgl unless you also intend to use virtualgl in production
- x11perf may not show much difference between the two (see attachment/wiki/Xdummy/Xvfb-vs-Xorg-x11perf.txt), but other tests might
Note: rather than editing the xvfb=
option, you can just build with --without-Xdummy
(easier)
comment:31 Changed 4 years ago by
Milestone: | 3.0 → improbable |
---|---|
Priority: | critical → major |
Lowering priority: we have support for resizing via xvfb (see comment:25).
See also #1467
comment:32 Changed 16 months ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/56
this patch would add a new mode to Xdummy so we can use it... but does not work