5

I know this question has been asked at least twice, but I downloaded the 64-bit version of Ubuntu onto my Raspberry Pi 4. I looked at a few tutorials but I couldn't find anything that worked for changing my screen resolution. It decided to set my resolution to 1824 x 984 (9:5) I have no clue how to fix this. Could the smart people of AskUbuntu please help me? I have the official version from the Ubuntu website. I have used lsb_release -a to find my version and it says I'm using Ubuntu 18.04.4 LTS. I have used xrandr but the results are very strange:

ubuntu@ubuntu:~$ xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1824 x 984, current 1824 x 984, maximum 1824 x 984
default connected primary 1824x984+0+0 0mm x 0mm
   1824x984       0.00* 
ubuntu@ubuntu:~$ xrandr --output default --mode 1920x1080
xrandr: cannot find mode 1920x1080

What do I write as the display? I have never used Ubuntu before and help would be appreciated. I don't even know how to change the file /boot/firmware/usrconfig.txt

1
  • Please click edit to let us know which release number? Please do not use Add Comment; Comments are a channel from us to you, whereas the Question should contain all the facts you have about the issue.
    – K7AAY
    Mar 8, 2020 at 22:57

2 Answers 2

10

I had this problem and this is how I fixed it. Open a terminal window and type

    nano /boot/firmware/usercfg.txt 

(note you will need to run it with sudo, alternatively use any text editor). Then you can add the settings to set display resolution. Mine looks like this:

    # Place "config.txt" changes (dtparam, dtoverlay, disable_overscan, etc.) in
    # this file. Please refer to the README file for a description of the variouszn

    # configuration files on the boot partition.

    [HDMI:0]
    hdmi_group=2
    hdmi_mode=82
    hdmi_drive=2

    [HDMI:1]
    hdmi_group=2
    hdmi_mode=82
    hdmi_drive=2

Note the two groups HDMI:0/1 this is because RiP4 has two hdmi outputs and they can be configured individually. Also see that the hdmi_group=2 refers to computer monitors, 1 would be for television screens. hdmi_mode=82 refers to my resolution which is 1080p 60Hz. To find a full list of mode numbers that corresponds to resolutions and rates, you can go here:

https://www.raspberrypi.org/documentation/configuration/config-txt/video.md

Refer to hdmi_mode section.

Once these changes are made, you can restart.

3
  • This doesn't work for me. I had to use xrandr add mode and newmode calls to add a new resulution and activate it.
    – bre_dev
    May 27, 2021 at 17:47
  • Worked, but the display contrast became low. The background black turned into a white-ish black, and I haven't understood why. Maybe something to do with scaling? Anyone know?
    – KIYZ
    Jan 25 at 4:03
  • Can confirm this solution still works for Ubuntu 20.04.
    – wyphan
    Mar 11 at 21:31
0

You can use:

% xrandr -q  

to list the available modes to pick from.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.