The old VM/dpi/Xresources problem again

23 views
Skip to first unread message

Achim Patzner

unread,
Nov 8, 2018, 8:42:10 PM11/8/18
to qubes-devel
Hi!

I've come back to using Qubes on a HiDPI device again and getting into
the same trap as always; even if I set the real resolution using
Xresources (or .xsettingss) I'll end up with problems if I connect a
different display to my machine. Getting rid of xsettingsd seems to be
the wrong way, too.

The method that seems to be working under all circumstances (especially
with multiple displays running at different resolutions seems to be
nailing the necessary values into RANDR and XFT after all the sabotage
has been done by GNOME, xfce4 or KDE.

Would it be possible to extend VM launching after WaitForSession by one
more RPC "FixTheBloodyResolution" that will get the horizontal size,
vertical size and resolution followed by a stream of Xft database
entries (from his .xresources or optionally .Xresources.vm in dom0) a
user might want to have pushed down to xrdb. If someone wants to go the
extra mile also followed by further data handed over into gsd-
xsettingsd

The result would be fed into xrandr and xrdb -merge by the client part
of the rpc. I'm doing something similar locally right now using a
script qvm-start-2 containing a qvm-start followed by qvm-run -u root
launching xrandr and xrdb but I believe integrating it int VM launch
would help everybody who is dealing with more than one display.

Comments? Better ideas?


Achim



ser...@da.matta.nom.br

unread,
Nov 9, 2018, 9:35:56 AM11/9/18
to qubes-devel
I start applications that needs scaling on my 4ktv (using Edit Laucher - right click on desktop app menu) using: qvm-run -q -a --service -- personal qubes.StartApp+env GDK_SCALE=1.3 GDK_DPI_SCALE=1.3 CLUTTER_SCALE=1.3 org.baedert.corebird

Achim Patzner

unread,
Nov 9, 2018, 11:15:42 AM11/9/18
to qubes...@googlegroups.com
Am Freitag, den 09.11.2018, 06:35 -0800 schrieb ser...@da.matta.nom.br:
> Em quinta-feira, 8 de novembro de 2018 23:42:10 UTC-2, Achim Patzner escreveu:
> > Xresources (or .xsettingss) I'll end up with problems if I connect a
> > different display to my machine. Getting rid of xsettingsd seems to be
> > the wrong way, too.
>
> I start applications that needs scaling on my 4ktv (using Edit Laucher - right click on desktop app menu) using: qvm-run -q -a --service -- personal qubes.StartApp+env GDK_SCALE=1.3 GDK_DPI_SCALE=1.3 CLUTTER_SCALE=1.3 org.baedert.corebird

This will work if you know what you are connecting your computer to but
if you want to connect it to the nearest <whatever> cable, have it to
adapt to the device connected there and work with any application
without preparing additional menu entries this will not work.

And the data is there; modern displays know their dimensions and the
number of pixels in any dimension so setting up the correct scalin
should be trivial. Mac OS got that right from the beginning (but at
that time they had the unfair advantage of knowing their hardware and
building support for it into drivers) and even Windows is getting it
right now (unless you have a really uncooperative lying piece of
hardware like my 4096x2120 LG monitor). With a little help it is
working on X11, too (although I don't know why it is getting all
relevant data from conected monitors and THEN scales it down to 96 dpi
on a display the assumed size of a billboard ("Tell me your size and
your weight." "x and y." "Oh, to make you fir the correc BMI of 18 we
declare you to be 3m tall." -- doesn't work well in real life either).


Achim



Reply all
Reply to author
Forward
0 new messages