List screen resolutions using Wayland/Weston

000Camus000 picture 000Camus000 · Oct 5, 2017 · Viewed 9.9k times · Source

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.

Answer

ganeshredcobra picture ganeshredcobra · Apr 7, 2018

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