You cannot set a custom resolution using XRANDR on Ubuntu 22.04 since it uses WAYLAND by default. To set a custom resolution and refresh rate, a video display mode is added to grub file.
STEPS
1. Open terminal and enter command ` ls /sys/class/drm `
2. Get the name of the display with the
3. Enter ` sudo gedit /etc/default/grub `
4. Look for the line "GRUB_CMDLINE_LINUX_DEFAULT" and add your custom resolution using the syntax video=display_name:custom_resolution@refresh_rate
5. Save file and run command ` sudo update-grub`
5. Reboot and set custom resolution in display settings.
Resources:
1. [ Ссылка ]
Ещё видео!