jaumepi
Posts: 10
Joined: Thu Mar 12, 2020 5:32 pm

GPIO configuration on Ubuntu

Thu Apr 16, 2020 7:15 am

Hello, I turned from Raspbian to Ubuntu 19 32bit on my RPI4 because I need this distribution, downloaded officialy using the RPI Imager. I had a working pinout mapping on config.txt for the I2C and SPI display. Where is this config.txt file and how to map the GPIO in Ubuntu?
There is one config.txt file on /firmware/ path. Should I modify this file?
What are the proper steps to configure the GPIO? Thank you.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26442
Joined: Sat Jul 30, 2011 7:41 pm

Re: GPIO configuration on Ubuntu

Thu Apr 16, 2020 8:18 am

Although downloaded via Imager, this is not an official Raspberry Pi distribution - the only one of those is Raspbian. This distro is provided by Canonical - we just allow it to be installed via our system.

So your question has been moved to the Ubuntu forum, where hopefully an more experience Ubuntu person will see it. Alternatively, Canonical do have their own forums.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
waveform80
Posts: 359
Joined: Mon Sep 23, 2013 1:28 pm
Location: Manchester, UK
Contact: Website Twitter

Re: GPIO configuration on Ubuntu

Thu Apr 16, 2020 10:25 am

jaumepi wrote:
Thu Apr 16, 2020 7:15 am
Hello, I turned from Raspbian to Ubuntu 19 32bit on my RPI4 because I need this distribution, downloaded officialy using the RPI Imager. I had a working pinout mapping on config.txt for the I2C and SPI display. Where is this config.txt file and how to map the GPIO in Ubuntu?
There is one config.txt file on /firmware/ path. Should I modify this file?
What are the proper steps to configure the GPIO? Thank you.
Yup, the boot partition is mounted under /boot/firmware on Ubuntu (for ... reasons). You should be able to stick whatever you normally have in config.txt there (or syscfg.txt or usercfg.txt which are included from config.txt on our images - have a look in README if you want a run-down of the various files).
Author of / contributor to a few pi related things (picamera, Sense HAT emulator, gpio-zero, piwheels, etc.), and currently a software engineer at Canonical responsible for Ubuntu Server and Core on the Raspberry Pi.

jaumepi
Posts: 10
Joined: Thu Mar 12, 2020 5:32 pm

Re: GPIO configuration on Ubuntu

Fri Apr 17, 2020 2:32 pm

Thanks for the reply. I tried to modify firmware/config.txt, usrconfig.txt and also the config.txt at same location when havins raspi-config installed in Ubuntu Mate. Always the same result...
After modifiying the desired configuration and reboot, the RPI4 enter into a loop trying to boot: the color image blinks, and immediately turns off. Then boot again, a blink of the colored image, turn off... and so on.
The configuration works perfectly in Raspbian, and it looks like:

#i2c, i2s, spi... are deactivated

dtoverlay=i2c-gpio,bus=3,i2c_gpio_sda=23,i2c_gpio_scl=24,i2c_gpio_delay_us=2

# DPI Video Setup
dtoverlay=dpi18
overscan_left=0
overscan_right=0
overscan_top=0
overscan_bottom=0
framebuffer_width=854
framebuffer_height=480
enable_dpi_lcd=1
display_default_lcd=1
dpi_group=2
dpi_mode=87

dpi_output_format=458773
hdmi_timings=854 0 14 4 12 480 0 2 3 9 0 0 0 60 0 32000000 3

evdokimosk
Posts: 5
Joined: Wed Oct 16, 2019 10:59 am

Re: GPIO configuration on Ubuntu

Tue Apr 21, 2020 12:26 pm

Dear jaumepi,

I encountered the same issue after modifying the usrconfig.txt.
Have you found a solution to this?
Thanks for sharing in case you have a promising solution.

Evdokimos

jaumepi
Posts: 10
Joined: Thu Mar 12, 2020 5:32 pm

Re: GPIO configuration on Ubuntu

Thu Apr 23, 2020 7:03 pm

It's the same behaviour if config or usrconfig.txt, yes.
I think it's a general problem when you install ubuntu and quite easy to reproduce....
But no solution yet... Any help would be appreciated. Thanks

User avatar
waveform80
Posts: 359
Joined: Mon Sep 23, 2013 1:28 pm
Location: Manchester, UK
Contact: Website Twitter

Re: GPIO configuration on Ubuntu

Thu Apr 30, 2020 8:54 pm

jaumepi wrote:
Fri Apr 17, 2020 2:32 pm
Thanks for the reply. I tried to modify firmware/config.txt, usrconfig.txt and also the config.txt at same location when havins raspi-config installed in Ubuntu Mate. Always the same result...
After modifiying the desired configuration and reboot, the RPI4 enter into a loop trying to boot: the color image blinks, and immediately turns off. Then boot again, a blink of the colored image, turn off... and so on.
I have a nasty feeling this is a u-boot incompatibility with DPI displays. I've got one on order and will try and reproduce (and debug!) once it arrives. For now, do feel free to file a bug for this against the u-boot package on Launchpad and let me know the reference as this is definitely something we want to make sure works!

Thanks,

Dave.
Author of / contributor to a few pi related things (picamera, Sense HAT emulator, gpio-zero, piwheels, etc.), and currently a software engineer at Canonical responsible for Ubuntu Server and Core on the Raspberry Pi.

evdokimosk
Posts: 5
Joined: Wed Oct 16, 2019 10:59 am

Re: GPIO configuration on Ubuntu

Fri May 01, 2020 8:32 am

Dear Dave,

I have reported a bug as you suggested with the bug reference Bug #1876265

Hope this helps,
Evdokimos

User avatar
waveform80
Posts: 359
Joined: Mon Sep 23, 2013 1:28 pm
Location: Manchester, UK
Contact: Website Twitter

Re: GPIO configuration on Ubuntu

Fri May 01, 2020 10:41 am

evdokimosk wrote:
Fri May 01, 2020 8:32 am
Dear Dave,

I have reported a bug as you suggested with the bug reference Bug #1876265

Hope this helps,
Evdokimos
Excellent, thank you - that's going straight on the list of bugs I'm tracking this cycle. Will see what I can find out when the hardware arrives.
Author of / contributor to a few pi related things (picamera, Sense HAT emulator, gpio-zero, piwheels, etc.), and currently a software engineer at Canonical responsible for Ubuntu Server and Core on the Raspberry Pi.

evdokimosk
Posts: 5
Joined: Wed Oct 16, 2019 10:59 am

Re: GPIO configuration on Ubuntu

Sat May 23, 2020 11:42 am

Dear Dave,

as I am about to decide about a RPI 4 project between Raspbian or Ubuntu (I would like to use Ubuntu) where the DPI18 issue is critical, I would like to ask you if you have any time plan about the bug fix. My intention is not to push in anyway, but just to see if I should postpone my decision a bit more.

Thank you for you efforts,
Evdokimos



waveform80 wrote:
Fri May 01, 2020 10:41 am
evdokimosk wrote:
Fri May 01, 2020 8:32 am
Dear Dave,

I have reported a bug as you suggested with the bug reference Bug #1876265

Hope this helps,
Evdokimos
Excellent, thank you - that's going straight on the list of bugs I'm tracking this cycle. Will see what I can find out when the hardware arrives.

Return to “Ubuntu”