PineTab 2 login screen rotation fix
#1
Update 6/20/23: After my original post @DeltaWhy noticed that the touchscreen was still rotated in portait mode. Making it difficult to click on something like the virtual keyboard if you had the PT2 out of the keyboard case. To fix this you will also need to install xorg-xinput and add a line to the Xsetup file. I've updated my original post to include this fix. Huge thanks to @DeltaWhy. While at it, I also recommend checking out @frtodd 's post about getting the auto screen rotation working. I've been using it for awhile now and it works really well. Community ftw!

-------------

Hey there!

Just received my PineTab 2 in the mail today. So far it's a really cool piece of kit. However, I noticed on first boot that the KDE (sddm) login screen was rotated 90 degrees and in portrait mode. As one does I took it upon myself (with help from the internet) to figure it out. Below are the steps I went through to get it working. Be mindful that this is kind of a hacky way to accomplish this. Essentially we're running a script before the login screen is shown. Also note that the following commands are meant to be run in the terminal and are case sensitive. 

Install xorg-xrandr and xorg-xinput. It's worth noting here that I had to login to the desktop using root (without a password) and give sudo access to that alarm account so that I could install and create these files.

Code:
sudo pacman -S xorg-xrandr xorg-xinput

Edit the Xsetup file in /usr/share/sddm/scripts/Xsetup. Add these couple of lines to your Xsetup file. Your file should look something like this after you have made the edits.

#!/bin/sh
#Xsetup - run as root before the login dialog appears
xrandr --output DSI-1 --mode 800x1280 --rate 60.00 --rotate right
xinput set-prop "pointer:Goodix Capacitive TouchScreen" --type=float "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1

Code:
sudo nano /usr/share/sddm/scripts/Xsetup

Add this line to the Xsetup file and save it. 
Code:
xrandr --output DSI-1 --mode 800x1280 --rate 60.00 --rotate right
xinput set-prop "pointer:Goodix Capacitive TouchScreen" --type=float "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1

Once we've done that we need to create a new file for sddm to pull our configuration from. To do this create another file.
Code:
sudo nano /etc/sddm.conf.d/sddm.conf

Add this line to sddm.conf and save the file. Being mindful that it is case sensitive. 
Code:
[X11]
DisplayCommand=/usr/share/sddm/scripts/Xsetup


That's it! Now reboot your PineTab 2 and the login screen should rotate 90 degrees and be in landscape orientation. Hope this helps someone else out.

p.s. This post was written on the PT2. Smile
  Reply
#2
Brilliant! Helped me out while the pinetab remains a compact laptop. Thank you.

I'm looking forward to making it more touch-friendly and using as a tablet. 

Posted from my #pinetab2 !
  Reply
#3
This worked like a charm for me as well.  Thank you for posting it!
  Reply
#4
Thanx a ton. Works like charm.
  Reply
#5
This worked to rotate the display for me, but not the touchscreen. I fixed the touchscreen by installing xorg-xinput and adding this additional line to the Xsetup script:
Code:
xinput set-prop "pointer:Goodix Capacitive TouchScreen" --type=float "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1
  Reply
#6
(06-19-2023, 08:44 AM)DeltaWhy Wrote: This worked to rotate the display for me, but not the touchscreen. I fixed the touchscreen by installing xorg-xinput and adding this additional line to the Xsetup script:
Code:
xinput set-prop "pointer:Goodix Capacitive TouchScreen" --type=float "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1

Glad to hear the fix worked for you. I actually just realized this issue last night when I tried to login without the keyboard attached. Installed xorg-xinput and added your line to the Xsetup script and it works great. Thanks so much for posting this.
  Reply
#7
(06-19-2023, 05:50 PM)chzbacon Wrote:
(06-19-2023, 08:44 AM)DeltaWhy Wrote: This worked to rotate the display for me, but not the touchscreen. I fixed the touchscreen by installing xorg-xinput and adding this additional line to the Xsetup script:
Code:
xinput set-prop "pointer:Goodix Capacitive TouchScreen" --type=float "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1

Glad to hear the fix worked for you. I actually just realized this issue last night when I tried to login without the keyboard attached. Installed xorg-xinput and added your line to the Xsetup script and it works great. Thanks so much for posting this.

Awesome. Maybe you could edit your original post to add this so it’s easy for others to find?
  Reply
#8
After upgrading to Plasma 6 it seems that "xinput" won't work anymore. When running the Xsetup script manually, it says:

Code:
WARNING: running xinput against an Xwayland server. See the xinput man page for details.
unable to find device pointer:Goodix Capacitive Touchscreen

Is there a way to rotate the touchscreen under Xwayland?
  Reply
#9
(03-09-2024, 10:57 AM)hansen Wrote: After upgrading to Plasma 6 it seems that "xinput" won't work anymore. When running the Xsetup script manually, it says:

Code:
WARNING: running xinput against an Xwayland server. See the xinput man page for details.
unable to find device pointer:Goodix Capacitive Touchscreen

Is there a way to rotate the touchscreen under Xwayland?

I just thought about this today. As far as I remember SDDM was switched to Wayland in Autum. I guess that’s why xinput does not work.
  Reply
#10
Does no one else have this problem, yet?
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Automatic screen rotation frtodd 14 4,223 04-10-2024, 06:37 AM
Last Post: frtodd
  NixOS on PineTab 2 asonix 3 2,005 02-24-2024, 12:29 PM
Last Post: Evergreen
  Ubuntu touch rotation GloriousCoffee 3 1,129 01-09-2024, 06:01 AM
Last Post: polrus
  Working OS on pinetab RISC-V? user641 3 717 12-13-2023, 08:11 AM
Last Post: tophneal
  Pinetab 2 as Pinebook Pro replacement Corkonian 4 2,142 08-15-2023, 11:22 AM
Last Post: CadenAnderson
  Software for PineTab-V msm 12 4,430 08-05-2023, 05:08 PM
Last Post: bingch
  Arch Linux ARM on PineTab 1 Danct12 25 29,416 06-10-2023, 05:33 PM
Last Post: fxc
  PineTab 2 Login Failure cptijerina 0 675 06-07-2023, 07:16 PM
Last Post: cptijerina
  PineTab Mobian bcnaz 150 145,421 04-26-2022, 11:58 AM
Last Post: thomzane
  Xmonad on PineTab Telefza 0 1,796 06-24-2021, 04:04 AM
Last Post: Telefza

Forum Jump:


Users browsing this thread: 1 Guest(s)