Discussion:
[winswitch] xpra dpi woes with a server running Ubuntu cosmic
Perry E. Metzger via shifter-users
2018-09-12 11:55:39 UTC
Permalink
Howdy! I'm testing out xpra with a remote server running
Ubuntu Cosmic and a client running MacOS, and I've been having some
challenges with the setup setting the DPI to weird values.

My impression from reading old trouble tickets is that I need to
install a patched version of the Xdummy stuff but I'm not exactly
sure. What do I need to do, roughly? (I searched and couldn't really
find exact instructions...)

Thanks in advance!

Perry
--
Perry E. Metzger ***@piermont.com
Antoine Martin via shifter-users
2018-09-12 12:17:36 UTC
Permalink
Post by Perry E. Metzger via shifter-users
Howdy! I'm testing out xpra with a remote server running
Ubuntu Cosmic and a client running MacOS, and I've been having some
challenges with the setup setting the DPI to weird values.
What values and where did you find them?
Post by Perry E. Metzger via shifter-users
My impression from reading old trouble tickets is that I need to
install a patched version of the Xdummy stuff but I'm not exactly
sure. What do I need to do, roughly? (I searched and couldn't really
find exact instructions...)
Everything you need should be here:
http://xpra.org/trac/browser/xpra/trunk/debian/xserver-xorg-video-dummy

As the Ubuntu 18.10 release nears, we will start pushing packages to the
beta repository, this will include the patched dummy driver.
Until then, you will need to compile the driver yourself or use another
workaround.

Cheers,
Antoine
Post by Perry E. Metzger via shifter-users
Thanks in advance!
Perry
Perry E. Metzger via shifter-users
2018-09-12 12:43:56 UTC
Permalink
On Wed, 12 Sep 2018 19:17:36 +0700 Antoine Martin via shifter-users
Post by Antoine Martin via shifter-users
Post by Perry E. Metzger via shifter-users
Howdy! I'm testing out xpra with a remote server running
Ubuntu Cosmic and a client running MacOS, and I've been having
some challenges with the setup setting the DPI to weird values.
What values and where did you find them?
I found the values in the log. Opening up applications leads to crazy
display sizes, and I saw this:

2018-09-11 20:54:07,844 client @18.265 Xpra X11 server version 2.3.2-r19729 64-b
it
2018-09-11 20:54:07,845 client @18.266 running on Linux Ubuntu 18.10 cosmic
2018-09-11 20:54:07,849 DPI set to 17 x 21 (wanted 72 x 72)
2018-09-11 20:54:07,849 you may experience scaling problems, such as huge or sm
all fonts, etc
2018-09-11 20:54:07,849 to fix this issue, try the dpi switch, or use a patched
Xorg dummy driver
Post by Antoine Martin via shifter-users
Post by Perry E. Metzger via shifter-users
My impression from reading old trouble tickets is that I need to
install a patched version of the Xdummy stuff but I'm not exactly
sure. What do I need to do, roughly? (I searched and couldn't
really find exact instructions...)
http://xpra.org/trac/browser/xpra/trunk/debian/xserver-xorg-video-dummy
Do I just patch xserver-xorg-video-dummy with what's in patches/ ?
I presume I can use the Ubuntu source package to do this?

Is there a chance of contributing these patches upstream? It would
help.

