alex-courtis / way-displays

way-displays: Auto Manage Your Wayland Displays
MIT License
240 stars 12 forks source link

Odd behavior with resolutions #103

Open CondeGil opened 1 year ago

CondeGil commented 1 year ago

When i list the modes of my laptop monitor i only get: $ cat /sys/class/drm/card0-eDP-1/modes 3840x2160 If i use way-displays script to apply 1920x1080 it simply fails (of course, i guess?). But if i kill way-displays, open wdisplays, set the custom resolution there, and re-run way-displays it works fine. The reason why i tried this is because in X11, the list of modes for this monitor is way longer (more than one option, and with the 1920x1080), and i was trying to understand whats going on. I know very little about resolutions and monitors so i discover nothing. Right now, for me to be able to use my setup i always have to run wdisplays first, and because of this, the way-displays kinda becomes useless for me. But it might be something here that the wdisplays is doing that could be helpful for way-displays.

I tried almost every tool to handle displays from this list: https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway#displayoutputs and wdisplays was the only tool capable of use a different resolution than 3840x2160

Dell xps 15 9560 Arch linux kernel 6.3.1 Hyprland (Same exact thing happened in sway so i dont think is related) way-displays - latest in AUR

alex-courtis commented 1 year ago

I'd be most grateful if you attached the log - the output of the way-displays server. See Quick Start

That will show us what modes are available and what modes have been attempted.

alex-courtis commented 1 year ago

Hyprland is confirmed to function: https://github.com/alex-courtis/way-displays#hyprland

CondeGil commented 1 year ago

Yeah,i haven't put that in the hyperland config yet. Want to make sure every thing works first. The log before runing wdisplays:

I [09:23:01] way-displays version 1.8.1 I [09:23:01] I [09:23:01] Found configuration file: /home/gil/.config/way-displays/cfg.yaml I [09:23:01] I [09:23:01] Active configuration: I [09:23:01] Arrange in a ROW aligned at the TOP I [09:23:01] Order: I [09:23:01] eDP-1 I [09:23:01] DP-1 I [09:23:01] DP-2 I [09:23:01] DP-3 I [09:23:01] DP-4 I [09:23:01] DP-5 I [09:23:01] DP-6 I [09:23:01] HDMI-A-1 I [09:23:01] HDMI-A-2 I [09:23:01] Scaling: ON I [09:23:01] Auto scale: ON I [09:23:01] Scale: I [09:23:01] eDP-1: 2.000 I [09:23:01] Mode: I [09:23:01] eDP1: 1920x1080@60Hz I [09:23:02] I [09:23:02] Monitoring lid device: /dev/input/event0 I [09:23:02] I [09:23:02] Lid open I [09:23:02] I [09:23:02] eDP-1 Arrived: I [09:23:02] info: I [09:23:02] name: 'eDP-1' I [09:23:02] make: 'Sharp Corporation' I [09:23:02] model: '0x1476' I [09:23:02] desc: 'Sharp Corporation 0x1476 (eDP-1)' I [09:23:02] width: 350mm I [09:23:02] height: 190mm I [09:23:02] dpi: 283.72 @ 3840x2160 I [09:23:02] mode: 3840 x 2160 @ 60 Hz 59,997 mHz (preferred) I [09:23:02] current: I [09:23:02] scale: 2.000 (2.955) I [09:23:02] position: 0,0 I [09:23:02] mode: 3840x2160@60Hz (59,997mHz) (preferred) I [09:23:02] VRR: off I [09:23:02] I [09:23:02] eDP-1 Changing: I [09:23:02] from: I [09:23:02] scale: 2.000 (2.955) I [09:23:02] position: 0,0 I [09:23:02] mode: 3840x2160@60Hz (59,997mHz) (preferred) I [09:23:02] VRR: off I [09:23:02] to: I [09:23:02] VRR: on I [09:23:02] I [09:23:02] eDP-1: Cannot enable VRR, display or compositor may not support it.

Then i killed the way-displays, run the wdisplays, set a custom resolution (1920x1080), and re-run the way-displays:

I [09:30:12] way-displays version 1.8.1 I [09:30:12] I [09:30:12] Found configuration file: /home/gil/.config/way-displays/cfg.yaml I [09:30:12] I [09:30:12] Active configuration: I [09:30:12] Arrange in a ROW aligned at the TOP I [09:30:12] Order: I [09:30:12] eDP-1 I [09:30:12] DP-1 I [09:30:12] DP-2 I [09:30:12] DP-3 I [09:30:12] DP-4 I [09:30:12] DP-5 I [09:30:12] DP-6 I [09:30:12] HDMI-A-1 I [09:30:12] HDMI-A-2 I [09:30:12] Scaling: ON I [09:30:12] Auto scale: ON I [09:30:12] Scale: I [09:30:12] eDP-1: 1.000 I [09:30:12] Mode: I [09:30:12] eDP-1: 1920x1080 I [09:30:13] I [09:30:13] Monitoring lid device: /dev/input/event0 I [09:30:13] I [09:30:13] Lid open I [09:30:13] I [09:30:13] eDP-1 Arrived: I [09:30:13] info: I [09:30:13] name: 'eDP-1' I [09:30:13] make: 'Sharp Corporation' I [09:30:13] model: '0x1476' I [09:30:13] desc: 'Sharp Corporation 0x1476 (eDP-1)' I [09:30:13] width: 350mm I [09:30:13] height: 190mm I [09:30:13] dpi: 283.72 @ 3840x2160 I [09:30:13] mode: 3840 x 2160 @ 60 Hz 59,997 mHz (preferred) I [09:30:13] mode: 1920 x 1080 @ 59 Hz 58,943 mHz I [09:30:13] current: I [09:30:13] scale: 1.000 (1.478) I [09:30:13] position: 0,0 I [09:30:13] mode: 1920x1080@59Hz (58,943mHz) I [09:30:13] VRR: off

Has you can see, in the second output a new mode appeared for that monitor

alex-courtis commented 1 year ago

Then i killed the way-displays, run the wdisplays, set a custom resolution (1920x1080), and re-run the way-displays:

It appears that wdisplays allows the creation of custom modes; way-displays does not, it only uses the modes advertised by the monitor.

What's your use case for changing the resolution? The wayland preferred manner is to use the monitor's native resolution and scale. The results are much smoother as the GPU does the scaling, rather than the monitor.

I'm investigation integration of wdisplays and way-displays #55 wdisplays is much forked and effectively abandoned.

CondeGil commented 1 year ago

Well, to be honest i would love to use it as you say, but some applications are working very poorly when using 2 displays at different scales. For instance im having issues with chrome instances if they are open in both monitors at the same time.

alex-courtis commented 1 year ago

Well, to be honest i would love to use it as you say, but some applications are working very poorly when using 2 displays at different scales. For instance im having issues with chrome instances if they are open in both monitors at the same time.

way-displays will calculate and apply scales such that the chrome window will have the same physical size on both monitors.

Is the calculated scale incorrect? It uses the monitor's reported physical size in mm.

I can see that your laptop is correctly reporting. Is your external monitor reporting correctly? Please post the log with both monitors connected so that we can understand and fix the issue.

Raised #106