-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Scaling does not apply with xrdp on Debian 8 using high DPI Surface Pro machine #3200
Comments
I should notice that scaling applied right to the size of the screen when I tried to connect to xrdp on Debian 8 using Microsoft Remote Desktop for macOS (MacBook Air M1). Maybe it is macOS feature that used in microsoft's app to fix scaling, anyway its ambiguous. |
@niiiksh - can you clarify what isn't being scaled? Is it the xrdp login screen or the desktop itself? Also to get any kind of scaling you need to connect full-screen. If you don't do this, the RDP client won't send physical monitor size information to xrdp. More information here:- https://github.com/neutrinolabs/xrdp/wiki/Scaleable-login-screen |
I use rdp client in fullscreen. Login screen is scaled properly in both cases with client from Windows and macOS. The desktop itself is not scaled somehow when I access xrdp in Debian 8 from Windows rdp client. |
The login screen code should generate some logging related to the client information sent over about the monitor. Look for the string DPI in If you're getting enough info from the client to scale the display you'll see something like:-
If not:-
|
I've got this line, so login screen scales to this DPI right I guess. |
@matt335672
Which says 96x96 dots per inch but should have 253x253 dots per inch (by formula for horizontal or vertical DPI = pixels/inch_length) as my screen is 10,8 horizontal and 7,2 vertical (inches). |
Edit: We had crossing posts. This refers to your previous post but one 1824 pixels suggests a Surface Pro 4 with a resolution of 2736 x 1824. That's got a resolution of 267 ppi (i.e. DPI) according to wikipedia which should be a display height of (1824 / 267) inches = 6.83 inches = 173.5mm. Your client is telling the other end that the physical display is 10mm tall! The desktop is possibly ignoring this value. This looks like a client configuration issue. |
My mistake, my screen is 260,1x173,5 (mm) |
That I can't really help you with. Have you tried connecting to another Windows machine? There are some interesting posts regarding the SP4 (e.g.) :- |
yes, I have Windows 10 machine to connect to, and scaling applies right (in full-screen and even in windowed mode on resize too) using "modern" client from Microsoft Store. Interesting, with built-in client connecting to Debian 8 with xrdp 0.10.1 log prints:
|
Yes, that seems right. Which backend are you using for xorgxrdp, and which desktop? |
I use xorg (1:7.7+7) and GNOME desktop (3.14.1) |
Indeed. I've done some playing about of my own, and I think there's a disconnect between the client physical size info and the information available to the desktop via the RandR extension. On a physical desktop I'm logged into (with some snipping):- $ xrandr --listmonitors Monitors: 1 0: +DP-1 2560/597x1440/336+0+0 DP-1 $ xrandr -q Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 16384 x 16384 VGA-1 disconnected (normal left inverted right x axis y axis) DP-1 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm 2560x1440 59.95*+ . . . you can see that RandR knows about the physical monitor size, and that information bubbles down to the DP-1 output. In a full-screen RDP session on a laptop:- $ xrandr --listmonitors Monitors: 1 0: +*rdp0 1366/361x768/203+0+0 rdp0 $ xrandr -q Screen 0: minimum 256 x 256, current 1366 x 768, maximum 16384 x 16384 rdp0 connected primary 1366x768+0+0 0mm x 0mm 1366x768 50.00* The monitor size is known about, but this doesn't seem to have propagated down to the outputs. @jsorg71 - I'd appreciate your input on this. Do we need to add a bit more plumbing to |
@matt335672 Yes I have a patch that propagates the mm to xrandr. We do get it from the client but it's not used. The dpi setting in xdpyinfo is a global dpi setting, the dpi settings in xrandr is per monitor. We can update them both properly. |
@jsorg71 I can confirm Xft.dpi changes when 'Scaling Factor' option changed in gnome-tweak-tool. |
@jsorg71 @matt335672 Especially for GNOME desktop environment this command works too for setting scaling factor (everything rescales right immediately): |
I read somewhere that GTK 3.0 does have a dpi per monitor setting but I don't know where it reads it from. Maybe another XResource settings, maybe an Atom property on the randr monitor. I didn't have time yet to look into the GTK source. |
@matt335672 I create neutrinolabs/xorgxrdp#334 to show how to set the mm on the randr outputs. |
I'll summarise the situation as I see it:-
During the GFX integration, we put quite a bit of work into xrdp to support the use-case of monitors being plugged and unplugged from laptops. The desktop is notified of this via XRANDR. I don't see this use-case is substantially different from that use-case, so at this point I think we've done all we can for now. @niiiksh - in addition to the tips you've provided you might want to look at the Xorg section in the HiDPI page on the excellent Arch Wiki at https://wiki.archlinux.org/title/HiDPI#Xorg. Anyone care to add anything else? |
I think you are 100% right. |
@jsorg71 Well, I think we can close this issue. |
Thanks @niiiksh The issue will close automatically when we merge the development fix. |
xrdp version
0.10.1
Detailed xrdp version, build options
Operating system & version
Debian 8
Installation method
Doesn't matter
Which backend do you use?
No response
What desktop environment do you use?
No response
Environment xrdp running on
No response
What's your client?
No response
Area(s) with issue?
Graphic glitches
Steps to reproduce
Connect to xrdp (0.10.1) on Debian 8 using windows remote desktop software with Surface Pro PC (or maybe any other high DPI screen with scaling 150-200%).
✔️ Expected Behavior
Connected screen has scaling applied.
❌ Actual Behavior
Scaling does not apply. Everything is small.
Anything else?
EDIT: Workaround for GNOME desktop environment is:
It will work until your Remote Desktop client window stays in Surface Screen. If you move window to different screen you need to edit font Scaling Factor manually.
The text was updated successfully, but these errors were encountered: