Closed bthubs closed 1 year ago
I've got something. The screen rotates but now asks me for a login. Can't figure it out from here.
I got it to rotate by running
sudo nano /etc/X11/Xwrapper.config
and adding lcd_rotate=2
or extraargs=fbcon=rotate:2
HOWEVER, restarting KlipperScreen then asks for a login and only shows console.
I suspect the software that runs the rotation requires root, which I'm not sure how to do at this point. The strange thing is however... if I run 'systemctl status KlipperScreen', one of the lines I receive states '***** KlipperScreen-start.sh[8652]: extraargs: Invalid key '/usr/lib/xorg/Xorg.wrap' at /etc/X11/Xwrapper.config line 16'. Not sure what this means, but maybe why it's requiring a login.
Hello all!
Anyone with an idea on how to rotate the screen 180 degrees (or any rotation)? I've tried different ways to rotate but none have worked as many other screen use pi instead of SPI (I'm using Manta M8p +CB1). Any help would be appreciated.
I don't need screen rotation but I successfully tested it out right now on my M8P/CB1 using this video: https://www.youtube.com/watch?v=tA7uRC17F6U
Note though I had to alter the steps a bit for it to work in my case. He noted using the dts file from the BTT CB1 github but this just caused a whitescreen for me so instead I used a copy of the dtbo file directly and converted it to dts then edited that file and converted it back to dtbo
cp /boot/dtb/allwinner/overlay/sun50i-h616-tft35_spi.dtbo dtc -I dtb -O dts -f sun50i-h616-tft35_spi.dtbo -o sun50i-h616-tft35_spi.dts nano sun50i-h616-tft35_spi.dts
after that you can follow his instructions again.
Hello all! Anyone with an idea on how to rotate the screen 180 degrees (or any rotation)? I've tried different ways to rotate but none have worked as many other screen use pi instead of SPI (I'm using Manta M8p +CB1). Any help would be appreciated.
I don't need screen rotation but I successfully tested it out right now on my M8P/CB1 using this video: https://www.youtube.com/watch?v=tA7uRC17F6U
Note though I had to alter the steps a bit for it to work in my case. He noted using the dts file from the BTT CB1 github but this just caused a whitescreen for me so instead I used a copy of the dtbo file directly and converted it to dts then edited that file and converted it back to dtbo
cp /boot/dtb/allwinner/overlay/sun50i-h616-tft35_spi.dtbo dtc -I dtb -O dts -f sun50i-h616-tft35_spi.dtbo -o sun50i-h616-tft35_spi.dts nano sun50i-h616-tft35_spi.dts
after that you can follow his instructions again.
Thank you! This worked! The video's instruction were in German but youtube's translator worked pretty well.
For future reference, this is how to get the display to rotate (note: you will also need to rotate the touchscreen)
https://github.com/bigtreetech/CB1-Kernel/blob/kernel-5.16/kernel/arch/arm64/boot/dts/allwinner/overlay/sun50i-h616-tft35_spi.dts
cp /boot/dtb/allwinner/overlay/sun50i-h616-tft35_spi.dtbo
dtc -I dtb -O dts -f sun50i-h616-tft35_spi.dtbo -o sun50i-h616-tft35_spi.dts
nano sun50i-h616-tft35_spi.dts
sudo mv /boot/dtb/allwinner/overlay/sun50i-h616-tft35_spi.dtbo /boot/dtb/allwinner/overlay/sun50i-h616-tft35_spi.dtbo_
dtc -@ -I dts -O dtb -o sun50i-h616-tft35_spi.dtbo sun50i-h616-tft35_spi.dts
fragment@3 {
target = <&tft_35>;
__overlay__ {
status = "okay";
spi-max-frequency = <12500000>;
rotate = <180>;
};
};
sudo chown root:root ./sun50i-h616-tft35_spi.dtbo
sudo chmod u+x ./sun50i-h616-tft35_spi.dtbo
sudo mv sun50i-h616-tft35_spi.dtbo /boot/dtb/allwinner/overlay/
ls /boot/dtb/allwinner/overlay/
This completes the display rotation. Refer to KlipperScreen documentation to change the touchscreen rotation (Transformation Matrix).
@bthubs Thank you for this helped a lot, just want to mention that step 6 modifying the file should be done as part of step 4 when the contents of the file are copied,.
@bthubs Thank you for this helped a lot, just want to mention that step 6 modifying the file should be done as part of step 4 when the contents of the file are copied,.
Yes that would be more efficient! Thank you
Does anyone know whats the difference between the sun50i-h616-tft35_spi and the sun50i-h616-tft35_spi25 files ?
Hello all!
Anyone with an idea on how to rotate the screen 180 degrees (or any rotation)? I've tried different ways to rotate but none have worked as many other screen use pi instead of SPI (I'm using Manta M8p +CB1). Any help would be appreciated.