Dealing with custom resolutions on Linux.
Recently I've got a new LCD monitor+TV. Even though It worked without a problem in Windows, Ubuntu [16.04] failed to recognize it's native 1080p resolution. I've googled around and found a way to add a custom resolution using xrandr. But it didn't really worked for me. I've spent hours trying to figure this out and thought I should write this down on somewhere how I got this monitor to work on Ubuntu.
Basically what you have to do is open terminal and enter:
Copy the output after the Modeline and paste it after
As an example:
Then enter:
Finally:
After doing all that, your resolution should change to the resolution you add, but I've got an error instead; xrandr: Configure crtc 0 failed. I've spend a good day trying to fix that error and finally found what is the problem here. It's the refresh rate. So I've tried dialing down to 59.00 (hz) and got the resolution to work.
How to make those changes permanent (or rather, how to apply them on startup)
1) Follow this: http://askubuntu.com/questions/63681/how-can-i-make-xrandr-customization-permanent/69501#69501
2) In terminal:
3) Again in terminal:
And done! :)
Basically what you have to do is open terminal and enter:
$ cvt 1024 768 60 // horizontal-resolution vertical-resolution refresh-rate
which will give you a result like this:# 1024x768 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1024x768_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
Copy the output after the Modeline and paste it after
xrandr --newmode
As an example:
$ xrandr --newmode "1024x768_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
Then enter:
$ xrandr --addmode VGA1 1024x768_60.00 // replace VGA1 with your interface
Finally:
$ xrandr --output VGA1 --mode 1024x768_60.00
After doing all that, your resolution should change to the resolution you add, but I've got an error instead; xrandr: Configure crtc 0 failed. I've spend a good day trying to fix that error and finally found what is the problem here. It's the refresh rate. So I've tried dialing down to 59.00 (hz) and got the resolution to work.
How to make those changes permanent (or rather, how to apply them on startup)
1) Follow this: http://askubuntu.com/questions/63681/how-can-i-make-xrandr-customization-permanent/69501#69501
2) In terminal:
$ touch .xinitrc
$ nano .xinitrc
// Add three commands that used to change the resolution.
$ xrandr --newmode "1024x768_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
$ xrandr --addmode VGA1 1024x768_60.00
$ xrandr --output VGA1 --mode 1024x768_60.00
// CTRL+O and enter to save, CTRL+X to exit.
3) Again in terminal:
$ sudo touch /usr/share/xsessions/custom.desktop
$ sudo nano/usr/share/xsessions/custom.desktop
// Enter following lines and CTRL+O to save and CTRL+X to exit.
[Desktop Entry]
Name=Xsession
Exec=/etc/X11/Xsession
And done! :)
Great job malli :-)
ReplyDelete