Lenovo IDEAPAD Flex5 14-ARE05 노트북 화면 회전
1. 설치
apt-get install rotatescreen-flex5
2. 사용법
rotatescreen <normal, left, right, inverted>
3. 스크립트
#!/bin/bash
### BEGIN INIT INFO
# Provides: rotatescreen
# Required-Start: $remote_fs $syslog
# Required-Stop: $remore_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Rotate LENOVO FLEX5 14ARE05
# Description: Script for LENOVO FLEX5 14ARE05 Touchscreen Rotation
# Provided by: No1.Linux(Dumca Suh, 2020.07.07)
### END INIT INFO
. /etc/rc.d/init.d/functions
direc=$(xrandr -q | grep -v dis | grep connected | awk '{ print $5 }' | sed -e 's/(//g')
display=$(xrandr -q | grep -v dis | grep connected | awk '{ print $1 }')
tsid1=$(xinput | grep stylus | awk '{ print $8}' | sed -e 's/id=//g')
tsid2=$(xinput | grep touch | awk '{ print $8}' | sed -e 's/id=//g')
xprop1=$(xinput list-props $tsid1 | grep Coordinate | awk '{ print $4 }' | sed -e 's/(//g' -e 's/)://g')
xprop2=$(xinput list-props $tsid2 | grep Coordinate | awk '{ print $4 }' | sed -e 's/(//g' -e 's/)://g')
case "$1" in
normal)
# normal
xrandr --output $display --rotate normal
xinput set-prop $tsid1 $xprop1 1 0 0 0 1 0 0 0 1
xinput set-prop $tsid2 $xprop2 1 0 0 0 1 0 0 0 1
;;
right)
# right
xrandr --output $display --rotate right
xinput set-prop $tsid1 $xprop1 0 1 0 -1 0 1 0 0 1
xinput set-prop $tsid2 $xprop2 0 1 0 -1 0 1 0 0 1
;;
left)
# left
xrandr --output $display --rotate left
xinput set-prop $tsid1 $xprop1 0 -1 1 1 0 0 0 0 1
xinput set-prop $tsid2 $xprop2 0 -1 1 1 0 0 0 0 1
;;
inverted)
# inverted
xrandr --output $display --rotate inverted
xinput set-prop $tsid1 $xprop1 -1 0 1 0 -1 1 0 0 1
xinput set-prop $tsid2 $xprop2 -1 0 1 0 -1 1 0 0 1
;;
stop)
$0 normal
;;
*)
echo "Usage: $0 {normal|right|left|inverted|stop}"
exit 1
;;
esac
exit 0
Lenovo Ideapad Flex5 14ARE05 제품에서 화면 회전은 WACOM Pen Stylus(id=12)와 WACOM Finger touch(id=13)에 의해서 동작하기 때문에 하나의 장치만 설정하게 되면 펜과 마우스 위치가 달라지게 되므로, 반드시 두 장치 모두 설정해 주어야 함.
댓글 4
-
Lenovo Flex5 14ARE05 iio-sensor-proxy devices
# udevadm info --export-db | grep -i iio
/sys/devices/0020:03FE:0001.0001/HID-SENSOR-200073.1.auto/iio:device0
-
accel-3d 외에 gyro-3d값이 나와야 정상인 것으로 보임.
HID-SENSOR-200041.0 Ambient Light als
HID-SENSOR-200073.0 Accelerometer 3D accel_3d
HID-SENSOR-200076.0 Gyrometer 3D gyro_3d
HID-SENSOR-200083.0 Compass 3D magn_3d
HID-SENSOR-200086.0 Inclinometer 3D
HID-SENSOR-20008a.0 Device Orientation, outputting a quaternion
HID-SENSOR-2000e1.0 Custom, including Accelerometer 3D on the base
HID-SENSOR-2000e2.0 Generic ?? -
2020.08.06 kernel-5.7.13-no1linux1
https://github.com/conqp/linux/tree/amd-sfh-hid/drivers/hid/amd-sfh-hid
AMD SFH Patches 적용
- Lenovo Flex 5 SFH 인식
- Accelerometer hid 장치 인식
- 여전히 센서 동작 안됨
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
공지 | MS Surface 태블릿을 위한 No1.Linux 2021.09.28 버전 [태블릿PC 사용자용] | No1Linuxer | 2021.09.28 | 1290 |
5 |
No1.Linux-2021.11.15-KDE-PLASMA-TE.x86_64 설치간 에러
[28] ![]() | cemion | 2021.12.12 | 13222 |
4 | surface pro 6 로그인 안됨 [10] | nomp | 2021.06.08 | 5379 |
3 |
dell 5175와 x98 air 3g 두테블릿 베타버전 설치후 로그인 문제
[32] ![]() | 하늘소 | 2020.09.05 | 3093 |
2 |
Lenovo IDEAPAD Flex5 14-ARE05 4300U 리눅스
[6] ![]() | No1Linuxer | 2020.07.07 | 1508 |
» | Lenovo IDEAPAD Flex5 14-ARE05 노트북 화면 회전 [4] | No1Linuxer | 2020.07.07 | 1289 |
tsid1=$(xinput | grep 'Wacom HID 5218 Pen stylus' | awk '{ print $8}' | sed -e 's/id=//g')
tsid2=$(xinput | grep 'Wacom HID 5218 Finger touch' | awk '{ print $8}' | sed -e 's/id=//g')
xprop1=$(xinput list-props $tsid1 | grep Coordinate | awk '{ print $4 }' | sed -e 's/(//g' -e 's/)://g')
xprop2=$(xinput list-props $tsid2 | grep Coordinate | awk '{ print $4 }' | sed -e 's/(//g' -e 's/)://g')