Debian/ubuntu 显示屏幕校准

news/2024/10/22 2:38:37/

//转载: https://www.cnblogs.com/yongpan/p/7846531.html

ubuntu多显示器单触摸屏校准

多显示器单触摸屏屏幕校准

https://www.freedesktop.org/wiki/Software/xinput_calibrator/

0、触摸屏重定向

sudo xinput map-to-output 13 DP1  #将触摸屏映射到指定的显示器

  其中:13为触摸屏设备id,可通过 xinput命令查看  ILITEK ILITEK-TP id=13 [slave pointer (2)];

     DP1为指定的显示设备名,可通过$ xrandr命令查看,见最下面附件。

1、安装屏幕校准器
$ sudo apt-get install xinput-calibrator

2、查看屏幕分辨率
在 System settings --> Display 查看屏幕分辨率

3、手动设置校准窗口的大小(有多个显示器而只有一个触摸屏时用的,用于设置只指定窗口)

  我的电脑有两个显示器,一个 1920x1080, 一个 1024x768,我只校准左边的显示器,如
Usage:xinput_calibrator --geometry <w>x<h>
--geometry: manually provide the geometry (width and height) for the calibration window

$ sudo xinput_calibrator --geometry 1920x1080    注意:1920x1080 此处是字母x 

Warning: multiple calibratable devices found, calibrating last one (ILITEK ILITEK-TP)
use --device to select another one.
Setting calibration data: 0, 16384, 0, 9600
Calibrating EVDEV driver for "ILITEK ILITEK-TP" id=14
current calibration values (from XInput): min_x=0, max_x=16384 and min_y=0, max_y=9600

Doing dynamic recalibration:
Setting calibration data: 82, 32942, 155, 9796
--> Making the calibration permanent <--
copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)
Section "InputClass"
Identifier "calibration"
MatchProduct "ILITEK ILITEK-TP"
Option "Calibration" "82 32942 155 9796"
Option "SwapAxes" "0"
EndSection

我的电脑是在/usr/share/X11/xorg.conf.d/目录下

4、按提示说明 拷贝校正信息到下面的文件中:
sudo gedit /usr/share/X11/xorg.conf.d/99-calibration.conf
将 下面的内容拷贝进去
Section "InputClass"
Identifier "calibration"
MatchProduct "ILITEK ILITEK-TP"
Option "Calibration" "82 32942 155 9796"
Option "SwapAxes" "0"
EndSection

5、完成。

附录:---相关的常用命令-------------------

1、查看 xinput_calibrator 使用方法
$ xinput_calibrator -h
xinput_calibrator, v0.7.5

Usage: xinput_calibrator [-h|--help] [-v|--verbose] [--list] [--device <device name or XID or sysfs path>] [--precalib <minx> <maxx> <miny> <maxy>] [--misclick <nr of pixels>] [--output-type <auto|xorg.conf.d|hal|xinput>] [--fake] [--geometry <w>x<h>] [--no-timeout]
-h, --help: print this help message
-v, --verbose: print debug messages during the process
--list: list calibratable input devices and quit
--device <device name or XID or sysfs event name (e.g event5)>: select a specific device to calibrate
--precalib: manually provide the current calibration setting (eg. the values in xorg.conf)
--misclick: set the misclick threshold (0=off, default: 15 pixels)
--output-type <auto|xorg.conf.d|hal|xinput>: type of config to output (auto=automatically detect, default: auto)
--fake: emulate a fake device (for testing purposes)
--geometry: manually provide the geometry (width and height) for the calibration window
--no-timeout: turns off the timeout
--output-filename: write calibration data to file (USB: override default /etc/modprobe.conf.local


2、查看输入设备
$ xinput

⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=11 [slave pointer (2)]
⎜ ↳ ILITEK ILITEK-TP id=13 [slave pointer (2)]
⎜ ↳ ILITEK ILITEK-TP id=14 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ Logitech USB Receiver id=10 [slave keyboard (3)]
↳ USB2.0 Camera
id=12 [slave keyboard (3)]


3、查看输出设备
$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
1920x1080 60.0*+
1680x1050 60.0
1280x1024 75.0 60.0
1440x900 59.9
1280x960 60.0
1280x720 60.0
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 75.0 72.8 66.7 60.0
720x400 70.1
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)


http://www.ppmy.cn/news/430949.html

相关文章

Android系统 屏幕最低背光亮度值/最高背光亮度值 调试

通过 adb 确认合适的 最低背光亮度值/最高背光亮度值 参数 , 并使用万用表量测 背光IC的反馈电阻输出电压确认&#xff0c;具体计算方式根据 背光IC 贴的反馈电阻来计算。&#xff08;可以找硬件协助 一般是 1.35 / 1.1&#xff09; adb shell Dslide_1020Pro:/ $ su Dslide_10…

iqoo手机计算机背景变白,更精准的色彩显示,出厂屏幕校准的手机大合集

如今&#xff0c;手机的屏幕越来越得到重视&#xff0c;不仅仅提现在屏幕刷新率方面&#xff0c;人们对于屏幕的色准的需求也不断提高。手机厂商也看到了这方面的需求&#xff0c;在一些产品出厂时&#xff0c;就做了色准调校。不过这样的产品也有不少呢&#xff0c;不妨看看下…

linux系统屏幕触摸校准

1、安装工具 xinput-calibrator工具&#xff1a;sudo apt-get install xinput-calibrator xinput工具&#xff1a;sudo apt-get insatll xinput 2、校准实例 &#xff08;1&#xff09;查看触摸设备id&#xff1a;xinput_calibrator --list 上面可知&#xff1a;device nam…

给android增加屏幕校准

android原始版本里是没有屏幕校准功能的&#xff0c;tp坐标到lcd坐标是完全按照线性关系来转换的。例如&#xff0c;tp坐标是(Xt ,Yt )分辨率是&#xff08;Wt x Ht &#xff09;&#xff0c;lcd坐标是(X,Y)&#xff0c;分辨率是(W x H)&#xff0c;则 X(Xt *W)/Wt&#xff0c;…

Android屏幕校准

android原始版本里是没有屏幕校准功能的&#xff0c;tp坐标到lcd坐标是完全按照线性关系来转换的。例如&#xff0c;tp坐标是(Xt ,Yt )分辨率是&#xff08;Wt x Ht &#xff09;&#xff0c;lcd坐标是(X,Y)&#xff0c;分辨率是(W x H)&#xff0c;则 X(Xt *W)/Wt&#xff0c;…

6.Sentincl控制台 规则 实战

一、流控规则 流量控制(flow control),其原理是监控应用流量的 QPS 或并发线程数等指标,当达到指定的阈值时对流量进行控制,以避免被瞬时的流量高峰冲垮,从而保障应用的高可用性。一条限流规则主要由下面几个因素组成,我们可以组合这些元素来实现不同的限流效果: Fiel…

百度网盘转存腾讯微云

https://www.zhihu.com/question/21879203

程序下载微云

https://share.weiyun.com/5OxmUiI