List screen resolutions using Wayland/Weston

Viewed 17123

I am porting some tests from X11 to Wayland and there is little to no information on how to list the available resolutions supported.

All the examples that use Wayland and EGL manually specify the screen resolution to be used. I would like to list all the resolutions available and use the best.

Thank you, I didn't find anything.

3 Answers

My reply is too late but this might be helpful to someone. The simplest way is to check the weston log which will give you all supported modes for each connector(VGA,LVDS and HDMI) below are the log which highlights these.

Additional info: If you have not connected a physical monitor to connector port and port is enabled then it will by default take 1024x768 as preferred.

[09:23:40.144] Output VGA-1 (crtc 59) video modes:
           1024x768@60.0, preferred, current, 65.0 MHz
           1440x900@59.9, 88.8 MHz
           1366x768@59.8, 85.5 MHz
           1366x768@60.0, 72.0 MHz
           1360x768@60.0, 85.5 MHz
           1280x800@59.8, 83.5 MHz
           1280x800@59.9, 71.0 MHz
           1280x768@59.9, 79.5 MHz
           1280x768@60.0, 68.2 MHz
           1280x720@60.0, 74.2 MHz
           800x600@60.3, 40.0 MHz
           800x600@56.2, 36.0 MHz
           848x480@60.0, 33.8 MHz
           640x480@59.9, 25.2 MHz
[09:23:40.144] Output 'VGA-1' enabled with head(s) VGA-1
[09:23:40.145] Chosen EGL config details:
           RGBA bits: 8 8 8 0
           swap interval range: 1 - 1
[09:23:40.151] Output HDMI-A-2 (crtc 58) video modes:
           1920x1080@60.0, preferred, current, 138.8 MHz
           1920x1080@60.0, 148.5 MHz
           1920x1080@59.9, 148.4 MHz
           1920x1080@60.0, 74.2 MHz
           1920x1080@59.9, 74.2 MHz
           1920x1080@50.0, 148.5 MHz
           1920x1080@50.0, 74.2 MHz
           1920x1080@40.0, 92.5 MHz
           1280x720@60.0, 74.2 MHz
           1280x720@59.9, 74.2 MHz
           1280x720@50.0, 74.2 MHz
           720x576@50.0, 27.0 MHz
           720x480@60.0, 27.0 MHz
           720x480@59.9, 27.0 MHz
           640x480@60.0, 25.2 MHz
           640x480@59.9, 25.2 MHz
[09:23:40.152] Output 'HDMI-A-2' enabled with head(s) HDMI-A-2
[09:23:40.152] Chosen EGL config details:
           RGBA bits: 8 8 8 0
           swap interval range: 1 - 1
[09:23:40.155] Output LVDS-1 (crtc 56) video modes:
           1024x768@60.2, preferred, current, 65.0 MHz
[09:23:40.155] Output 'LVDS-1' enabled with head(s) LVDS-1
Related