Closed peter-si closed 2 years ago
Duplicate of #13, closing that as it has less detail.
Preferred mode is defined by the monitor. It is usually the highest resolution that it can display with the attached cable, however it is often not the highest refresh. Sometimes it is a low "most compatible" mode, especially on TVs.
TODO: document this in README
We cannot change preferred mode, however it is possible to use a different mode. way-displays currently always uses the preferred mode's resolution, overriding the setting from sway.
Something like this is possible:
MODES:
- NAME_DESC: Samsung Electric Company U28E590 H4ZM901003
WIDTH: 2560
HEIGHT: 1440
REFRESH_MILLIHZ: 599531
Perhaps REFRESH_HZ: 60
and try modes close to 60 until we find one that works.
There may be problems, as monitors sometimes won't display some modes (black screen, power down) despite their being reported. A fallback to preferred may need to be implemented.
I will consider this and see if any other issues or solutions arise.
I have two monitors:
Asus VG27AQ
(2560x1600 @ 165 Hz)
2560x1440 px, 159.998001 Hz
2560x1440 px, 164.998993 Hz <--------- This is wanted
2560x1440 px, 59.951000 Hz (preferred, current)
.....
Unknown Display Controller with an old Laptop Screen (Controller reports the max resolution as 1920x1080@60) (But the panel is actually 1600x900@60)
1280x1024 px, 60.020000 Hz
1600x900 px, 60.000000 Hz <--------- This is wanted
1680x1050 px, 59.882999 Hz
1920x1080 px, 23.976000 Hz
1920x1080 px, 24.000000 Hz
1920x1080 px, 50.000000 Hz
1920x1080 px, 59.939999 Hz
1920x1080 px, 60.000000 Hz
1920x1080 px, 60.000000 Hz (preferred, current)
.....```
@raxetul MAX_PREFERRED_ REFRESH
will resolve your VG27AQ case, however we need something more specific for the other panel.
Specifying the highest might be a solution that suits most cases, with the specific mode being the last resort.
Perhaps:
MODES:
- NAME_DESC: Unknown Display Controller
HIGHEST: TRUE
- NAME_DESC: Samsung Electric Company U28E590 H4ZM901003
WIDTH: 2560
HEIGHT: 1440
REFRESH_MILLIHZ: 599531
Needs #27
I agree, specific cases(in my case it is not a specific one, it is an extreme one) should be handled after the end. I just write it to make you know.
should be handled after the end
The MAX_PREFERRED_REFRESH case? That will be deprecated, however will still be done after the user mode setting, but before the preferred mode. The effect will be the same as using a MODE
with the width/height set to the preferred mode's.
Changes merged to master. 1.5.0 release incoming.
User may select mode for each monitor via CLI or cfg.yaml via:
Mode fallback:
Refresh in mHz is printed, however the selection is in Hz. Selection in mHz may be added if needed.
Implemented. Please reopen if you have any issues or questions.
Hi, probably a noob question, but I see
in documentation. How do I set preferred mode? (on sway specifically)
I have these modes
with
3840x2160@30Hz (preferred)
. However I would like to use2560x1440@60Hz
(I don't really care if it is preferred or no). Settingoutput HDMI-A-1 res 2560x1440@60Hz
(or withmode
) doesn't seem to work, since way-displays will override it. Can you please help setting my resolution? Thanks