hyperpixel4
hyperpixel4 copied to clipboard
Hyperpixel4 and 64-bit Ubuntu
Hi all,
I understand that 64-bit Ubuntu Server is not supported, but just wanted to understand if it is possible to fix the issue below. I installed hyperpixel4 -b 64bit-beta drivers and managed to get to a point where the driver seems to be loading, the touch is working and there is video output, but there seems to be some issues with timings? Or maybe something more advanced? Thanks
config.txt
arm_64bit=1 device_tree_address=0x03000000 #dtoverlay=vc4-kms-v3d dtoverlay=hyperpixel4 #gpio=0-25=a2 #gpio=19=op,dh #overscan_left=0 #overscan_right=0 #overscan_top=0 #overscan_bottom=0 #framebuffer_width=800 #framebuffer_height=480 enable_dpi_lcd=1 display_default_lcd=1 dpi_group=2 dpi_mode=87 dpi_output_format=0x7f216 dpi_timings=480 0 10 16 59 800 0 15 113 15 0 0 0 60 0 32000000 6
I'm afraid I'm totally at a loss here. I've never seen a display so completely whacky. I recognise some Ubuntu-ish colours in there... but that's about it.
Do you have a link to the OS image you used? I could at least try to duplicate this.
I used the latest image from Raspberry Pi Imager - 64-bit Server 20.04.1 LTS with 5.4 kernel. I did a fresh installation, added RPi.GPIO and turned off I2C, SPI and UART in syscfg.txt. I had to manually add config lines from install.sh (-b pi4-64bit-beta) to config.txt and everything seems to be working pretty much out of the box - the screen and touch are responding, but the actual video output is messy. I tried using the hyperpixel4-init code from other branches, but it had no impact.
Did you install a desktop environment?
Yes, I tried ubuntu-desktop and ubuntu-unity-desktop on different installations with lightdm. Same result.
Oh boy I'm not getting very far very quickly with this. The installer is so broken on Ubuntu that I'm surprised you're getting anywhere.
I'm just passed the hyperpixel-init-being-broken stage 😆 and built the libgpio init instead. The libgpiod version should work, though it's missing the latest init tweaks.
Installing ubuntu-desktop because I'm presently seeing nothing on the display.
Okay genius me didn't disable i2c, spi and UART- really off to a good start!
Now I am seeing a desktop login prompt!
Here's my config:
cat /boot/firmware/config.txt
# Please DO NOT modify this file; if you need to modify the boot config, the
# "usercfg.txt" file is the place to include user changes. Please refer to
# the README file for a description of the various configuration files on
# the boot partition.
# The unusual ordering below is deliberate; older firmwares (in particular the
# version initially shipped with bionic) don't understand the conditional
# [sections] below and simply ignore them. The Pi4 doesn't boot at all with
# firmwares this old so it's safe to place at the top. Of the Pi2 and Pi3, the
# Pi3 uboot happens to work happily on the Pi2, so it needs to go at the bottom
# to support old firmwares.
[pi4]
kernel=uboot_rpi_4.bin
max_framebuffers=2
[pi2]
kernel=uboot_rpi_2.bin
[pi3]
kernel=uboot_rpi_3.bin
[all]
arm_64bit=1
device_tree_address=0x03000000
# 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
dtoverlay=hyperpixel4
enable_dpi_lcd=1
dpi_group=2
dpi_mode=87
dpi_output_format=0x7f216
dpi_timings=480 0 10 16 59 800 0 15 113 15 0 0 0 60 0 32000000 6
cat /boot/firmware/syscfg.txt
# This file is intended to be modified by the pibootctl utility. User
# configuration changes should be placed in "usercfg.txt". Please refer to the
# README file for a description of the various configuration files on the boot
# partition.
enable_uart=0
dtparam=audio=on
dtparam=i2c_arm=off
dtparam=spi=off
cmdline=cmdline.txt
I'm using the init from the pi4-libgpiod branch. You'll need libgpiod2
and libgpiod-dev
to compile it.
Touch presently not working- so might have to use the touch fix branch.
Thanks a lot for checking. Turns out it was a hardware issue. I got a replacement today and tried the 64bit-beta branch again. Everything works well - display, rotation and touch. Install.sh is broken, but it is easy to fix -> manually add lines to config.txt and install RPio and python-is-python3 packages. Just in case, decided to use hyperpixel4-init from the pi4 branch.
Hello @Gadgetoid It's great to see your Ubuntu booting screen. I would like to know if you can share with us which Image you used and steps you take in order to reach to that config. Thanks very much!
Hello,
I managed to get the installer script to work on a fresh install of Ubuntu Mate 64-bit 20.04.1. my changes can be found here: https://github.com/Arudinne/hyperpixel4/tree/pi4-ubuntu-mate
The following packages needed to be installed via apt-get first:
rpi.gpio python-is-python3 arandr
The only thing that doesn't seem to work as it should is restoring the LCD's rotation after a reboot (touch screen config seems fine). I thought I managed to resolve that by adding the following line to /etc/lightdm/lightdm.conf:
display-setup-script=/usr/share/dispsetup.sh
but upon testing with a clean install the pi seems stuck in a boot loop after I added that line. Everything else worked before that.
Apologies if any of this isn't exactly best practice, I'm not really a Linux expert, I know just enough to break stuff.
Edit; I did another clean install and the edit to /etc/lightdm/lightdm.conf seems to be working as it should. I must have messed something else up elsewhere.
I had the same issue when I compiled a 32bit driver (pi4 branch) for 64-bit Ubuntu Server. I used the 64bit-beta branch and replaced the content of hyperpixel4-init from the pi4 branch. Also, I made same changes as @Gadgetoid in config files (config.txt and usercfg.txt). There are still some issues (see screenshots below), but not sure whether they are software or hardware related.
Here is my setup. I only tested the 64-bit server image.
- Ubuntu 20.04.1 LTS 64-bit installed through Raspberry Imager
- Sudo apt-get update & upgrade to 5.4-raspi-1016 kernel
- Install rpi.io and python-is-python3
- Desktopify —en ubuntu
- Hyperpixel4 -b 64bit-beta branch
- Edit manually configs and copy the compiled driver in firmware/overlays
- Replace the content of hyperpixel4-init from the pi4 branch (original also works, but output is a bit noisy)
- All seems to work ok in the portrait mode, but couldn’t get the touch work correctly in other orientations. I think Ubuntu uses another default driver for Goodix. I think it can be fixed easily, but not sure what to do about the issues below:
I started with the pi4-i2c-fix branch and had zero issues with the touchscreen that I could see.
I do seem to have that corona around the LCD even after shutting it down (While power is still applied). I just installed the 32-bit version of Raspberry Pi OS using the imager and ran the installer (pi4-i2c-fix) and it seems fine now so it doesn't seem like a hardware issue.
I tried following the steps some of you did, but could see either the ubuntu login screen or anything else...
El mié., 2 sept. 2020 a las 9:57, Arudinne ([email protected]) escribió:
I started with the pi4-i2c-fix branch and had zero issues with the touchscreen.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pimoroni/hyperpixel4/issues/95#issuecomment-685717681, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGURAAXEISNUW2FI4LHIQLSDY6MLANCNFSM4QGEQDEQ .
-- Ezequiel L. Aceto https://eaceto.dev Skype: ezequiel.aceto - Twitter: @eaceto_dev
Just wanted to mention that I've had a good experience with this display + Pi 400 + Ubuntu 20.10 + Phosh + Wayland.
The orientation and scale can be set through the UI or from the command line via: wlr-randr --output DSI-1 --scale 1 --transform 90
. Touch follows the rotation correctly.
Great! Which branch are you using? Is Ubuntu 64bits?
On Sun, 29 Nov 2020 at 17:07 Michael Mogenson [email protected] wrote:
Just wanted to mention that I've had a good experience with this display + Pi 400 + Ubuntu 20.10 + Phosh + Wayland.
The orientation and scale can be set through the UI or from the command line via: wlr-randr --output DSI-1 --scale 1 --transform 90. Touch follows the rotation correctly.
[image: phosh] https://user-images.githubusercontent.com/900731/100552243-f5a77980-3253-11eb-80b8-dbe79b2dda33.jpg
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pimoroni/hyperpixel4/issues/95#issuecomment-735446448, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGURAAVMH3GIF2X5766LQ3SSKSWJANCNFSM4QGEQDEQ .
-- Ezequiel L. Aceto https://eaceto.dev Skype: ezequiel.aceto - Twitter: @eaceto_dev
Yep.
That's bloody brilliant! Would you mind share the full how-to with us?
On Sun, 29 Nov 2020, 17:20 Michael Mogenson, [email protected] wrote:
Yep.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pimoroni/hyperpixel4/issues/95#issuecomment-735448085, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGURAEH42M56XE6TPIEJPTSSKUJHANCNFSM4QGEQDEQ .
I just got this up and running after quite a bit of time and wanted to share my steps in case it could help others.
Goal: Cyberdeck with Raspi400 & hyperpixel4 touch with Ubuntu Desktop (21.10) I started with a fresh ubuntu install from the raspi imager, and below are all the steps that I think you would need to do to get a successful install.
Some prerequisites:
sudo apt-get update
sudo apt-get upgrade #this was important to get the i2c to work correctly
sudo apt get install rpi.gpio python-is-python3
-
The advertised instructions (
curl https://get.pimoroni.com/hyperpixel4 | bash
) will not work with ubuntu, probably for lots of reasons, but least of all is that your config file is in/boot/firmware/config.txt
instead of/boot/config.txt
. -
Get a copy (either clone or download zip) of the install files (for me it was a1fcf3f7) and update the directories for configs and overlays in the
install.sh
. Alternatively you could just run the commands, your call. The main things you need are to copy over the lines for your config file, and get the overlay built and moved to/boot/firmware/overlays
-
trying to debug the init.sh script also let me to adding my user to the
dialout
group.sudo adduser tristansokol dialout
. I think this needs a restart after. You can verify your user's groups withgroups tristansokol
(where tristansokol is obviously my username) -
Around this time I believe I had the screen partially working, the screen was blank (backlit black) but the touch functionality worked.
hyperpixel-init
would run without errors, but nothing changed with the screen. -
The last change I made was replacing
dtoverlay=vc4-kms-v3d
withdtoverlay=vc4-fkms-v3d
in the config file. I have no clue what that does, but I noticed the difference when trying the rotate command.
/boot/firmware/config.txt
[pi4]
max_framebuffers=2
[all]
kernel=vmlinuz
cmdline=cmdline.txt
initramfs initrd.img followkernel
# Enable the audio output, I2C and SPI interfaces on the GPIO header
dtparam=audio=on
dtparam=i2c_arm=on
dtparam=spi=on
# Enable the KMS ("full" KMS) graphics overlay, and allocate 128Mb to the GPU
# memory. The full KMS overlay is required for X11 application support under
# wayland
dtoverlay=vc4-fkms-v3d
gpu_mem=128
# Uncomment the following to enable the Raspberry Pi camera module firmware.
# Be warned that there *may* be incompatibilities with the "full" KMS overlay
#start_x=1
# Comment out the following line if the edges of the desktop appear outside
# the edges of your display
disable_overscan=1
# If you have issues with audio, you may try uncommenting the following line
# which forces the HDMI output into HDMI mode instead of DVI (which doesn't
# support audio output)
#hdmi_drive=2
# If you have a CM4, uncomment the following line to enable the USB2 outputs
# on the IO board (assuming your CM4 is plugged into such a board)
#dtoverlay=dwc2,dr_mode=host
# Config settings specific to arm64
arm_64bit=1
dtoverlay=dwc2
#https://github.com/pimoroni/hyperpixel4/issues/95
enable_uart=0
dtparam=audio=on
dtparam=i2c_arm=off
dtparam=spi=off
dtoverlay=hyperpixel4
enable_dpi_lcd=1
dpi_group=2
dpi_mode=87
dpi_output_format=0x7f216
dpi_timings=480 0 10 16 59 800 0 15 113 15 0 0 0 60 0 32000000 6
This got me to a screen that worked, but was the incorrect cyber deck rotation. I tried arandr
and wlr-randr
as both are mentioned above but arandr just didn't seem to work, or apply changes and the other complained about wlr-output-management-unstable-v1 not being implemented. I ended up just rotating under settings in ubuntu GUI.
Also it wasn't obvious to me reading some of the debugging tips but when you run ls /dev/i2c-*
you should see a device like /dev/i2c-22
Other issues that helped me #167 #111,
Wow! Congrats!!! hope this can get into the official doc!
For what it is worth I got it to work on Ubuntu 22.04.1 64bit (including rotation) with help from Tristan above (thanks a lot) and another forum thread focusing on Raspberry Pi OS. Here is what worked for me:
It is important to update-upgrade before updating config.txt, otherwise it will be overwritten (which I learned the hard way):
sudo apt update
sudo apt upgrade
sudo adduser pi dialout
sudo apt install rpi.gpio-common python-is-python3
sudo nano /boot/firmware/config.txt
Change these lines:
dtparam=i2c_arm=off
dtparam=spi=off
Add these lines at the end of the file:
# Hyperpixel4
dtoverlay=vc4-kms-dpi-hyperpixel4
dtparam=rotate=270,touchscreen-swapped-x-y,touchscreen-inverted-x
Save, reboot and it works...
For what it is worth I got it to work on Ubuntu 22.04.1 64bit (including rotation) with help from Tristan above (thanks a lot) and another forum thread focusing on Raspberry Pi OS. Here is what worked for me:
It is important to update-upgrade before updating config.txt, otherwise it will be overwritten (which I learned the hard way):
sudo apt update sudo apt upgrade
sudo adduser pi dialout sudo apt install rpi.gpio-common python-is-python3
sudo nano /boot/firmware/config.txt
Change these lines:
dtparam=i2c_arm=off dtparam=spi=off
Add these lines at the end of the file:
# Hyperpixel4 dtoverlay=vc4-kms-dpi-hyperpixel4 dtparam=rotate=270,touchscreen-swapped-x-y,touchscreen-inverted-x
Save, reboot and it works...
did you get the login screen to rotate?