Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List screen resolutions using Wayland/Weston [closed]

Tags:

linux

wayland

egl

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.

like image 937
000Camus000 Avatar asked Oct 05 '17 06:10

000Camus000


3 Answers

The reply is so late but still can be useful to you or someone :)

You can see all supported video adapters by using this command

$ ls /sys/class/drm
card0
card0-VGA-1
card1
card1-DVI-I-1
card1-HDMI-A-1
card1-VGA-2

You can get all supported resolutions by this command, use the adapter which you are using

$ cat /sys/class/drm/card0-LVDS-1/modes 
1366x768
1366x768
like image 98
ganeshredcobra Avatar answered Oct 18 '22 02:10

ganeshredcobra


If you want to list all the modes the compositor supports (might not be the same as your monitor), you can run weston-info

It's a simple wayland-client that just connects to the display and logs all the global interfaces (including the wl_outputs (screens) and their modes).

You could also do that yourself inside your Wayland-client and pick the mode you prefer for your test.

like image 22
bobbaluba Avatar answered Oct 18 '22 00:10

bobbaluba


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:
           [email protected], preferred, current, 65.0 MHz
           [email protected], 88.8 MHz
           [email protected], 85.5 MHz
           [email protected], 72.0 MHz
           [email protected], 85.5 MHz
           [email protected], 83.5 MHz
           [email protected], 71.0 MHz
           [email protected], 79.5 MHz
           [email protected], 68.2 MHz
           [email protected], 74.2 MHz
           [email protected], 40.0 MHz
           [email protected], 36.0 MHz
           [email protected], 33.8 MHz
           [email protected], 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:
           [email protected], preferred, current, 138.8 MHz
           [email protected], 148.5 MHz
           [email protected], 148.4 MHz
           [email protected], 74.2 MHz
           [email protected], 74.2 MHz
           [email protected], 148.5 MHz
           [email protected], 74.2 MHz
           [email protected], 92.5 MHz
           [email protected], 74.2 MHz
           [email protected], 74.2 MHz
           [email protected], 74.2 MHz
           [email protected], 27.0 MHz
           [email protected], 27.0 MHz
           [email protected], 27.0 MHz
           [email protected], 25.2 MHz
           [email protected], 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:
           [email protected], preferred, current, 65.0 MHz
[09:23:40.155] Output 'LVDS-1' enabled with head(s) LVDS-1
like image 20
Tyson Avatar answered Oct 18 '22 00:10

Tyson