'GPIO not allocated' error for HyperPixel 4.0 on a raspberry pi 4B

I have flashed a fresh raspbian into the SD card of a 2018 raspberry pi 4B, running:

$ uname -a
Linux raspberrypi 6.18.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.18.34-1+rpt1 (2026-06-09) aarch64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 13 (trixie)
Release:	13
Codename:	trixie

After following the setup instructions from here:

… to setup the driver under /boot/firmware/config.txt like this:

...

[all]
dtoverlay=vc4-kms-dpi-hyperpixel4

… upon reboot, the HyperPixel 4.0 touchscreen doesn’t light up. The desktop, though, adopts the dimensions and resolution of the screen, as if it was working. I can see that via remote desktop (VNC).

I’ve checked the logs with journalctl for the hyperpixel4-init.service and I see this error, related to ‘GPIO not allocated’:

$ journalctl -xeu hyperpixel4-init.service

Jul 05 13:04:18 raspberrypi systemd[1]: Starting hyperpixel4-init.service - HyperPixel 4.0" LCD Display Initialization...
░░ Subject: A start job for unit hyperpixel4-init.service has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit hyperpixel4-init.service has begun execution.
░░ 
░░ The job identifier is 119.
Jul 05 13:04:19 raspberrypi hyperpixel4-init[825]: Traceback (most recent call last):
Jul 05 13:04:19 raspberrypi hyperpixel4-init[825]:   File "/usr/bin/hyperpixel4-init", line 241, in <module>
Jul 05 13:04:19 raspberrypi hyperpixel4-init[825]:     setup_pins()
Jul 05 13:04:19 raspberrypi hyperpixel4-init[825]:     ~~~~~~~~~~^^
Jul 05 13:04:19 raspberrypi hyperpixel4-init[825]:   File "/usr/bin/hyperpixel4-init", line 12, in setup_pins
Jul 05 13:04:19 raspberrypi hyperpixel4-init[825]:     GPIO.setup([CLK, MOSI, CS], GPIO.OUT)
Jul 05 13:04:19 raspberrypi hyperpixel4-init[825]:     ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jul 05 13:04:19 raspberrypi hyperpixel4-init[825]:   File "/usr/lib/python3/dist-packages/RPi/GPIO/__init__.py", line 704, in setup
Jul 05 13:04:19 raspberrypi hyperpixel4-init[825]:     initial = _check(lgpio.gpio_read(_chip, gpio))
Jul 05 13:04:19 raspberrypi hyperpixel4-init[825]:                      ~~~~~~~~~~~~~~~^^^^^^^^^^^^^
Jul 05 13:04:19 raspberrypi hyperpixel4-init[825]:   File "/usr/lib/python3/dist-packages/lgpio.py", line 903, in gpio_read
Jul 05 13:04:19 raspberrypi hyperpixel4-init[825]:     return _u2i(_lgpio._gpio_read(handle&0xffff, gpio))
Jul 05 13:04:19 raspberrypi hyperpixel4-init[825]:   File "/usr/lib/python3/dist-packages/lgpio.py", line 458, in _u2i
Jul 05 13:04:19 raspberrypi hyperpixel4-init[825]:     raise error(error_text(v))
Jul 05 13:04:19 raspberrypi hyperpixel4-init[825]: lgpio.error: 'GPIO not allocated'
Jul 05 13:04:19 raspberrypi systemd[1]: hyperpixel4-init.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ An ExecStart= process belonging to unit hyperpixel4-init.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
Jul 05 13:04:19 raspberrypi systemd[1]: hyperpixel4-init.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ The unit hyperpixel4-init.service has entered the 'failed' state with result 'exit-code'.
Jul 05 13:04:19 raspberrypi systemd[1]: Failed to start hyperpixel4-init.service - HyperPixel 4.0" LCD Display Initialization.
░░ Subject: A start job for unit hyperpixel4-init.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit hyperpixel4-init.service has finished with a failure.
░░ 
░░ The job identifier is 119 and the job result is failed.

Upon checking with raspi-config whether any interfaces are on, neither SPI nor I2C are activated: both are off.

There are 3 devices according to /dev/i2c :

$ ls /dev/i2c-*
/dev/i2c-20  /dev/i2c-21  /dev/i2c-22

The i2cdetect command shows the screen is detected:

$ i2cdetect -y 22
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

At this point I am out of ideas. What else can I do to avoid this error?

Thank you!