Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReTerminal Debian support #38

Open
EverythingSmartHome opened this issue Mar 31, 2022 · 18 comments
Open

ReTerminal Debian support #38

EverythingSmartHome opened this issue Mar 31, 2022 · 18 comments

Comments

@EverythingSmartHome
Copy link

I am trying to get Debian to load on the ReTerminal rather than Ubuntu (which I see there is already workarounds for).

I have tried installing Debian 11 Bullseye using both the tested image and daily images, and I can boot the ReTerminal, it gets stuck not being able to load bluetooth and network, and then lands me at the login screen...great!

The issue is that I have no USB and so I can't login, and since there is no network I can't SSH either. I think if I could actually login to the CM4 I might have a chance of fixing it, but as of now I'm out of ideas.

Any tips/suggestions?

(I know I could use Ubuntu or another, but I have an application that requires Debian 11)

@bigbearishappy
Copy link
Member

The latest firmware of raspberrypi official firmware is already the bullseye. you can download and try it with this link.

@bigbearishappy
Copy link
Member

Also, you can try to use a usb-to-serial to connect you CM4. Just use the uart to login.

@EverythingSmartHome
Copy link
Author

Thank you - I have no idea why I didn't think of that, looking at it for too long!

I was able to login with the serial, the only thing that didn't work was that serial would load as normal till near the end, then suddenly the output would become garbled. I saw this note on the Debian page:

On a Raspberry Pi 4B 4G with bullseye/linux 5.10.13-1, the serial stopped working after the vc4 module was loaded. As a workaround, add module_blacklist=vc4 to the command line to make it work

So I mounted the ReTerminal to my Linux desktop (Windows cannot read the main partition) and then under /etc/modprobe.d/ I created a file called blacklist.conf and inside added the line:

blacklist vc4

Booted it back up and then I was able to login. The problem now is that the ethernet port or wifi is not working - any tips or suggestions there?

@EverythingSmartHome
Copy link
Author

Managed to get Wifi working which is very handy! So I then tried to install the drivers using these instructions:

https://wiki.seeedstudio.com/reTerminal/#install-reterminal-drivers-after-flashing-new-raspberry-pi-os-ubuntu-os-or-other-os

After quite a few errors I managed to get it to exit successfully, however on reboot the display still does not work.

Would appreciate if you have any insight!

Thanks

@bigbearishappy
Copy link
Member

you can first check the dmesg to see if the LCD driver is working, following is the normal work log:

pi@raspberrypi:~ $ dmesg | grep "mipi_dsi\|DSI"
[    6.576059] [DSI]i2c_md_init:
[    6.576246] [DSI]i2c_md_probe:start
[    6.624217] i2c_mipi_dsi 1-0045: I2C read id: 0xc3
[    6.629237] [DSI]mipi_dsi_device:
[    6.888689] [DSI]i2c_md_probe:finished.
[    6.889784] [DSI]mipi_dsi_probe:
[    6.919745] [DSI]panel_prepare:
[    6.981697] [DSI]ili9881d_prepare:
[    7.109738] [DSI]panel_enable:

If not.You need to check if the dtbo file is in the right place(reTerminal.dtbo in /boot/overlays/).
And you need to check the config.txt to see if there is the following code in it:

dtoverlay=reTerminal

What's more. You need to check if the mipi_dsi.ko can be found in the following directory:

/lib/modules/`uname -r`

@franzos
Copy link

franzos commented Apr 18, 2022

I can confirm that this worked probably a month ago, when I last created an image for reTerminal with Debian 11 Bullseye. However, after a recent apt update && apt upgrade, and re-running the scripts from here, the display stopped working.

@bigbearishappy following your notes, I found a curious error:

$ dmesg | grep "mipi_dsi\|DSI"
[    6.248742] [DSI]i2c_md_init:
[    6.249014] [DSI]i2c_md_probe:start
[    6.252887] i2c_mipi_dsi 1-0045: I2C read id: 0xc3
[    6.254866] [DSI]mipi_dsi_device:
[    6.353287] [DSI]i2c_md_probe:finished.
[    6.365518] [DSI]mipi_dsi_probe:
[    6.592147] mipi_dsi fe700000.dsi.0: failed to attach dsi to host: -517
[    6.674595] [DSI]mipi_dsi_probe:
[    6.909334] [DSI]panel_prepare:
[    6.964558] [DSI]ili9881d_prepare:
[    7.972581] [drm:vc4_dsi_host_transfer [vc4]] *ERROR* DSI transfer failed, resetting: -110
[    7.972670] [DSI]ili9881d_prepare:No LCD connected,pls check your hardware!
[    7.978750] [DSI]panel_enable:

The /boot/config.txt remains unchanged and lists:

...
dtoverlay=reTerminal
dtoverlay=reTerminal-bridge

and the mentioned mipi_dsi.ko exists too:

/lib/modules/5.15.32-v8+/updates/dkms/mipi_dsi.ko

EDIT: I restored my previous image and the image works as expected.

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

This is on an older kernel:

Linux raspberrypi 5.10.92-v8+ #1514 SMP PREEMPT Mon Jan 17 17:39:38 GMT 2022 aarch64 GNU/Linux

No problem with the display:

dmesg | grep "mipi_dsi\|DSI"
[    6.225073] [DSI]i2c_md_init:
[    6.225310] [DSI]i2c_md_probe:start
[    6.247426] i2c_mipi_dsi 1-0045: I2C read id: 0xc3
[    6.249175] [DSI]mipi_dsi_device:
[    6.343135] [DSI]i2c_md_probe:finished.
[    6.343617] [DSI]mipi_dsi_probe:
[    6.411230] [DSI]panel_prepare:
[    6.467040] [DSI]ili9881d_prepare:
[    6.595071] [DSI]panel_enable:

@EverythingSmartHome
Copy link
Author

@franzos Thanks for your input, certainly helps. In my case, when I run the first script and reboot, the machine never comes back on, even when connected via serial - no network connection either.

Do you have any tips for specifying which kernel to use when building?

@franzos
Copy link

franzos commented Apr 18, 2022

@EverythingSmartHome what do you mean by "never comes back on"? There's no serial output at all?

Double-check that you have these in the config:

enable_uart=1
uart_2ndstage=1

In any case, there should be some debug logs; At least early firmware?

@EverythingSmartHome
Copy link
Author

@franzos Before running the script [here](wget https://files.seeedstudio.com/wiki/ReTerminal/ubuntu/script1.sh), everything works except the display (serial works, Wifi works), then when I run the script and reboot as per the instructions, I get no serial output and no network connectivity - almost like the machine can no longer boot, but I can't get a display out to verify.

Uart and serial was enabled in the config.txt and cmdline.txt files but I didn't check the uart_2ndstage line, I will try that.

@franzos
Copy link

franzos commented Apr 18, 2022

@EverythingSmartHome I never tried that. This is what I'm using:

git clone --depth 1 https://github.com/Seeed-Studio/seeed-linux-dtoverlays
cd seeed-linux-dtoverlays
sudo ./scripts/reTerminal.sh

@n7ihq
Copy link

n7ihq commented Apr 25, 2022

I can confirm that this worked probably a month ago, when I last created an image for reTerminal with Debian 11 Bullseye. However, after a recent apt update && apt upgrade, and re-running the scripts from here, the display stopped working.

I had the same problem booting with a blank screen after updating Raspberry Pi OS Bullseye. I flashed Raspberry Pi OS version 2022-01-28-raspios-bullseye-arm64.img. Running scripts/reTerminal.sh updated the kernel to 5.15. How did you
restore your previous image?

Jim

@lakshanthad
Copy link
Contributor

lakshanthad commented Apr 25, 2022

Hello everyone,

The problem is that, LCD driver does not work well with the latest kernel 5.15. I have raised this issue and assigned our Software Enginner in charge of reTerminal to fix it. The issue happens after running the reTerminal.sh script.
#40
Please wait patiently until it is fixed.

For now, please stick with the factory images available here:
https://wiki.seeedstudio.com/reTerminal-FAQ/#q2-how-can-i-flash-raspberry-pi-os-which-is-originally-shipped-with-reterminal

Or else, you could switch to kernel 5.10.x and try. Because it worked well before for kernel 5.10.x.

Best Regards,
Lakshantha

@EverythingSmartHome
Copy link
Author

Thanks for the update, looking forward to the fix!

@lakshanthad
Copy link
Contributor

lakshanthad commented May 5, 2022

Hello everyone,

reTerminal LCD is working fine now with the latest Bullseye (kernel 5.15) release:
#41

After the above PR, there was a new issue and it is also fixed now:
#43

Please check and close this PR if everything works as expected.

Thank you.

Best Regards,
Lakshantha

@franzos
Copy link

franzos commented May 5, 2022

@lakshanthad thanks for your quick follow-up! It's working as expected.

Linux raspberrypi 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux

@EverythingSmartHome
Copy link
Author

@lakshanthad thanks for your quick follow-up! It's working as expected.

Linux raspberrypi 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux

Did you just install Debian, connect via serial and run the ReTerminal script 1 and 2 to get it working? About to test!

@franzos
Copy link

franzos commented May 5, 2022

@EverythingSmartHome I upgraded an existing, working system.

You're still stuck on the black screen, huh? I suppose this should work:

  1. Login via SSH/UART
  2. Update the repository seeed-linux-dtoverlays from master
  3. Run the script sudo ./scripts/reTerminal.sh

Reboot

@lakshanthad
Copy link
Contributor

@EverythingSmartHome Is everything working for you now?

If yes, this PR can be closed.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants