-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
xrdp version
0.10.2
Detailed xrdp version, build options
Operating system & version
Rocky Linux 9.5
Installation method
dnf / apt / zypper / pkg / etc
Which backend do you use?
Xorgxrdp
What desktop environment do you use?
KDE
Environment xrdp running on
VM
What's your client?
mstsc.exe (Windows 11)
Area(s) with issue?
Other
Steps to reproduce
Connect to xrdp with the scaling factor set to 150%.
✔️ Expected Behavior
xrdp's display should have the same DPI as the display.
❌ Actual Behavior
xrdp's display defaults to 96 DPI.
Anything else?
Hi,
I'm trying to use xrdp on a HiDPI display with a 3840x2160 resolution and a 150% scaling factor (the recommended scaling factor). The desktop environment I am running isn't automatically adjusting to the display's scaling factor, meaning everything looks too small. This problem is very similar to the problem described in issue #3200, where the proposed solution is changing the DPI after xrdp has established the session and the display information has been passed to xrandr. However, I find this solution hard to work with for two reasons:
Firstly, it does not seem to account for different scaling factors, i.e., possible different DPIs. Indeed, the issue suggests using the resolution and physical size of the monitor passed to xrandr to calculate a "proper" DPI for the display, similarly to what is done in https://github.com/neutrinolabs/xrdp/wiki/Scaleable-login-screen, which might not correspond to the current DPI of the display. For example, starting a session with the scaling factor set to 150% outputs in the logs:
Login screen monitor height is 2160 pixels over 336 mm (163 DPI)
While starting a session with the scaling factor set to 200% also outputs in the logs:
Login screen monitor height is 2160 pixels over 336 mm (163 DPI)
What this indicates is that there is a disconnect between the DPI set by myself and this "proper" DPI that can be calculated through the sent resolution and physical size. This seems odd, given the fact that the RDP protocol communicates this desktop scale factor in the initial capabilities exchange https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/db6713ee-1c0e-4064-a3b3-0fac30b4037b, more specifically, in ClientCoreData https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/00f1da4a-ee9c-421a-852f-c19f92343d73.
Secondly, one has to change the DPI after the session has started, again, this is strange since the desktop scale factor is sent by the client. Is it not possible to launch the X server with the DPI defined by the received desktop scale factor? For example, if the received desktop scale factor is 150% why can't the X server be configured to start with a DPI of 144 (96 * 1.5)?
Thanks.