How to make a xorg.conf file

1. Find an active display

w

…. or

ps axu | grep "X "

You need to run configuration on the inactive display like :1

2. Run configuration

sudo Xorg :1 -configure

3. Copy settings to the /etc/X11

sudo cp /root/xorg.conf.new /etc/X11/xorg.conf

4. Reboot

If the settings does not work, remove /etc/X11/xorg.conf file.

Read also: https://puolanka.info/goto/how-to-manipulate-resolution-if-xrandr-fails-to-see-output/