Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Increasing xwayland DPI on hotplug #1119

Closed
emersion opened this issue Jul 8, 2018 · 7 comments
Closed

Increasing xwayland DPI on hotplug #1119

emersion opened this issue Jul 8, 2018 · 7 comments

Comments

@emersion
Copy link
Member

emersion commented Jul 8, 2018

When plugging/unplugging outputs, the xwayland DPI value increases. For instance on my machine it starts at 96, and after plugging an output:

> xdpyinfo | grep dots
  resolution:    114x114 dots per inch

If I unplug it:

> xdpyinfo | grep dots
  resolution:    131x131 dots per inch

This may be an xwayland bug.

@martinetd
Copy link
Member

Can also get some pretty fun values by resizing the output window on wayland/x11 backends:

  resolution:    -2147483648x-2147483648 dots per inch

and on DRM backend by playing with dpms swaymsg "output * dpms on"

  resolution:    142x142 dots per inch

(both start with 96x96 dpi as well)

I think the first one might be different but dpms one is probably related

@emersion
Copy link
Member Author

emersion commented Jul 14, 2018

This happens on weston --xwayland too, so this is definitely an xwayland bug.

https://lists.x.org/archives/xorg-devel/2018-July/057305.html

@emersion
Copy link
Member Author

Note: this doesn't happen on GNOME.

> xdpyinfo | grep dots
  resolution:    91x91 dots per inch

@mdeff
Copy link

mdeff commented Jan 22, 2019

According to the Arch wiki, "GTK very often overrides the server's DPI via the optional Xresource Xft.dpi". That would explain why it doesn't happen on GNOME. I'm using the same trick.

@schauveau
Copy link
Contributor

That is rare but I also noticed that behavior on my laptop. I am not using any external screen.
This is probably happening when the laptop is resuming from sleep.
I will try the Xft.dpi trick.

@emersion
Copy link
Member Author

emersion commented Apr 4, 2020

@emersion
Copy link
Member Author

Fix released as part of xorg-xserver 1.20.9.

mdeff added a commit to mdeff/dotfiles that referenced this issue Apr 1, 2021
"Fix released as part of xorg-xserver 1.20.9."
<swaywm/wlroots#1119>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants