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

XWayland HiDPI #599

Open
caleb-allen opened this issue Jul 18, 2020 · 9 comments
Open

XWayland HiDPI #599

caleb-allen opened this issue Jul 18, 2020 · 9 comments
Labels

Comments

@caleb-allen
Copy link

Love wayfire! Reminds me of my early Ubuntu days with Compiz :)

HiDPI seems to be a hot topic for xwayland so pardon my ignorance but it looks like this PR on wlroots is taking a relatively straighforward approach to get it working: swaywm/wlroots#2064

Is that patch an approach wayfire could potentially take as well? And how extensive would the work be? I'm interested in contributing but don't want to jump into the deep end if it's a fool's errand.

@caleb-allen
Copy link
Author

I should mention, the PR is not yet merged in wlroots, it is taking an approach from an xserver PR which also has not been merged.

@ammen99
Copy link
Member

ammen99 commented Jul 19, 2020

Yes, we can take the same approach. If you are ready to patch Wayfire (and of course your Xwayland and wlroots too) you can just do something like http://ix.io/2s4c (but replace scale with the scale value you want to have!). It will be exposed as a Wayfire config option once the PRs you linked are merged.

@caleb-allen
Copy link
Author

Alright, I gave it a shot yesterday but was having some build issues. I may give it another go at some point if I get the time, but if not I will wait until the upstream PRs are merged

@ammen99
Copy link
Member

ammen99 commented Jul 20, 2020

Can you say what issues? Note that yesterday we merged some brealing changes across all components so you should also update wf-config and wf-shell.

@ammen99
Copy link
Member

ammen99 commented Jul 29, 2020

Sorry for confusing you, it seems my patch does not work. I implemented it correctly here: https://github.com/WayfireWM/wayfire/tree/xwayland-scale-factor

@caleb-allen
Copy link
Author

The changes on xwayland-scale-factor seem to be working!

I realize that my build had worked just fine, but I was calling the wayfire binary directly instead of using the startwayfire script which seems to have fixed up the environment.

@je-vv
Copy link

je-vv commented Apr 2, 2024

Hello, I believe I'm hitting this issue, but I need a way to work around it if possible...

I need to use a tigervnc client to work with remote GUI from xorg vnc server. I also need to use wayland scaling:

% cat .config/kanshi/config
profile laptop-monitor-home-monitor {
        output HDMI-A-3 enable scale 1.5
        output eDP-1 disable scale 1.5
}

profile laptop-only {
        output eDP-1 enable scale 1.5
}

I've shown the scaling with kanshi, but it's the same with wayfire doing the scaling.

The tigervnc client (vncviewer) shows up with huge UI and fonts, things don't fit, really a mess. The tigervnc client is running on xwayland.

Is that related this issue. Is there a work around?

I don't know if there are equivalent VNC clients for xorg VNC servers which are wayland native apps, right? One advantage with tigervnc BTW is that it makes tunneling through SSH piece of cake, :) I'm aware of wayvnc, but that's for wayland displays, isn't it?

If my tigervnc problem is related to this issue, then I also noticed the issue "only sclae wayland window option" was closed indicating that was not a solution. But I think it would have helped in my case, hehe. Hyprland has an interesting setting from its xwayland config, force_zero_scaling. I guess that helps, while a real solution is achieved, but I guess the decision on the issue I mentioned means wayfire won't do that.

What option is there, for me to work around this xwayland hidpi mess, if that's a thing? Although VNC becomes more complex if I have to create the SSH tunnels myself, I can change of client, as long as it communicates well with the server...

Thanks !

@ammen99
Copy link
Member

ammen99 commented Apr 2, 2024

@je-vv I guess you can always compile Wayfire with the xwayland patches, AFAIK someone maintains packages for arch linux with updated patches (https://aur.archlinux.org/packages/wayfire-hidpi-xprop-git) so looking at the PKGBUILD instructions you might get some idea of how to build it yourself.

Also it sounds as if the app itself detects display scale, then scales up its UI and fonts, and then there is further scaling applied. Maybe look for some ways to make the app not scale its UI automatically (this is probably controlled by DPI settings, but I'm not overly familiar with X11 scaling). Alternatively I would recommend just using scale=1 and using larger font sizes, for better or worse that's what I'm personally doing :)

@je-vv
Copy link

je-vv commented Apr 3, 2024

What a shame, I forgot I could actually change the Xorg VNC server DPI. I reduced it quite a bit (the Xorg DPI numbers are sort of magical, one has to adjust them on trial and error). I went from 170 to 110, and now its sort of OK.

I'm really sorry for not thinking about this before. And BTW, I found wlvncc which has an AUR package, it's a wayland native VNC client, easy to install for me, given I use Artix (a non systemd Arch derivative). However it misses the easy SSH tunnel handling, I have to create it and kill it by hand, and has no GUI interface, and still needs the remote Xorg VNC server to change the DPI. So given the easy of use of tigerVNC when dealing with localhost only VNC servers (precisely to enforce SSH tunneling and encryption), I prefer to use the tigerVNC client.

Thanks a lot, and sorry for the noise.

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

No branches or pull requests

3 participants