看懂配置RK3568B2开发板Debian10双屏显示&异触

1.xrandr命令

“xrandr”是一款官方的 RandR扩展配置工具,它可以设置屏幕显示的大小、方向、镜像等。对于多屏幕显示的情况,可以使用xrandr进行管理。

参考链接:
https://wiki.archlinux.org/index.php/xrandr_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)

forlinx@forlinx:~$ xrandr --help
usage: xrandr [options]
  where options are:
  --display <display> or -d <display>
  --help
  -o <normal,inverted,left,right,0,1,2,3>
            or --orientation <normal,inverted,left,right,0,1,2,3>
  -q        or --query
  -s <size>/<width>x<height> or --size <size>/<width>x<height>
  -r <rate> or --rate <rate> or --refresh <rate>
  -v        or --version
  -x        (reflect in x)
  -y        (reflect in y)
  --screen <screen>
  --verbose
  --current
  --dryrun
  --nograb
  --prop or --properties
  --fb <width>x<height>
  --fbmm <width>x<height>
  --dpi <dpi>/<output>
  --output <output>
      --auto
      --mode <mode>
      --preferred
      --pos <x>x<y>
      --rate <rate> or --refresh <rate>
      --reflect normal,x,y,xy
      --rotate normal,inverted,left,right
      --left-of <output>
      --right-of <output>
      --above <output>
      --below <output>
      --same-as <output>
      --set <property> <value>
      --scale <x>x<y>
      --scale-from <w>x<h>
      --transform <a>,<b>,<c>,<d>,<e>,<f>,<g>,<h>,<i>
      --off
      --crtc <crtc>
      --panning <w>x<h>[+<x>+<y>[/<track:w>x<h>+<x>+<y>[/<border:l>/<t>/<r>/<b>]]]
      --gamma <r>:<g>:<b>
      --brightness <value>
      --primary
  --noprimary
  --newmode <name> <clock MHz>
            <hdisp> <hsync-start> <hsync-end> <htotal>
            <vdisp> <vsync-start> <vsync-end> <vtotal>
            [flags...]
            Valid flags: +HSync -HSync +VSync -VSync
                         +CSync -CSync CSync Interlace DoubleScan
  --rmmode <name>
  --addmode <output> <name>
  --delmode <output> <name>
  --listproviders
  --setprovideroutputsource <prov-xid> <source-xid>
  --setprovideroffloadsink <prov-xid> <sink-xid>
  --listmonitors
  --listactivemonitors
  --setmonitor <name> {auto|<w>/<mmw>x<h>/<mmh>+<x>+<y>} {none|<output>,<output>,...}
  --delmonitor <name>

双屏扩展显示

RK3568 Debian10系统支持xrandr命令管理多屏扩展显示。同时接入LVDS屏幕和HDMI屏幕,系统会默认非热插拔显示设备作为主屏,所以LVDS会被识别为primary screen。默认会设置两个屏幕为扩展显示

root@linaro-alip:/# xrandr
Screen 0: minimum 320 x 200, current 2560 x 800, maximum 8192 x 8192
LVDS-1 connected primary 1280x800+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1280x800      59.76*+
HDMI-1 connected 1280x720+1280+0 (normal left inverted right x axis y axis) 0mm x 0mm
   3840x2160     60.00 +  60.00    50.00    59.94    30.00    25.00    24.00    29.97    23.98
   4096x2160     60.00    50.00    59.94
   1920x1080     60.00    50.00    59.94
   1920x1080i    60.00    50.00    59.94
   1600x1200     60.00
   1680x1050     59.88
   1400x1050     59.95
   1600x900      60.00
   1280x1024     75.02    60.02
   1440x900      59.90
   1152x864      75.00
   1280x720      60.00*   50.00    59.94
   1024x768      75.03    70.07    60.00
   832x624       74.55
   800x600       72.19    75.00    60.32    56.25
   720x576       50.00
   720x480       60.00    59.94
   720x480i      60.00    59.94
   640x480       75.00    72.81    66.67    60.00    59.94
   720x400       70.08
[2]+  Exit 2                  pppd call quectel-ppp
root@linaro-alip:/#

可以使用xrandr在两个屏幕中选择哪个做主屏,哪个做副屏。

xrandr --output LVDS-1 --right-of HDMI-1 --auto

也可以将两个屏幕设置成同显。

xrandr --output HDMI-1 --same-as LVDS-1 --auto

2.xinput命令

xinput命令用于管理系统的输入设备,首先必须安装xinput

apt-get update

apt-get install xinput

forlinx@forlinx:~$ xinput --help
usage :
        xinput get-feedbacks <device name>
        xinput set-ptr-feedback <device name> <threshold> <num> <denom>
        xinput set-integer-feedback <device name> <feedback id> <value>
        xinput get-button-map <device name>
        xinput set-button-map <device name> <map button 1> [<map button 2> [...]]
        xinput set-pointer <device name> [<x index> <y index>]
        xinput set-mode <device name> ABSOLUTE|RELATIVE
        xinput list [--short || --long || --name-only || --id-only] [<device name>...]
        xinput query-state <device name>
        xinput test [-proximity] <device name>
        xinput create-master <id> [<sendCore (dflt:1)>] [<enable (dflt:1)>]
        xinput remove-master <id> [Floating|AttachToMaster (dflt:Floating)] [<returnPointer>] [<returnKeyboard>]
        xinput reattach <id> <master>
        xinput float <id>
        xinput set-cp <window> <device>
        xinput test-xi2 [--root] <device>
        xinput map-to-output <device> <output name>
        xinput list-props <device> [<device> ...]
        xinput set-int-prop <device> <property> <format (8, 16, 32)> <val> [<val> ...]
        xinput set-float-prop <device> <property> <val> [<val> ...]
        xinput set-atom-prop <device> <property> <val> [<val> ...]
        xinput watch-props <device>
        xinput delete-prop <device> <property>
        xinput set-prop <device> [--type=atom|float|int] [--format=8|16|32] <property> <val> [<val> ...]
        xinput disable <device>
        xinput enable <device>
root@linaro-alip:/# xinput
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ILITEK ILITEK-TP                          id=7    [slave  pointer  (2)]
⎜   ↳ ILITEK ILITEK-TP Mouse                    id=8    [slave  pointer  (2)]
⎜   ↳ USB OPTICAL MOUSE                         id=11   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ adc-keys                                  id=6    [slave  keyboard (3)]
    ↳ rk805 pwrkey                              id=9    [slave  keyboard (3)]
    ↳ fe6e0030.pwm                              id=10   [slave  keyboard (3)]
root@linaro-alip:/#

双屏异触

使用xinput对触摸设备和显示设备进行绑定。ILITEK ILITEK-TP触摸设备的id是7,将其与LVDS绑定。USB OPTICAL MOUSE 触摸设备的id是11,将其与HDMI-1绑定。

forlinx@forlinx:~$ xinput map-to-output 7 LVDS-1
forlinx@forlinx:~$ xinput map-to-output 11 HDMI-1

这样就可以实现双屏异触了。测试了一下,两个屏幕各自的触摸效果还不错。

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
RK3568开发板是基于Rockchip RK3568处理器的一个开发平台,主要用于嵌入式系统开发和媒体应用领域。该开发板具有丰富的硬件资源和灵活的扩展接口,适合各类嵌入式项目的开发和调试。 首先,RK3568开发板采用了Rockchip自家研发的RK3568处理器,该处理器采用了先进的ARM架构,具有强大的计算和图形处理能力。它基于22nm工艺制造,拥有六个Cortex-A55核心,最高主频可达1.8GHz,能够提供出色的性能和能效比。 其次,该开发板还配备了丰富的外设接口,包括多个USB接口、以太网口、HDMI接口等,方便用户连接外部设备。此外,还提供了各类扩展接口,如SPI、I2C、UART等,方便用户接入各类传感器、显示屏等外部硬件。 另外,开发板上还搭载了完整的软件开发环境,包括针对RK3568的开发工具链、操作系统以及各类应用程序库。开发者可以利用这些工具进行应用程序的开发、调试和性能优化。同时,Rockchip还提供了丰富的开发文档和示例代码,帮助开发者快速上手。 总之,RK3568开发板是一款功能强大、资源丰富的开发平台,适用于嵌入式系统开发和媒体应用领域。它提供了高性能的处理器、丰富的硬件资源和完善的软件开发环境,为开发者提供了一站式的开发解决方案。无论是进行系统调试还是开发新的应用程序,该开发板都能够满足开发者的需求。
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值