Where/why does GNOME add modes for displays?

Hi,

I connected my TV via HDMI and I noticed that there were additional 4:3 modes provided by Gnome. I checked the DRM modes and edid info for the TV and am pretty sure that it doesn’t advertise these resolutions. Does gnome add these resolutions, and if so, why and where? I would be interested in adding an additional custom resolution if it can be done easily.

Thanks.

Additional information: Fedora 44, Gnome 50:


1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1600x1280
1600x1200
1600x900
1280x1024
1280x960
1280x720
1280x720
1280x720
1024x768
800x600
640x480
640x480

I see the same on my display: Settings lists some resolutions not in the EDID. I think those are common resolutions added by Mutter. They’re generated here: src/backends/native/gen-default-modes.py · main · GNOME / mutter · GitLab. All the extra resolutions I see in Settings are on that list.

At build time meson runs that script to create a meta-default-modes.h file which contains a meta_default_landscape_drm_mode_infos list with the generated info for these common resolutions.

Thanks for that! I will submit a feature request to see if the mutter team could possibly make this configurable

It was added with a clear reason, some displays only show their preferred mode in EDID not all the modes they support: monitor-manager-kms: Add common modes (9a076076) · Commits · GNOME / mutter · GitLab

Likely is too technical but maybe indicate in the list which are not reported by the display? Maybe an “🛈” to explain.

BTW all the extra modes work on my display.

All those extra modes work for me as well. My main motivation behind this question is if it would be possible to add additional modes (without recompiling mutter…) with custom resolutions for e.g. game streaming with Moonlight, which relies on modes advertised by mutter or EDID.

Currently, one can patch an EDID file with desired modes, but I was wondering how it was working from mutter since those extra modes didn’t exist on KDE, but your link cleared it up for me.

Ah apologies. I was too focused on finding out where these modes come from and forgot you wanted to know if there was a nice way to add more :wink: