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

HiDPI scaling on Linux #12054

Open
benwaffle opened this issue Jul 1, 2016 · 7 comments
Open

HiDPI scaling on Linux #12054

benwaffle opened this issue Jul 1, 2016 · 7 comments
Labels

Comments

@benwaffle
Copy link

@benwaffle benwaffle commented Jul 1, 2016

No description provided.

@metajack
Copy link
Contributor

@metajack metajack commented Jul 1, 2016

One thing you can do for now is use --device-pixel-ratio=2.0 (or 1.5 or 2.5 or whatever depending on what you want).

Do you happen to know what the normal method for doing this on Linux is? We do have support for this on Windows and Mac, although even there we could improve a bit, but mostly it is a matter of automating adjusting the device pixel ratio based on some system notification.

@jdm jdm added the P-linux label Jul 1, 2016
@benwaffle
Copy link
Author

@benwaffle benwaffle commented Jul 1, 2016

On GNOME desktops, you can read the gsettings key org.gnome.desktop.interface scaling-factor

@jbriggs-zvelo
Copy link

@jbriggs-zvelo jbriggs-zvelo commented Jul 1, 2016

@benwaffle
GNOME with Wayland is fancier because it does scaling per monitor. I am not up on how that's done though.

@emberian
Copy link
Contributor

@emberian emberian commented Feb 24, 2017

On Wayland, you should listen to the wl_surface::enter/leave events (https://wayland.freedesktop.org/docs/html/apa.html#idp67102000), and take the scale from the wl_output::scale, resizing the internal buffer, using wl_surface::set_buffer_scale to match the output, and redrawing. When overlapping multiple outputs, I'm not sure what the best behaviour should be :)

Note that this is only for sizing the buffer: you'd probably still want to set the device pixel ratio using the wl_output::geometry to get some correspondence between a CSS px (which is an angular measurement) and a display px.

org.gnome.desktop.interface scaling-factor isn't ever useful for an application to read on Wayland, AFAIK.

@benwaffle
Copy link
Author

@benwaffle benwaffle commented Feb 24, 2017

somehow weston gets overlapping multi-dpi monitors perfect

@nox
Copy link
Member

@nox nox commented Oct 4, 2017

Is this still an issue?

@Manishearth
Copy link
Member

@Manishearth Manishearth commented Sep 5, 2018

Yeah, a page with a bit of text and some newlines renders like this under 2x:

image

The recommended fix -- setting --device-pixel-ratio=2.0 -- makes the text larger but it's still in a corner

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

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.