And can I install the patched Xdummy somewhere non-standard and point
xpra at it? I imagine that something in /etc/xpra/* will let me do
that but I don't know how.
Post by Antoine Martin via shifter-users
As the Ubuntu 18.10 release nears, we will start pushing packages
to the beta repository, this will include the patched dummy driver.
Until then, you will need to compile the driver yourself or use
another workaround.
Perry
--
Perry E. Metzger ***@piermont.com
Perry E. Metzger via shifter-users
2018-09-12 13:07:00 UTC
Permalink
On Wed, 12 Sep 2018 08:43:56 -0400 "Perry E. Metzger via
Post by Perry E. Metzger via shifter-users
Post by Antoine Martin via shifter-users
Post by Perry E. Metzger via shifter-users
My impression from reading old trouble tickets is that I need to
install a patched version of the Xdummy stuff but I'm not
exactly sure. What do I need to do, roughly? (I searched and
couldn't really find exact instructions...)
http://xpra.org/trac/browser/xpra/trunk/debian/xserver-xorg-video-dummy
BTW, thanks!
Post by Perry E. Metzger via shifter-users
Do I just patch xserver-xorg-video-dummy with what's in patches/ ?
I presume I can use the Ubuntu source package to do this?
That worked for me. I'm still not quite sure what the _correct_ dpi
for my setup is (how can I figure that out?) but setting things to 72
is now accepted and the emacs I launch no longer looks crazy. When I
set the DPI to 110 (which is closer to what is actually true on my
screen) the emacs ends up a bit distorted again, with the width of the
display not being 80 columns when it first comes up. I'm not sure why.
Post by Perry E. Metzger via shifter-users
Is there a chance of contributing these patches upstream? It would
help.
It really would....
Post by Perry E. Metzger via shifter-users
And can I install the patched Xdummy somewhere non-standard and
point xpra at it? I imagine that something in /etc/xpra/* will let
me do that but I don't know how.
For now I just did a dpkg -i on the generated .deb but I have to
confess I don't know what will happen if the thing gets
overwritten. My unix fu is stronger than my dpkg fu.

Perry
--
Perry E. Metzger ***@piermont.com
Antoine Martin via shifter-users
2018-09-13 09:14:37 UTC
Permalink
Post by Perry E. Metzger via shifter-users
On Wed, 12 Sep 2018 08:43:56 -0400 "Perry E. Metzger via
Post by Perry E. Metzger via shifter-users
Post by Antoine Martin via shifter-users
Post by Perry E. Metzger via shifter-users
My impression from reading old trouble tickets is that I need to
install a patched version of the Xdummy stuff but I'm not
exactly sure. What do I need to do, roughly? (I searched and
couldn't really find exact instructions...)
http://xpra.org/trac/browser/xpra/trunk/debian/xserver-xorg-video-dummy
BTW, thanks!
Post by Perry E. Metzger via shifter-users
Do I just patch xserver-xorg-video-dummy with what's in patches/ ?
I presume I can use the Ubuntu source package to do this?
That worked for me. I'm still not quite sure what the _correct_ dpi
for my setup is (how can I figure that out?)
In theory, xpra will figure out the DPI in use by the client (taken from
the command line option if it is specified, then trying
user-configurable places like Xft/DPI, and falling back to a calculated
"hardware DPI" if nothing else is available), it then tells the server
to apply this DPI value to the virtual framebuffer.

With the patched dummy driver, the virtual framebuffer used by the
server should have the exact virtual "hardware" geometry requested by
the client.

Applications started after this framebuffer resizing event should see
the correct screen resolution no matter how they look it up.
(ie: use --start-after-connect=whatever)

For multimonitor setups, libfakeXinerama helps in some rare cases:
https://xpra.org/trac/wiki/FakeXinerama
But this is not packaged for Debian or Ubuntu yet.


The alternative is to use Xvfb in /etc/xpra/conf.d/55_server_x11.conf
Xvfb starts with a fixed DPI value and will not adapt to the client's
screen resolution. Which means that applications that honour Xft/DPI
will have the "correct" DPI, whereas applications that use a calculated
"hardware DPI" will get the fixed DPI value.

Xvfb has the small disadvantage of not supporting some of the more
advanced input device virtualization features like precise scrolling:
https://xpra.org/trac/ticket/1611
Post by Perry E. Metzger via shifter-users
but setting things to 72
How?
Post by Perry E. Metzger via shifter-users
is now accepted and the emacs I launch no longer looks crazy. When I
set the DPI to 110 (which is closer to what is actually true on my
screen) the emacs ends up a bit distorted again, with the width of the
display not being 80 columns when it first comes up. I'm not sure why.
If you think this is a bug that should be fixed, please file a ticket.
Post by Perry E. Metzger via shifter-users
Post by Perry E. Metzger via shifter-users
Is there a chance of contributing these patches upstream? It would
help.
It really would....
As I said in my other reply, that's very unlikely to be accepted, ever.
(even though we are the primary users of the dummy driver and the
solution is small and reliable, it is just not very "clean")
Post by Perry E. Metzger via shifter-users
Post by Perry E. Metzger via shifter-users
And can I install the patched Xdummy somewhere non-standard and
point xpra at it? I imagine that something in /etc/xpra/* will let
me do that but I don't know how.
For now I just did a dpkg -i on the generated .deb but I have to
confess I don't know what will happen if the thing gets
overwritten. My unix fu is stronger than my dpkg fu.
This build has a newer version number than the one available in the
standard Ubuntu repositories, so it is very unlikely to be replaced
during system updates.

Cheers,
Antoine
Post by Perry E. Metzger via shifter-users
Perry
Antoine Martin via shifter-users
2018-09-13 08:52:03 UTC
Permalink
Post by Perry E. Metzger via shifter-users
On Wed, 12 Sep 2018 19:17:36 +0700 Antoine Martin via shifter-users
Post by Antoine Martin via shifter-users
Post by Perry E. Metzger via shifter-users
Howdy! I'm testing out xpra with a remote server running
Ubuntu Cosmic and a client running MacOS, and I've been having
some challenges with the setup setting the DPI to weird values.
What values and where did you find them?
I found the values in the log. Opening up applications leads to crazy
it
2018-09-11 20:54:07,849 DPI set to 17 x 21 (wanted 72 x 72)
2018-09-11 20:54:07,849 you may experience scaling problems, such as huge or sm
all fonts, etc
2018-09-11 20:54:07,849 to fix this issue, try the dpi switch, or use a patched
Xorg dummy driver
Right, that's the simulated "hardware DPI" that some applications use.
Out of curiosity, which application misbehaved?

(everything would be much easier if they just used some
user-configurable value like Xft/DPI instead)
Post by Perry E. Metzger via shifter-users
Post by Antoine Martin via shifter-users
Post by Perry E. Metzger via shifter-users
My impression from reading old trouble tickets is that I need to
install a patched version of the Xdummy stuff but I'm not exactly
sure. What do I need to do, roughly? (I searched and couldn't
really find exact instructions...)
http://xpra.org/trac/browser/xpra/trunk/debian/xserver-xorg-video-dummy
Do I just patch xserver-xorg-video-dummy with what's in patches/ ?
Yes.
Post by Perry E. Metzger via shifter-users
I presume I can use the Ubuntu source package to do this?
Yes.
Post by Perry E. Metzger via shifter-users
Is there a chance of contributing these patches upstream? It would
help.
That's very very unlikely to be merged upstream.
The DPI patch is really hackish.
Post by Perry E. Metzger via shifter-users
And can I install the patched Xdummy somewhere non-standard and point
xpra at it? I imagine that something in /etc/xpra/* will let me do
that but I don't know how.
You can use ModulePath in xorg.conf:
ftp://www.x.org/pub/X11R7.7-RC1/doc/man/man5/xorg.conf.5.xhtml
Post by Perry E. Metzger via shifter-users
Post by Antoine Martin via shifter-users
As the Ubuntu 18.10 release nears, we will start pushing packages
to the beta repository, this will include the patched dummy driver.
Until then, you will need to compile the driver yourself or use
another workaround.
I have started pushing packages to the xpra "cosmic" repositories,
including the patched dummy driver. Simply adding the repository and
updating should give you all you need.

If those packages work for you, please comment or close this ticket:
https://xpra.org/trac/ticket/1959

Cheers,
Antoine
Post by Perry E. Metzger via shifter-users
Perry
Perry E. Metzger via shifter-users
2018-09-13 14:28:08 UTC
Permalink
On Thu, 13 Sep 2018 15:52:03 +0700 Antoine Martin
Post by Antoine Martin via shifter-users
Post by Perry E. Metzger via shifter-users
I found the values in the log. Opening up applications leads to
2.3.2-r19729 64-b it
18.10 cosmic 2018-09-11 20:54:07,849 DPI set to 17 x 21 (wanted
72 x 72) 2018-09-11 20:54:07,849 you may experience scaling
problems, such as huge or sm all fonts, etc
2018-09-11 20:54:07,849 to fix this issue, try the dpi switch,
or use a patched Xorg dummy driver
Right, that's the simulated "hardware DPI" that some applications
use. Out of curiosity, which application misbehaved?
Emacs. It behaved very, very badly.
Post by Antoine Martin via shifter-users
Post by Perry E. Metzger via shifter-users
Is there a chance of contributing these patches upstream? It would
help.
That's very very unlikely to be merged upstream.
The DPI patch is really hackish.
Is a less hackish version possible that upstream would take? It would
eliminate the maintenance issue with every release.
Post by Antoine Martin via shifter-users
ftp://www.x.org/pub/X11R7.7-RC1/doc/man/man5/xorg.conf.5.xhtml
Post by Perry E. Metzger via shifter-users
Post by Antoine Martin via shifter-users
As the Ubuntu 18.10 release nears, we will start pushing packages
to the beta repository, this will include the patched dummy
driver. Until then, you will need to compile the driver yourself
or use another workaround.
I have started pushing packages to the xpra "cosmic" repositories,
including the patched dummy driver. Simply adding the repository and
updating should give you all you need.
What's the correct line for my sources.list?
Post by Antoine Martin via shifter-users
https://xpra.org/trac/ticket/1959
Will do.
--
Perry E. Metzger ***@piermont.com
Antoine Martin via shifter-users
2018-09-13 14:41:54 UTC
Permalink
Post by Perry E. Metzger via shifter-users
On Thu, 13 Sep 2018 15:52:03 +0700 Antoine Martin
Post by Antoine Martin via shifter-users
Post by Perry E. Metzger via shifter-users
I found the values in the log. Opening up applications leads to
2.3.2-r19729 64-b it
18.10 cosmic 2018-09-11 20:54:07,849 DPI set to 17 x 21 (wanted
72 x 72) 2018-09-11 20:54:07,849 you may experience scaling
problems, such as huge or sm all fonts, etc
2018-09-11 20:54:07,849 to fix this issue, try the dpi switch,
or use a patched Xorg dummy driver
Right, that's the simulated "hardware DPI" that some applications
use. Out of curiosity, which application misbehaved?
Emacs. It behaved very, very badly.
Post by Antoine Martin via shifter-users
Post by Perry E. Metzger via shifter-users
Is there a chance of contributing these patches upstream? It would
help.
That's very very unlikely to be merged upstream.
The DPI patch is really hackish.
Is a less hackish version possible that upstream would take? It would
eliminate the maintenance issue with every release.
Not in its present form. There have been talks of merging proper randr
support, but things have gone very quiet:
https://lists.freedesktop.org/archives/xorg/2016-June/058128.html
randr 1.5 support would allow us to configure virtual monitors.
Here's xpra's tracker ticket for this issue:
https://xpra.org/trac/ticket/56
Post by Perry E. Metzger via shifter-users
Post by Antoine Martin via shifter-users
ftp://www.x.org/pub/X11R7.7-RC1/doc/man/man5/xorg.conf.5.xhtml
Post by Perry E. Metzger via shifter-users
Post by Antoine Martin via shifter-users
As the Ubuntu 18.10 release nears, we will start pushing packages
to the beta repository, this will include the patched dummy
driver. Until then, you will need to compile the driver yourself
or use another workaround.
I have started pushing packages to the xpra "cosmic" repositories,
including the patched dummy driver. Simply adding the repository and
updating should give you all you need.
What's the correct line for my sources.list?
Place one of those in /etc/apt/sources.list.d/
https://xpra.org/repos/cosmic/xpra.list
or:
https://xpra.org/repos/cosmic/xpra-beta.list

Cheers,
Antoine
Post by Perry E. Metzger via shifter-users
Post by Antoine Martin via shifter-users
https://xpra.org/trac/ticket/1959
Will do.
Loading...