屏幕旋转
<h3>1.屏幕旋转</h3>
<p>修改 vi /etc/X11/xorg.conf.d/20-modesetting.conf</p>
<pre><code class="language-shell">Identifier &quot;eDP-1&quot;
(注释1:先xrand检查屏的节点)
Option &quot;Rotate&quot; &quot;inverted&quot;
(注释2:修改旋转方向,“inverted 180度, normal 默认方向 ,left 逆时针90度 ,right顺时针90度”修改这个的值)</code></pre>
<h3>2.触摸旋转</h3>
<p>修改 vi /usr/share/X11/xorg.conf.d/40-libinput.conf</p>
<pre><code class="language-shell">Section &quot;InputClass&quot;
Identifier &quot;libinput touchscreen catchall&quot;
Option &quot;CalibrationMatrix&quot; &quot;-1 0 1 0 -1 1 0 0 1&quot; (添加行)
MatchIsTouchscreen &quot;on&quot;
MatchDevicePath &quot;/dev/input/event*&quot;
Driver &quot;libinput&quot;
EndSection
注:0°:&quot;1 0 0 0 1 0 0 0 1&quot; (默认方向) 90°:&quot;0 1 0 -1 0 1 0 0 1&quot;(顺时针旋转90度)
180°:&quot;-1 0 1 0 -1 1 0 0 1&quot; (上下颠倒) 270°:&quot;0 -1 1 1 0 0 0 0 1&quot;(逆时针旋转90度)</code></pre>