Fedora 40 Xfce display settings: cannot change screen resolution

I’m using Fedora 40 with Xfce, fully updated. I can change screen resolution using xrandr, but not with xfce4-display-settings (i.e. Applications->Settings->Display). The same supported screen resolution are listed both in xrandr and xfce4-display-settings, but when I select one in the latter and click on Apply, I get the dialog asking whether I want to maintain the new configuration, but the screen resolution is not changed.

Is this a bug in xfce4-display-settings or a configuration problem? Is there anything I can try in order to solve the problem or at least to better diagnose it?

Thank you in advance!

The resolution is stored in the file .config/xfce4/xfconf/xfce-perchannel-xml/displays.xml. You can check if that file is updated when you set the resolution.
If not, check its permission.

On my system I set the resolution with the file /etc/X11/xorg.conf.d/50-mode-1280x720.conf with the contents

# Set default screen resolution.

Section "Screen"
    Identifier    "Default Screen"
    SubSection    "Display"
        Modes    "1280x720"
    EndSubSection
EndSection

This would still work as long as xfce is using xorg.

The file .config/xfce4/xfconf/xfce-perchannel-xml/displays.xml is updated when I change the settings in xfce4-display-settings, however the setting still has no effect.

If I change resolution but select to return to the previous configuration in the confirmation dialog, this results in the new/rejected resolution being set in displays.xml and not the current/previous/unchanged one.

If I (successfully) change the resolution with xrandr and then open xfce4-display-settings, it shows the correct resolution, even if the displays.xml file has not been updated. If I then select the maximum/default resolution for my screen in xfce4-display-settings and click on Apply, the resolution is correctly changed (and the displays.xml file is correcly updated).

Anything else I could check/try?

Thanks also for the hint on setting the resolution with /etc/X11/xorg.conf.d/. However that does not apply to my use case: I’m usually happy with the default/maximum resolution, but now and then I need to connect to an additional display with a lower maximum resolution and I need to mirror the screens using the same resolution on both.