Check out my first novel, midnight's simulacra!

Waveshare AMOLED

From dankwiki

I am using a 5.5" Waveshare AMOLED capacitive screen in my workstation, together with a Raspberry Pi 3B. They are powered over USB from Molex, and receive data using IP-over-USB together with an internal USB3 header. It's a great little device at a good price point (about $130), though quite fragile.

The Waveshare wiki page for the device is a good place to start. The screen takes anywhere from 250 to 650mA, using more power to display lighter, brighter pixels.

Green LED

When the device is powered up, a green LED will blink if it is not receiving an HDMI signal. The manual only mentions that this can happen due to power supply issues, but that is incorrect (power supply issues can cause this symptom, but it can also simply be due to missing/bad HDMI input).

Raspbian

Add to config.txt:

max_framebuffer_height=1920
config_hdmi_boost=10
hdmi_group=2
hdmi_force_hotplug=1
hdmi_mode=87
hdmi_timings=1080 1 26 4 50 1920 1 8 2 6 0 0 0 60 0 135580000 3

When using the Libre Potato, the meson_dw_hdmi module must be blacklisted, or you'll get a black screen. This can probably be worked around, but I don't yet know how. Using the "fbdev" driver, you'll need a Rotate directive in xorg.conf to rotate the AML-S905X-CC Meson's Mali GPU (xrandr is not supported).

Console rotation

Write 1 to /sys/class/graphics/fbcon/rotate. To do it from the kernel, add fbcon=rotate:1 to the kernel command line; in Raspbian, this is done by editing /boot/firmware/cmdline.txt. This has no effect on Xorg.

Touch rotation

We can do it through Xorg: add the appropriate CalibrationMatrix to the touchscreen libevent stanza. For instance, rotate 90 degrees clockwise with Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1". But this will only work for X.

If we want to handle all libinput consumers (particularly Wayland), it's better to make a udev rule that sets ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1. You can test this by checking libinput list-devices | grep ^Calibration:.

Assembling front pane

USB hookups in brace
  • Insert AMOLED into brace by slowly pushing it down
  • Insert micro-USB touch input bridge into AMOLED
  • Mate Raspberry Pi to AMOLED via touch input bridge
  • Insert HDMI bridge into AMOLED and Raspberry Pi
  • Insert left-angled micro-USB cable into Raspberry Pi
  • Insert right-angled micro-USB connector into AMOLED
  • Insert straight micro-USB cable into connector
  • Insert Ethernet cable into Raspberry Pi
  • Mount with M2.5 screws
  • GPIO pin 6 (ground) to LED long leg
  • LED long leg to 330Ω resistor
  • Resistor to GPIO pin 12

Setup for Counterforce

  • We want automatic login to X. Potato uses LXDE by default.
    • $HOME/.config/lxsession/LXDE/autostart of the logged in user defines the Xsession.
    • Be sure to launch xscreensaver -no-splash to avoid AMOLED burnin