Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi-resolution problems #3108

Closed
rootkovska opened this issue Sep 21, 2017 · 42 comments
Closed

Hi-resolution problems #3108

rootkovska opened this issue Sep 21, 2017 · 42 comments

Comments

@rootkovska
Copy link
Member

On hires display, All AppVMs have incorrectly set "magnification", making them display super-large fonts and other UI elements. Surprisingly this is not the case for the actual template. This can be observed e.g. on gnome-terminal or Firefox.

Interestingly the sys-net has correct scaling, but sys-usb does not. This might be related to #3107? Perhaps this is a result of Salt stack not applying some configuration to some of the VMs?

@rootkovska rootkovska added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. C: desktop-linux C: mgmt P: major Priority: major. Between "default" and "critical" in severity. labels Sep 21, 2017
@rootkovska rootkovska added this to the Release 4.0 milestone Sep 21, 2017
@rootkovska rootkovska changed the title Hires problems Hi-resolution problems Sep 21, 2017
@marmarek
Copy link
Member

Salt by default do not apply any VM configuration. This automatic scaling is intended feature of GNOME, gnome-settings-daemon namely. See here: https://wiki.gnome.org/HowDoI/HiDpi

Interestingly it isn't started automatically in some VMs. Not sure why...

@marmarek
Copy link
Member

Anyway, I'd say that better default is to have this automatic scaling working everywhere, instead of requiring some users to use physical magnification glass to setup their system... GNOME team do have UI experts and I'd assume they did this for a reason.
The only "problem" on Qubes is that if you want to change that (see that wiki page), you need to do that in every VM.

FWIW, with this magnification enabled, in default settings (12px font size), fullscreen terminal can fit 176x46 chars, which is slightly more than similar window on non-HiDPI laptop (154x44).

@rootkovska
Copy link
Member Author

The magnification is def. too large, but I can see how this is a matter of personal taste, however we still have 2 Qubes-specific (related, but distinct) problems:

  1. That, out of the box, some of the VMs got the scaling applies while other do not (templates, sys-net),
  2. That there is no mechanism to let the user consistently adjust it for all the VMs.
    Of course if we solved qvm-copy-to-vm incorrect handling of spaces in file names #2, we could fix Installer #1.

@marmarek
Copy link
Member

I see a couple ways to solve point 2:

  1. use salt to adjust appropriate gsettings key
  2. add a VM startup script, that will adjust it based on setting exposed by dom0 in QubesDB

The first one makes it compatible with other tools (gnome-tweak-tool for example), but require every VM to be started when changing the setting. The second one will work "offline", but will override custom value set by the user, at every VM startup.

As for point 1 - this isn't about setting some value or not. It is about gnome-settings-daemon not being started. If you start it, it will automatically calculate scaling factor (if not set manually). It is set to start only in AppVM (/etc/qubes/autostart/gnome-settings-daemon.desktop.d/30_qubes.conf). Which apparently is wrong. So, the point 1 is easy to fix.

@marmarek
Copy link
Member

Maybe we should do the same in dom0, then propagate this setting into VMs (using approach in point 2)?

@marmarek
Copy link
Member

I've tried to set xfce for hidpi (according to https://wiki.archlinux.org/index.php/HiDPI#Xfce) - fonts dpi 192, max icon size 48, and "Default-hidpi" window manager theme (according to https://xfce.org/about/tour).
Personally I think this looks ugly. Some issues:

  • window titles do not fit on buttons (on the panel) anymore, even though there is a plenty of unused space on the panel.
  • checkboxes, radio buttons and other such elements are still tiny
  • in some places buttons description do not fit in widgets (widgets, entry boxes etc), see for example power manager, system tab

I don't see a direct equivalent of GNOME's Gdk/WindowScalingFactor in Xfce.

@rootkovska
Copy link
Member Author

If Xfce4 doesn't handle scaling factors well, then I think we should:

  1. Use the scaling factor=1 for all the VMs (to keep UI look consistent between the GUI domain and VMs),
  2. Allow the users to easily change the scaling factor for all the VMs easily, if they feel the need for this.

An alternative solution is to scale down the resolution to something less than the full 4k (but still larger than HD). This option works really well for me on Qubes 3.2, and it requires all the VMs and GUI domain to consitently use scaling factor=1.

@rootkovska
Copy link
Member Author

This is BTW, how does Firefox looks in the default install of 4.0 on a hires system. UGLY!
default-hires

@h01ger
Copy link

h01ger commented Sep 22, 2017 via email

@marmarek
Copy link
Member

@h01ger the GNOME automatic scaling is about DPI, not resolution itself. So it should be ok.
@rootkovska what resolution would you suggest?

@rootkovska
Copy link
Member Author

