@usman_tahir880
Read this:
https://ubuntuforums.org/showthread.php?t=1947733
https://ubuntuforums.org/showthread.php?t=867506&page=2
https://wiki.ubuntu.com/X/Config/Resolution
I may be wrong, but from what I understand the problem is with "xorg.conf" (or its absence).
If so, these links will help:
https://fedoraproject.org/wiki/How_to_create_xorg.conf
https://askubuntu.com/questions/217758/how-to-make-an-xorg-conf-file
Read the information for all the links, and test the suggestions (make a backup of your image before, by security).
I do not have this problem, and I'm not a programmer, so I do not know the exact answer to your problem. So it is best that you test the options we are showing you, and give us feedback (positive or negative).