Sat 5th June 2021 By David T. Sadler.
After updating a laptop to Ubuntu 20.04 I found that the resolution of the display was fixed at 1024x1028 with no option in the settings for changing it to correct resolution of 1368x768.
Now normally I would fall back on using the xrandr command to add the missing resolution.
First the output of cvt command gives me the VESA CVT mode lines for the resolution and refresh rate.
$ cvt 1366 768 60 Modeline "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
This mode is then added with xrandr.
$ xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
The mode can then be associated with the display.
$ xrandr --addmode default 1368x768_60
Like I said, normally this is all that is required but in this instance the xrandr command kept displaying the below message and the desired resolution would not be applied.
xrandr: Failed to get size of gamma for output default
After several fruitless attempts at fixing this I eventually found that the nomodeset kernel boot option had been set. This instructs the kernel to not load any video drivers and instead use BIOS modes. Apparently many open source drivers have removed support for non-kernel modes and fall back to using a very basic VESA driver. I'm assuming this basic driver does not support the resolution I want.
With further investigation I found that nomodeset was been specified via grub so removing it meant re-configuring grub by editing /etc/default/grub.
$ sudo vim /etc/default/grub
In this file I located the below line.
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
I edited this line to remove nomodeset and saved the changes.
Now all I needed to do was update grub with the new default settings.
$ sudo update-grub
After a reboot the laptop was using the correct resolution and there was no need to use xrandr.
I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.Email firstname.lastname@example.org
Copyright © 2021 David T. Sadler.Return to Homepage.