how to enable rotating display asus t101ha?

Moderator: BarryK

Post Reply
ghoen
Posts: 32
Joined: Mon Apr 19, 2021 7:53 pm
Location: Netherlands
Been thanked: 1 time

how to enable rotating display asus t101ha?

Post by ghoen »

I have a possible simple question.
What is the trick to rotate the display of a asus t101ha.
when I boot easys os dunfell then it starts in tablet mode, functions without a problem.
The asus has a keyboard attachted, so it is possible to use it also in a laptop mode.
But I can not find the solution to rotate the screen.
Anybody here with a suggestion.

Kind regards.

Last edited by Flash on Mon Sep 13, 2021 5:35 pm, edited 2 times in total.
Reason: Added ? to title
User avatar
BologneChe
Posts: 510
Joined: Sun Aug 23, 2020 12:29 am
Location: Stoneham, Québec
Has thanked: 318 times
Been thanked: 140 times

Re: how to enable rotating display asus t101ha?

Post by BologneChe »

@ghoen

Try with Zarfy (maybe).

Attachments
Capture.png
Capture.png (54.8 KiB) Viewed 1056 times

Born to lose; live to win

User avatar
stemsee
Posts: 787
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 188 times
Been thanked: 132 times

Re: how to enable rotating display asus t101ha?

Post by stemsee »

You could also use mY script 'mounter-rotator', which controls rotation also of touchscreen, display, and touchpad independently.
viewtopic.php?f=106&t=2854

mt.png
mt.png (9.96 KiB) Viewed 1044 times

Code: Select all

#!/bin/sh
[[ "`whoami`" != "root" ]] && exec sudo -E -S ${0} "$\"" 
running=`ps -e | grep rotate | wc -l` 
[[ "$running" -gt 2 ]] && exit #check if running, one instance only
export TRANSFORM='Coordinate Transformation Matrix'
export OUTPUT_CHARSET=UTF-8
mkfifo -m755 /tmp/RPIPE
exec 3<> /tmp/RPIPE
export connected=`xrandr | grep connected | cut -f1 -d' ' | head -1`
function left (){
	events=$(cat /etc/rotate_events)
	export touch=`echo "$events" | cut -f2 -d' '`
	export pad=`echo "$events" | cut -f1 -d' '`
	xrandr --output "$connected" --rotate left
    xinput set-prop "$touch" "Evdev Axis Inversion" 0, 1
    xinput set-prop "$touch" "Evdev Axes Swap" 1
	xinput set-prop "$pad" "$TRANSFORM" 0 -1 1 1 0 0 0 0 1
	xinput set-prop "$touch" "$TRANSFORM" 0 -1 1 1 0 0 0 0 1
	echo "left" >/etc/rotate
		echo "tooltip:left" >>/tmp/RPIPE

}; export -f left

function right (){
	events=$(cat /etc/rotate_events)
	export touch=`echo "$events" | cut -f2 -d' '`
	export pad=`echo "$events" | cut -f1 -d' '`
	xrandr --output "$connected" --rotate right
    xinput set-prop "$touch" "Evdev Axis Inversion" 0, 1
    xinput set-prop "$touch" "Evdev Axes Swap" 1
    xinput set-prop "$pad" "$TRANSFORM" 0 1 0 -1 0 1 0 0 1
    xinput set-prop "$touch" "$TRANSFORM" 0 1 0 -1 0 1 0 0 1
	echo "right" >/etc/rotate
		echo "tooltip:right" >>/tmp/RPIPE

}; export -f right

function inverted (){
	events=$(cat /etc/rotate_events)
	touch=`echo "$events" | cut -f2 -d' '`
	pad=`echo "$events" | cut -f1 -d' '`
	xrandr --output "$connected" --rotate inverted
    xinput set-prop "$touch" "Evdev Axis Inversion" 1, 1
    xinput set-prop "$touch" "Evdev Axes Swap" 0
    xinput set-prop "$pad" "$TRANSFORM" -1 0 1 0 -1 1 0 0 1
    xinput set-prop "$touch" "$TRANSFORM" -1 0 1 0 -1 1 0 0 1
	echo "inverted" >/etc/rotate
	echo "tooltip:inverted" >>/tmp/RPIPE
}; export -f inverted

function normal (){
	events=$(cat /etc/rotate_events)
	touch=`echo "$events" | cut -f2 -d' '`
	pad=`echo "$events" | cut -f1 -d' '`
	xrandr --output "$connected" --rotate normal
    xinput set-prop "$touch" "Evdev Axis Inversion" 0, 0
    xinput set-prop "$touch" "Evdev Axes Swap" 0
    xinput set-prop "$pad" "$TRANSFORM" 1 0 0 0 1 0 0 0 1
    xinput set-prop "$touch" "$TRANSFORM" 1 0 0 0 1 0 0 0 1
	echo "normal" >/etc/rotate
		echo "tooltip:normal" >>/tmp/RPIPE

}; export -f normal
function on_exit (){
	rm -f /tmp/RPIPE
}
export -f on_exit
trap "bash -c 'on_exit'" EXIT
( sleep 1; echo "icon:/usr/share/pixmaps/normal.png" >> /tmp/RPIPE ) &
function maingui (){
export WINDOWTITLE="Mounter_Rotator"
sayonara 8 &
yad --center \
--form --item-separator='#' \
--field="Mount:FBTN" "bash -c \"mkdir -p "%3"; mount "%2" "%3" \"" \
--field="Partition:CBE" "`fdisk -l | grep dev | grep -v Disk | awk '{print $1}' | tr '\n' '#'``blkid -o device | tr '\n' '#'`" \
--field="Mount Dir:CBE" `ls /mnt | sed 's|^|/mnt/|g' | tr '\n' '#'``ls /media | sed 's|^|/media/|g' | tr '\n' '#'``ls /aufs | sed 's|^|/aufs/|g' | tr '\n' '#'` \
--field="un-Mount:FBTN" "bash -c \"umount -f -A "%2"; umount -f -A "%3" \"" \
--field="Xinput Events:TXT" "`xinput`" \
--field="touchpad event id=:NUM" "`cat /etc/rotate_events | cut -f1 -d' '`" \
--field="Touchscreen event id=:NUM" "`cat /etc/rotate_events | cut -f2 -d' '`" \
--field="Rotate left:FBTN" "bash -c \"left \"" \
--field="Rotate right:FBTN" "bash -c \"right \"" \
--field="Rotate normal:FBTN" "bash -c \"normal \"" \
--field="Rotate inverted:FBTN" "bash -c \"inverted \"" \
--field="Store Events:FBTN" "bash -c \"echo "%6" "%7" >/etc/rotate_events \"" \
--no-buttons \
--title="$WINDOWTITLE" --window-icon="gtk-refresh" \
--geometry="$(cat /root/.config/geometry/$WINDOWTITLE)" &
}; export -f maingui
yad --notification --listen --text="Rotate Screen: left Click for Normal Orientation" --tray-icon="/usr/share/pixmaps/normal.png" --command="bash -c normal" --menu="Rotate Left!bash -c left!/usr/share/pixmaps/left.png|Rotate right!bash -c right!/usr/share/pixmaps/right.png|Rotate Inverted!bash -c inverted!/usr/share/pixmaps/inverted.png|GUI!bash -c maingui!gtk-open|Close!quit!gtk-cancel" <&3
Post Reply

Return to “EasyOS”