linuxdeepin / developer-center

Deepin developer center, provide developer wiki and community forum.
452 stars 73 forks source link

feature request: per-display scaling #2708

Closed jddinneen closed 2 years ago

jddinneen commented 6 years ago

The display scaling widget works well for scaling every display together, and the display manager works well for arranging the outputs, but putting one UI scaling value on multiple displays can make UIs too small or large on some displays.

Could per-display scaling be added to the display manager? Xrandr seems to support this currently.

For example, when I plugged my 1080p monitors into my 4k display laptop, I used the manager to arrange the displays and make a profile - this works brilliantly - but to use the external displays I have to set the scaling to 1.0, which makes non-deepin windows (like Chrome) too small on the laptop display.

Thanks for your work; I really enjoy using deepin at work and at home!

kangzj commented 6 years ago

same situation here as well. I think it's quite common for developers. Can you guys please consider the support of this feature.

sonald commented 6 years ago

this is great recommendation. but there are amounts of effort to be put into it to make it real.

kangzj commented 6 years ago

Hi sonald, thank you for your reply. I got a question for you :-) where can I find the cursor size settings please? So that I could do a work-around. The extended display is good enough for now except for the huge cursor. Deepin OS is the best desktop distro ever. You guys rock. Regards, Jasper

sonald commented 6 years ago

@sbwtw

edTheGuy00 commented 5 years ago

It seems like they began working on this already. But at the moment it's not perfect. Only some apps works, primarily the deepin apps, but most of everything remains huge on my external FHD monitor (My Laptop is 3k).

Either way Good job guys!!

DeepinScreenshot_select-area_20190415230934

BLumia commented 5 years ago

associate: https://github.com/linuxdeepin/internal-discussion/issues/985

MasterJubei commented 5 years ago

Where is this enabled? I am on 4.10.12 and I don't see anything for dpi per display.

chirs241097 commented 5 years ago

Where is this enabled? I am on 4.10.12 and I don't see anything for dpi per display.

Add these lines to /etc/deepin/dde-control-center.conf

[Display]
AllowEnableMultiScaleRatio=true

Then logout and login again. FYI if a feature is disabled by default, it might be either untested or buggy. Use at your own risk.

MasterJubei commented 5 years ago

Thanks, the setting does apply. And you are correct, it is quite buggy and does not work properly. Tried to set main display to 1.5x and side monitors to 1x, it does not seem to do anything.

chirs241097 commented 5 years ago

Thanks, the setting does apply. And you are correct, it is quite buggy and does not work properly. Tried to set main display to 1.5x and side monitors to 1x, it does not seem to do anything.

You have to logout and back in so that the changes can take effect.

MasterJubei commented 5 years ago

I did, but it still doesn't do anything for me. The main monitor is still scaled to 1.5x, but dragging any window to the other monitors is still very large. Tried with native Deepin file manager and a few others.

chirs241097 commented 5 years ago

I did, but it still doesn't do anything for me. The main monitor is still scaled to 1.5x, but dragging any window to the other monitors is still very large. Tried with native Deepin file manager and a few others.

Could you please check whether the environment variable QT_SCREEN_SCALE_FACTORS is set?

MasterJubei commented 5 years ago

I typed printenv and there is no mention of QT_SCREEN_SCALE_FACTORS in the output

I should mention I am using Manjaro Deepin, and after changing the display scaling per monitor, my icons reset and cannot be changed. This occured for me right after clicking and dragging each display's scaling and logging out. Clicking on the theme icons in the control center changes folder icons in Nautilus but not for the Deepin tray or in the Deepin file manager.

https://i.imgur.com/sXzQKO2.png Should have the dark blue folder icons, but it is set to the bright ones now.

KaKi87 commented 5 years ago

Hey everybody,

As stated in the development planning on Deepin's official website, I was impatiently waiting for Deepin v15.11 to have the multi monitor multi DPI feature so I've just installed it but I don't have these settings as shown in your screenshots :/

Deepin 15.11 development planning

Did I forgot something ?

Thanks

MasterJubei commented 5 years ago

@KaKi87 It's not automatically enabled in 15.11, did you do what Chris said?

KaKi87 commented 5 years ago

Oh sorry I didn't paid attention :pray:

So I've just did it and it seems that the button which replaces the global DPI slider only appears after the settings pane is refreshed when I click on the screen resolution button.

However, there's a more important problem : the feature is working exactly like if there were only one DPI setting, like it always did : if I set the primary screen to scale 2 (it's an UHD screen), the others will be rescaled exactly like it used to (2 times too big).

Thanks

MasterJubei commented 5 years ago

It is broken on my install as well, it does not seem to work yet.

chirs241097 commented 5 years ago

I am no longer actively involved in the development of this feature. It has been re-implemented within the Qt platform plugin in April and has been semi-broken since then. Maybe @zccrs could offer more insight into this topic.

KaKi87 commented 5 years ago

Any news on this ? Thanks

MasterJubei commented 5 years ago

Any news on this ? Thanks

In the meantime, if you have a 4k display as your primary and a 1080p as your secondary you can quadruple the resolution of the 1080p display so it acts like a 4k display without a perceptible drop in image quality.

My 1080p monitor is rotated clockwise and is to the left of my primary 4k display. DisplayPort-2 = 4k display HDMI-A-0 is 1080p display

xrandr --output DisplayPort-2 --auto --pos 2160x600 --output HDMI-A-0 --auto --scale 2x2

In my case 2160 comes from the horizontal width of the 1080p display while rotated (1080x1920) if it is not rotated you would put 3840.

This solution works quite well. If you get mouse flickering and are on amd, you need add TearFree.

/etc/X11/xorg.d/20-amdgpu.conf

Section "Device"
    Identifier "AMD"
    Driver "amdgpu"
    #Option "SWcursor" "true"
    Option "TearFree" "true"
EndSection

If you are on intel: /etc/X11/xorg.conf.d/20-intel.conf

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
EndSection

You can use autorandr to save your xrandr profile to a preset and then load it from terminal if something changes your xrandr settings.

KaKi87 commented 5 years ago

Here is my triple monitor configuration, left to right :

Thanks !

MasterJubei commented 5 years ago

Typing xrandr to see your interface names It would look something like this for 1.5x scaling: Assuming: Hyundai = DP-1 MSI = eDP-1 Asus = DP-2

xrandr --output DP-1 --auto --pos 0x0 --scale 1.5x1.5 --output eDP-1 --auto --pos 2160x0 --output DP-2 --auto --scale 1.5x1.5 --pos 6000x0

If you want 2x scaling:

xrandr --output DP-1 --auto --pos 0x0 --scale 2x2 --output eDP-1 --auto --pos 2880x0 --output DP-2 --auto --scale 2x2 --pos 6720x0

KaKi87 commented 5 years ago

It seems that Hyundai is actually named DP-2 and Asus HDMI-2 and I would like ×2 scaling so I'm going to try the following command, inspired by your example :

xrandr --output DP-2 --auto --pos 0x0 --scale 2x2 --output eDP-1 --auto --pos 2880x0 --output HDMI-2 --auto --scale 2x2 --pos 6720x0

I'll edit this message if it works.

EDIT I've got the following error :

xrandr: screen cannot be larger than 8192x8192 (desired size 10560x2160)

Thanks

MasterJubei commented 5 years ago

It seems like a known bug https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1714178 But it looks like it has been fixed, the fix might get applied when Deepin updates packages to Debian 10.

Could try this but it appears to be messy https://stackoverflow.com/questions/46569550/xorg-increase-virtual-screen-size-past-8192-x-8192

KaKi87 commented 5 years ago

If you can give me clear instructions I'll try ^^ By the way, could we continue this conversation on an instant messaging platform, like Discord, Twitter, Skype, or whatever ? GitHub is kinda boring and I rebooted to Windows while I answered you because of that so if I can avoid delay next time it would be great xD Thanks

w4j3d commented 5 years ago

@RailRanger I have

can you please help me with the right settings? I have my AOC monitor on left of my laptop.

MasterJubei commented 5 years ago

@w4j3d for 1.5 which I recommend over 2x xrandr --output eDP-1 --auto --pos 2880x0 --output HDMI-1 --scale 1.5x1.5 --pos 0x0

for 2x xrandr --output eDP-1 --auto --pos 3840x0 --output HDMI-1 --scale 2x2 --pos 0x0

You can also change the y coordinate to better tune the vertical height. This matters when you drag a window over. I recommend using autorandr to save your configuration https://debian.pkgs.org/10/debian-main-amd64/autorandr_1.7-1_all.deb.html

https://github.com/wertarbyte/autorandr for how to use it

w4j3d commented 5 years ago

I have tried both... both are better than original... but I want to tweak a little bit so that it's just right for my eyes. Can you please tell me how you calculate it? I want to try for example 1.2 scaling, 2.2 scaling, etc..

w4j3d commented 5 years ago

it seems like for my very case: just multiply 1920 by the scale

thanks!

KaKi87 commented 5 years ago

@RailRanger What about me ? 🙄

MasterJubei commented 5 years ago

@KaKi87 There is a bug for resolutions going above 8192x8192 in either direction, it doesn't seem trivial to work around. It will be easiest to see if Deepin v20 will fix that because of the new freedesktop packages.

BLumia commented 5 years ago

It will be easiest to see if Deepin v20 will fix that because of the new freedesktop packages.

v20 will be based on debian buster so yeah :)

KaKi87 commented 5 years ago

When is that ? Will there be v16.x, v17.x, v18.x and v19.x before that ?

MasterJubei commented 5 years ago

It will be easiest to see if Deepin v20 will fix that because of the new freedesktop packages.

v20 will be based on debian buster so yeah :)

Good to hear, the old Stretch packages are annoying to deal with. Unrelated, but I love your avatar, they're adorable.

tangledbytes commented 5 years ago

I did follow the steps @chirs241097 mentioned but both the scales modify global (All monitors display) settings. When can we expect a fix for this as I couldn't find any date for deepin's next release?

KaKi87 commented 5 years ago

Any news on this ?

KaKi87 commented 4 years ago

up

luizender commented 4 years ago

up

NoName1645 commented 3 years ago

It seems like they began working on this already. But at the moment it's not perfect. Only some apps works, primarily the deepin apps, but most of everything remains huge on my external FHD monitor (My Laptop is 3k).

Either way Good job guys!!

DeepinScreenshot_select-area_20190415230934

I can't enable this experimental feature. Can you explain how I have to set the environment variable? I need my external monitor like many others.