If you have some Raspberry PI's running Ubuntu Server 20.04 connected to a flatpanel monitor, here are the steps to configure the screen resolution. In my monitor, the default Ubuntu is selecting is terrible looking and impossible to read. It is even worse at odd angles.
Check out this raspberry pi site for video resolutions. Based on my setup...
- I have Ubuntu 20.04 running on a RPI3B+
- I would like 1920x1080 for a 60Hz display. I have an LG 24" monitor
- Reading my monitors documentation, I know this is the max safe resolution
- My monitor is connected by an HDMI cable and is digital
To see what the current command line parameters are set to for kernel boot run the following
$ cat /proc/cmdline
In there you will see ...video=HDMI-A-1:1680x1040M@60 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000...
along with other details. The video
paramber is the part of interest.
To fix this, use the link above to find the correct hdmi_group
and hdmi_mode
FOR YOUR MONITOR SETUP. DO NOT USE MINE BECAUSE YOUR MONITOR MAY NOT SUPPROT THE SAME RESOLUTIONS AS THIS ONE
$ sudo vi /boot/firmware/usercfg.txt
Add or edit the following two lines where your hdmi_group
and hdmi_mode
are compatible with your monitor....
hdmi_group=2
hdmi_mode=82
hdmi_mode | Resolution | Frequency | Screen Aspect | Notes |
---|---|---|---|---|
82 | 1920x1080 | 60Hz | 16:9 | 1080p |
There are two groups where one is for TVs and the other is for monitors. The list of hdmi_modes
is for a specific hdmi_group
so mode 40
for group 1
is not the same as mode 40
for group 2
.
Save and sudo shutdown -r now
.
Watch the boot sequence and see if the screen looks the way you are hoping. In my case fuzzy became clear. You can play with the resolution to optimize (my goal) the screen or increase the size of the text.