Generally I suggest to leave scaling factor = 1...

@mex20
Copy link

mex20 commented Oct 11, 2017

@rootkovska If the application is closed and reopened on a HiRes display, the scaling issues fix themselves on 4.0 RC1. At least that is the case on a Surface Book.

@rootkovska
Copy link
Member Author

@mex20: no it still sucks, even though admittedly the factor gets smaller then. Yet it is still inconsistent (e.g. templates and e.g. sys-net get scaling factor 1, while other VMs get much larger), and generally looks very messy and ugly :(

@rootkovska rootkovska added P: critical Priority: critical. Between "major" and "blocker" in severity. and removed P: major Priority: major. Between "default" and "critical" in severity. labels Oct 23, 2017
@mveytsman
Copy link

mveytsman commented Nov 28, 2017

FWIW I experience this issue in fedora-derived AppVMs but not in debian-derived ones (just upgraded to 4.0rc3)

@isodude
Copy link

isodude commented Dec 6, 2017

I can simulate this by starting a disposable fedora VM with firefox (tabs takes up quite a lot of screen area). This is through the qubes menu.
If I start firefox with qvm-run --dispvm fedora-25-dvm firefox, the DPI is better.

I figured those two approaches would be exactly the same?

@marmarek
Copy link
Member

Ok, I've got it even worse:

firefox-hidpi

Lets disable this...

@alyssais
Copy link

I had this problem, and found a solution!

Do this in your Fedora TemplateVM, as root:

  1. Create /etc/dconf/db/local.d/dpi with the following contents:
    [org/gnome/desktop/interface]
    scaling-factor=uint32 1
  2. Create /etc/dconf/profile/user with the following contents:
    user-db:user
    system-db:local
  3. Run dconf update.

@isodude
Copy link

isodude commented Dec 16, 2017

I can confirm that this does the trick on my T470p. 👍

@talex5
Copy link

talex5 commented Dec 24, 2017

After updating my AppVMs to the Fedora 26 template, everything was too small to read for me. I was able to fix it by adding a file /etc/xdg/autostart/gsettings.desktop to my Fedora 26 template VM:

[Desktop Entry]
Version=1.0
Name=gnome-settings-daemon
Exec=/usr/libexec/gsd-xsettings
Terminal=false
Type=Application
X-GNOME-Autostart-Phase=Initialization

@marmarek
Copy link
Member

@talex5 as you can see in this thread, many people complains about this automatic scaling...

@najamelan
Copy link

I am running Q4 on a high resolution screen and I just set /etc/X11/Xresources Xft.dpi: 200 in my template vms and it's been smooth sailing since (as far as scaling goes).

I see that in dom0 I set it using the settings manager in:
xsettings > Xft > DPI

I could probably have set it in etc as well for consistency, I suppose the effect would have been the same.

@qubesos-bot
Copy link

Automated announcement from builder-github

The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-3.2.23-1.fc26) has been pushed to the r3.2 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r3.2-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-core-agent_3.2.23-1+deb9u1 has been pushed to the r3.2 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-core-agent_3.2.23-1+deb10u1 has been pushed to the r3.2 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing buster-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-core-agent_3.2.25-1+deb10u1 has been pushed to the r3.2 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-core-agent_3.2.25-1+deb9u1 has been pushed to the r3.2 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-3.2.25-1.fc26) has been pushed to the r3.2 stable repository for the Fedora template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

@dylangerdaly
Copy link

I appear to be getting this issue again with Fedora-28 templateVM specifically, it's not taking gsettings and gsd-xsettings is running

@colin-barnabas
Copy link

colin-barnabas commented Aug 13, 2018

For Fedora-28 template set text-scaling-factor=uint32 2 in /etc/dconf/db/local.d/dpi

$ cat /etc/dconf/db/local.d/dpi 
[org/gnome/desktop/interface]
scaling-factor=uint32 2
text-scaling-factor=uint32 2

@limax
Copy link

limax commented Aug 15, 2018

After upgrading from Fedora 26 to Fedora 28 this solved the problem for me:
gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "[{'Gdk/WindowScalingFactor', <2>}]"

@dylangerdaly
Copy link

This totally fixed it! Thank you!! 😄

@esote
Copy link

esote commented Nov 22, 2018

@andrewdavidwong Should this issue be closed now? The discussion above seems to be related to a Fedora issue, not one specific to Qubes. If users want that specific config, it's up to them.

Perhaps we could add some documentation on resolving DPI / HI-resolution issues (ie change the config described above from the one @marmarek has done) -- but tracking this could be done in a separate issue since it's not a critical bug.

@dylangerdaly
Copy link

dylangerdaly commented Nov 22, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests