屏幕旋转
<h2>Debian</h2>
<h3>1.屏幕旋转</h3>
<p>修改 vi  /etc/X11/xorg.conf.d/20-modesetting.conf</p>
<pre><code class="language-shell">### Valid values for rotation are &quot;normal&quot;, &quot;left&quot;, &quot;right&quot;
Section    &quot;Monitor&quot;
#    Identifier    &quot;Default Monitor&quot;
Identifier    &quot;eDP-1&quot;                     
(注释1:先xrand检查屏的节点)
Option    &quot;Rotate&quot; &quot;inverted&quot;        
(注释2:修改旋转方向,“inverted  180度, normal 默认方向  ,left  逆时针90度   ,right顺时针90度”修改这个的值)</code></pre>
<h2>Ubuntu</h2>
<pre><code class="language-shell">xrandr --output HDMI-1(屏幕节点名) --rotate left   # 向左旋转 90°
xrandr --output HDMI-1(屏幕节点名) --rotate right  # 向右旋转 90°
xrandr --output HDMI-1(屏幕节点名) --rotate inverted  # 180°
xrandr --output HDMI-1(屏幕节点名) --rotate normal   # 恢复默认
注:把旋转命令放到/nodka_test/autorun.sh的最后面</code></pre>
<h2>触摸旋转</h2>
<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>