Le Potato - Issue with console rotation - Is it compiled into the kernel?

I’m having an issue with display rotation.

I have been able to rotate the CLI display 180 deg with the commands, settings below for permanent. The problem I’m having is there is no option to rotate the display for any consoles. In available rotations, it only lists “Normal” If I install the display manufacturer’s drivers, all it does is add overlay info the /boot/config.txt which has no effect on this system.

Using wiring overlays outlined here - Waveshare 5" HDMI Display Touchscreen on Le Potato and everything works in “Normal” orientation but rotating the console is not available.

echo 2 | sudo tee /sys/class/graphics/fbcon/rotate_all

How can I rotate the display with this system?
image

I have tried installing a desktop environment (KDE Plasma) to see if it installs any helpful packages but it does not allow any screen rotation beyond “Normal”

The only solution I found for my display (not Waveshare) was to add in a Line into the Overlay.

rotation = <270>;

I stumbled through the process with a lot of internet research and I haven’t found a good guide on this forum - there may be one - I’ve just never found it !!

Can you show where you added it? The overlay is below. Also, do you have to remerge the overlay (I’m not sure if the overlays are loaded on bootup or what) ?

`// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/gpio/meson-gxl-gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/meson-gic.h>

/ {
compatible = “libretech,cc”, “amlogic,s905x”, “amlogic,meson-gxl”;

fragment@0 {
	target = <&spicc>;
	
	__overlay__ {

		touchscreen@0 {
			compatible = "ti,ads7846";
			reg = <0>;
			spi-max-frequency = <2000000>;
			interrupt-parent = <&gpio_intc>;
			interrupts = <MESON_GIC_GXL_GPIOX_0 IRQ_TYPE_EDGE_FALLING>;
			pendown-gpio = <&gpio GPIOX_0 GPIO_ACTIVE_LOW>;
			ti,x-plate-ohms = /bits/ 16 <60>;
			ti,pressure-max = /bits/ 16 <255>;
			wakeup-source;
			status = "okay";
		};
	};
};

};`

@librecomputer @Da_Xue is there any documentation on what else can go into the overlay and how to compile?? For example the settings below are from the display manufacturer.

cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900

@admins why no answer to this? Screen rotation should be available.

This is where I put it - I seem to remember the location needed to be precise.

/ {
compatible = “libretech,cc”, “amlogic,s905x”, “amlogic,meson-gxl”;

fragment@0 {
	target = <&spicc>;
	
	__overlay__ {
		/*
		 * The display signals are connected to :
		 * - SDO(MISO) to Pin21 (SPI_MISO)
		 * - LED/Backlight to Pin2 (5v)
		 * - SCK to Pin23 (SPI_CLK)
		 * - SDI(MOSI) to Pin19 (SPI_MOSI)
		 * - D/C to Pin29 (GPIOX_17)
		 * - RESET to Pin31 (GPIOX_18)
		 * - (LCD) CS to Pin24 (GPIOX_10)
		 * - GND to Pin25 (GND)
		 * - VCC/VIN to Pin17 (3.3V)
		 */
		display@0 {
			compatible = "adafruit,yx240qv29", "ilitek,ili9341";
			reg = <0>;
			buswidth = <8>;
			spi-max-frequency = <30000000>;
			dc-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
			reset-gpios = <&gpio GPIOX_18 GPIO_ACTIVE_HIGH>;
			rotation = <270>;
			status = "okay";
		};
	};
};

};

HDMI displays are different than SPI displays.

The overlay rotation adjustments are only for SPI displays.

Rotation in fbcon is different than in X11 and different than wayland. Be specific in what you are trying to rotate.

Did you try using “rotation”?