Hi all .. I am new here.  I have been hacking on Unix systems for about 20 
years, but no prior experience with Xen outside of AWS.

I have a 2016-generation Dell XPS 13 (9360) which has a 13-inch, 3200x1800 
display.  Have been struggling through all of the hacks and tricks necessary to 
get programs to render at a reasonable size.  Will summarize those at the end 
for the benefit of anybody that happens to find this message first in the 
future.[1]

I have just one thing that still runs in Tinyvision, which is the text console 
that comes up with an HVM guest.  Having a hard time figuring out how that 
window gets rendered.  Have tried all the following:


## Theory 1: That window cares what the X server reports via e.g. xdpyinfo.

If this is right, then it might be fixed if we can get 'xrandr --dpi 192' to 
happen at the right place at server start.  Created a setdpi.sh that runs 
'xrandr --dpi 192 && date >> /tmp/setdpi.sh.log'.

Put it at /etc/X11/xinit/xinitrc.d/setdpi.sh
>> It runs, and has no effect.

Put it as the first thing in /etc/X11/xinit/xinitrc:
>> It runs, and has no effect.

Set it as display-setup-script in /etc/lightdm/lightdm.conf:
>> It runs, and has no effect.

Tried it as session-setup-script in /etc/lightdm/lightdm.conf:
>> It runs, and has no effect.

Also tried "DisplaySize 423 238" in xorg.conf.  No effect.

In all cases, the HVM console is still tiny, and at startup, xdpyinfo shows 
96x96.  This is odd because after login, if I run 'xrandr --dpi 192' by hand, 
xdpyinfo changes to show 192x192.  (To get this far required trying several 
kernels and finding that 4.8.12-12.pvops.qubes.x86_64 from qubes unstable repo 
works, BTW.)


## Theory 2: It's the guest OS's problem to ask for a bigger display.

I was surprised to discover that an OpenBSD HVM guest (which doesn't even work 
right in most ways), is capable of changing video modes by starting an X 
server, and the host display gives it a new window at the new resolution.  This 
is also in Tinyvision and not resizable, but that is probably solvable inside 
the guest OS eventually.

I tried many permutations of OpenBSD wsconscfg, and FreeBSD vt (vidcontrol 
etc), to see if the guest OS could be persuaded to change modes on its fake VGA 
device, or at least just throw huge fonts at it.  No good.  The xen device 
doesn't provide whatever interface the console drivers are looking for, and 
nothing works.

I tried hacking up the xen configs to force the HVMs to start with every known 
xen video backend: vga, cirrus, vmvga, xen, vbox, qxl, virtio, and gop.  All 
either unsupported or work the same as the default (xen).


## Theory 3: The window is drawn by qubes-guid.

Have read some of the code in qubes-gui-agent-xen-hvm-stubdom, and maybe 
eventually the answer is in here.

There is a tantalizing clue in /var/log/xen/console/guest-xxx-dm.log, which 
gets messages like "dumping mfns: n=282, w=720, h=400, bpp=32."  This traces 
back to line 171 of qubes-gui.c, and 720x400 is the size of the Tinyvision 
window.


## Theory 4: The simulated vga text console is never going to work.

I could ssh to an HVM from another VM with a working terminal.  Or I can try to 
get 'xl console' to work.  But both cases will require some modifications in 
the guest OS first, and it's painful to do anything non-trivial in Tinyvision.


Anyone recognize any clues here, or have an explanation of how the console 
window gets drawn?


-----

[1] Some or all of the following were necessary to apply in each VM:

+ Xfce "Appearance" settings panel - set "Custom DPI setting" on Fonts tab.

+ Xfce "Window Manager" settings panel has a theme named "hidpi" which helps 
with window frames.

+ Some X applications react to 'xrandr --dpi 192'.  Unclear which ones or why.  
You can verify if this had an effect by asking 'xdpyinfo | grep -b2 resolution'

+ Some gtk-based UI elements are affected by running:
gsettings set org.gnome.desktop.interface scaling-factor 2
gsettings set org.gnome.desktop.interface text-scaling-factor 0.75

+ One Debian-8 VM would not persist the Xft change at startup until I did:
echo "Xft/DPI 196608" >> ~/.xsettingsd # that number is 192*1024

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/9f98b327-80ef-4cc5-b6d2-2e9b3b4a07f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to