欢迎访问ic37.com |
会员登录 免费注册
发布采购

RK3399开发板Ubuntu系统下实现双屏显示&异触; 本帖最后由 柠檬籽儿 于 202

本帖最后由 柠檬籽儿 于 2022-3-30 14:06 编辑 ​ 本文以飞凌嵌入式RK3399开发板为基础讲解,主要介绍了Ubuntu系统下双屏显示及异触,其它RK3399平台请参考使用! 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> 双屏扩展显示 OK3399-C Ubuntu系统支持xrandr命令管理多屏扩展显示。同时接入eDP屏幕和HDMI屏幕,系统会默认非热插拔显示设备作为主屏,所以eDP会被识别为primary screen。默认会设置两个屏幕为扩展显示。

复制forlinx@forlinx:~$ xrandr Screen 0: minimum 320 x 200, current 2560 x 1440, maximum 8192 x 8192 eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 276mm x 156mm    1920x1080     60.00*+ HDMI-1 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm    2560x1440     59.95*    1920x1080     60.00    50.00    59.94      1680x1050     59.88      1280x1024     75.02    60.02      1440x900      59.90      1280x960      60.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      640x480       75.00    72.81    66.67    60.00    59.94      720x400       70.08 可以使用xrandr在两个屏幕中选择哪个做主屏,哪个做副屏。 xrandr --output eDP-1 --right-of HDMI-1 --auto 也可以将两个屏幕设置成同显 xrandr --output HDMI-1 --same-as eDP-1 --auto xinput命令 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> 分别插入了“wch.cn USB2IIC CTPCONTROL”和“ILITEK ILITEK-TP”两个USB电容触摸屏。

复制forlinx@forlinx:~$ xinput ⎡ Virtual core pointer                          id=2    [master pointer  (3)] ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)] ⎜   ↳ wch.cn USB2IIC_CTP_CONTROL                id=9    [slave  pointer  (2)] ⎜   ↳ ILITEK ILITEK-TP                          id=6    [slave  pointer  (2)] ⎣ Virtual core keyboard                         id=3    [master keyboard (2)]     ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]     ↳ rk_headset                                id=7    [slave  keyboard (3)]     ↳ rk29-keypad                               id=8    [slave  keyboard (3)]     ↳ InputEmulator                             id=10   [slave  keyboard (3)] 双屏异触 使用xinput对触摸设备和显示设备进行绑定。ILITEK ILITEK-TP触摸设备的id是6,将其与eDP-1绑定。wch.cn USB2IIC CTPCONTROL触摸设备的id是9,将其与HDMI-1绑定。 forlinx@forlinx:~$ xinput map-to-output 6 eDP-1forlinx@forlinx:~$ xinput map-to-output 9 HDMI-1 这样就可以实现RK3399下双屏异触了。测试了一下,两个屏幕各自的触摸效果还不错。 ▼效果如下:


26709eed619be3ecee87e31ed0d5aab9.png (194.89 KB ) 下载附件 2022-3-30 14:04 上传
​ 以上就是小编给大家分享的内容,希望能够帮到您。 ​

评论

目前还没有评论,等你发挥~

    最新帖子
【转】谁能教教我怎么学单片机,怎么入门?; 写在最前 嵌入式学习路径是一个漫长而又有趣的过程,有 i.MX8MP开发板移植USBWIFI RTL8192EU驱动; 在飞凌OKMX8MP-C开发板上移 os中程序对存储器的翻页和进程切换有冲突怎么办?; 我的程序使用了OS,几个进程都会对外部存储器操作 关于信号量的问题; 一直对信号量模模糊糊,今天觉得这段描述不错,大家讨论讨论。下面是节选的一本描述U 实时操作系统μC/OS-II在MCF5272上的移植; 作为一个实时内核,μC/OS从1992年开始 希望能够组建一个wince开发的msn组; 我的:mikequ7808@hotmail.com H-JTAG不能调式LPC2210;    H-JTAG可以识别芯片I 在ARM9上用linux还是WINCE,我一直很犹豫; 目前手上资料都有,硬件平台也有,但一直在犹豫 如何从头开始学移植uclinux; 本人去年移植过uc-osII,自我感觉不错,想学习下移植下ucl 急:我装的LINUX系统会不会没有编程工具呢?; 前天装Fedora8时,选择的是办公软件和编程软件 华硕epc1000H超级小巧笔记本能装linux做嵌入式开发吗?; 1.6G主频+1G内存+160G 带linux操作系统的ARM9开发; 以前是用ADS开发ARM,跑裸机的.现在要跑操作系统.一种情况 用智能手机作为开发平台,可行吗,请帮助?; 我一直考虑这样一个问题,不知道是否可行,或者早就有人实现 嵌入式LINUX开发一定要用gccgdb吗; 嵌入式LINUX开发一定要用gccgdb吗  碰触Windows CE 中断; Windows CE是紧凑的、高效的和可升级的操作系统,
 复制成功!