Waveshare AMOLED: Difference between revisions

No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 7: Line 7:


==Raspbian==
==Raspbian==
Add to <tt>config.txt</tt>:
<pre>
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
</pre>


When using the [[Potato|Libre Potato]], the <tt>meson_dw_hdmi</tt> 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 <tt>Rotate</tt> directive in <tt>xorg.conf</tt> to rotate the AML-S905X-CC Meson's Mali GPU (<tt>xrandr</tt> is not supported).


==Console rotation==
==Console rotation==
Write 1 to <tt>/sys/class/graphics/fbcon/rotate</tt>. To do it from the kernel, add <tt>fbcon=rotate:1</tt> to the kernel command line; in Raspbian, this is done by editing <tt>/boot/cmdline.txt</tt>. This has no effect on Xorg.
Write 1 to <tt>/sys/class/graphics/fbcon/rotate</tt>. To do it from the kernel, add <tt>fbcon=rotate:1</tt> to the kernel command line; in Raspbian, this is done by editing <tt>/boot/firmware/cmdline.txt</tt>. This has no effect on Xorg.
 
==Touch rotation==
We can do it through Xorg: add the appropriate <tt>CalibrationMatrix</tt> to the <tt>touchscreen</tt> libevent stanza. For instance, rotate 90 degrees clockwise with <tt>Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"</tt>. 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 <tt>
ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1</tt>. You can test this by checking <tt>libinput list-devices | grep ^Calibration:</tt>.


==Assembling front pane==
==Assembling front pane==
Line 26: Line 42:
* LED long leg to 330Ω resistor
* LED long leg to 330Ω resistor
* Resistor to GPIO pin 12
* Resistor to GPIO pin 12
==Setup for [[Counterforce]]==
* We want automatic login to X. Potato uses [http://www.lxde.org/ LXDE] by default.
** <tt>$HOME/.config/lxsession/LXDE/autostart</tt> of the logged in user defines the Xsession.
** Be sure to launch <tt>xscreensaver -no-splash</tt> to avoid AMOLED burnin