alex-courtis / way-displays

way-displays: Auto Manage Your Wayland Displays
MIT License
267 stars 13 forks source link

Cannot disable scaling? #161

Open CNG opened 8 months ago

CNG commented 8 months ago

Hello, I'm not sure if this is a bug or I am misinterpreting the docs. Please let me know if this sounds wrong and what info I can provide.

I am attempting to use way-displays with a laptop and a docked external display, which I would normally use instead of the laptop screen when docked. I always want that display scaled to 1.0, and the laptop screen I usually keep at 1.25 but like to be able to increase or decrease this depending on the situation.

Prior to using way-displays, my Sway config looked like:

output eDP-1 scale 1.25
bindsym $mod+$alt+1 output eDP-1 scale 0.50
...
bindsym $mod+$alt+5 output eDP-1 scale 1.25
...
bindsym $mod+$alt+9 output eDP-1 scale 2.00

Per the way-displays instructions, I replaced the output line with way-displays .... Initially things seemed to work fine, but I discovered my shortcut keys to change the eDP-1 scale work for a fraction of a second before way-displays reverts the change. This happens even when I have SCALING and AUTO_SCALE set to off, and no specific SCALE set for eDP-1.

Here's an example of the log where you can clearly see those two features are turned off, but still the scaling is getting changed:

I [22:20:07] Reloading configuration file: /home/cgorichanaz/dotfiles/files/config/way-displays/cfg.yaml
I [22:20:07]
I [22:20:07] New configuration:
I [22:20:07]   Arrange in a ROW aligned at the TOP
I [22:20:07]   Scaling: OFF
I [22:20:07]   Auto scale: OFF (min: 1.000)
I [22:20:07]   Scale:
I [22:20:07]     PHL 328E1: 1.000
I [22:20:07]   Mode:
I [22:20:07]     PHL 328E1: 3840x2160@30Hz
I [22:20:13]
I [22:20:13] eDP-1 Changing:
I [22:20:13]   from:
I [22:20:13]     scale:     1.125 (2.523)
I [22:20:13]     position:  3840,0
I [22:20:13]     mode:      2880x1800@120Hz (120,001mHz) (preferred)
I [22:20:13]     VRR:       on
I [22:20:13]   to:
I [22:20:13]     scale:     1.000

Does this make sense?

I apparently can execute from my shell way-displays --set SCALE eDP-1 1.25 to change the laptop scale (though that ONLY works with SCALING: TRUE). So maybe I should have scaling turned back on in way-displays and then have all my bindsym lines in the Sway config call out to way-displays like:

bindsym $mod+$alt+3 exec way-displays --set SCALE eDP-1 1.00
bindsym $mod+$alt+5 exec way-displays --set SCALE eDP-1 1.25

That should be workable for me. Ideally I'd like to be able to change the scaling on all my displays with this shortcut key, but since I usually only want to do this for my laptop screen when that's the only display, it's not a big deal.

alex-courtis commented 8 months ago

Here's an example of the log where you can clearly see those two features are turned off, but still the scaling is getting changed:

That is working as intended: SCALING FALSE will disable all scaling and set every display to 1.0, regardless of SCALE and AUTO_SCALE.

You could set SCALING TRUE temporarily to play a game that cannot scale.

I apparently can execute from my shell way-displays --set SCALE eDP-1 1.25 to change the laptop scale (though that ONLY works with SCALING: TRUE). So maybe I should have scaling turned back on in way-displays and then have all my bindsym lines in the Sway config call out to way-displays like:

That looks right. SCALING TRUE will use your SCALE, then fall back to AUTO_SCALE. Two scales bound like that is a common "docked and undocked" use case.

Per the way-displays instructions, I replaced the output line with way-displays .... Initially things seemed to work fine, but I discovered my shortcut keys to change the eDP-1 scale work for a fraction of a second before way-displays reverts the change. This happens even when I have SCALING and AUTO_SCALE set to off, and no specific SCALE set for eDP-1.

This is a problem. It sounds like there are two display managers fighting over your displays. We will resolve that.

Please attach the full log for the "fraction of a second" case when you hit your binding. That will show your cfg.yaml at the start.

alex-courtis commented 8 months ago

It shouldn't happen but there may be two way-displays running. Please check ps ux | grep way-displays