Score:1

Updating RaspberryPi 4b from Ubuntu Server 20.04 to 22.04 caused usercfg.txt to not be honored

cn flag

So I've been putting my HMDI output configuration in /boot/firmware/usercfg.txt

consoleblank=0
hdmi_group=1
hdmi_mode=95
dtoverlay=vc4-fkms-v3d
disable_overscan=1

After doing an in-place upgrade from focal to jammy it was only outputting 1920x1080

xrandr output showed:

$ xrandr -display :0
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 1920 x 1280, current 1920 x 1280, maximum 1920 x 1280
default connected 1920x1280+0+0 0mm x 0mm
   1920x1280      0.00*

After a while I figured that I would try to put my my config into /boot/firmware/config.txt (which as I understand we're not supposed to do), but I'm troubleshooting.

And after a reboot we're all set, and the xrandr output shows:

$ xrandr -display :0
Screen 0: minimum 320 x 200, current 3840 x 2160, maximum 7680 x 7680
HDMI-1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 1428mm x 803mm
   3840x2160     30.00*+  25.00    24.00    29.97    23.98
   4096x2160     30.00    25.00    24.00    29.97    23.98
   1920x1080     60.00    50.00    59.94    30.00    25.00    24.00    29.97    23.98
   1920x1080i    60.00    59.94
   1280x720      60.00    50.00    59.94
   1024x768      75.03    70.07    60.00
   800x600       72.19    75.00    60.32
   720x480       60.00    59.94
   720x480i      60.00    59.94
   640x480       75.00    60.00    59.94
   720x400       70.08

Any ideas on what's going on? Is this a bug? Is /boot/firmware/config.txt the correct place to put these configurations now?

TYIA

Score:1
in flag
slm

I noticed when I upgraded several RPi's from 20.04 to 22.04 LTS that the upgrade process "merged" /boot/firmware/config.txt and /boot/firmware/usercfg.txt into one file. The include lines were then removed. You could add them back like this to config.txt and reorganize things like so:

$ tail -10 config.txt

# The following settings are "defaults" expected to be overridden by the
# included configuration. The only reason they are included is, again, to
# support old firmwares which don't understand the "include" command.

enable_uart=1
cmdline=cmdline.txt

include syscfg.txt
include usercfg.txt

Then put the contents back into usercfg.txt. Additionally it would seem to be implied that in 22.04 the intention of having all the options in config.txt seems to be the direction. I couldn't find anything concrete saying this except in comments in articles such as this one - https://www.theredreactor.com/2022/10/14/ubuntu/.

Unlike the Raspberry Pi OS, which stores its config.txt file in the /boot directory, Ubuntu uses the /boot/firmware directory. However, although Ubuntu 20.04 advises to add user configurations to the usercfg.txt file, read by an include statement in config.txt, this is no longer the case for the 22.04 LTS 64-bit desktop release, and you can simply follow the instructions for adding the gpio-poweroff overlay in our instruction manual, using the /boot/firmware folder instead.

Chris Heath avatar
cn flag
thanks for the answer, basically what I already though/found...
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.