{"id":23,"date":"2021-03-11T16:17:44","date_gmt":"2021-03-11T08:17:44","guid":{"rendered":"http:\/\/www.small09.top\/?p=23"},"modified":"2021-04-28T11:11:08","modified_gmt":"2021-04-28T03:11:08","slug":"%e5%a4%9a%e6%98%be%e7%a4%ba%e5%99%a8%e8%a7%a6%e5%b1%8f%e8%b0%83%e8%af%95%e4%b8%8e%e6%9a%82%e8%a1%8c%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88","status":"publish","type":"post","link":"https:\/\/wp.small09.top\/?p=23","title":{"rendered":"\u591a\u663e\u793a\u5668\u89e6\u5c4f\u8c03\u8bd5\u4e0e\u6682\u884c\u89e3\u51b3\u65b9\u6848"},"content":{"rendered":"<p><em>2021-03-22\u66f4\u65b0\u90e8\u5206\u5185\u5bb9<\/em><br \/>\n<em>2021-04-28\u518d\u6b21\u66f4\u65b0\u5185\u5bb9<\/em><\/p>\n<h2>\u95ee\u9898\u6765\u6e90<\/h2>\n<p>\u6700\u8fd1\u5ba2\u6237\u8981\u6c42\u4f7f\u7528\u4fe1\u521b\u5e73\u53f0\uff0c\u5373\u56fd\u4ea7CPU+\u56fd\u4ea7\u64cd\u4f5c\u7cfb\u7edf\u5e73\u53f0\u3002\u73b0\u5728\u8fd9\u65b9\u9762\u4e3b\u8981\u4f7f\u7528\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e3a\u9e92\u9e9f\u548c\u901a\u4fe1uos\u3002\u8fd9\u4e24\u4e2a\u7684\u672c\u8d28\u90fd\u662fdebian\u7cfb\u7684\uff0c\u6240\u4ee5\u5f88\u591a\u5730\u65b9\u7684\u8c03\u8bd5\u4e0e\u4f7f\u7528\u90fd\u53ef\u4ee5\u6309\u4e4c\u73ed\u56fe\u7684\u7ecf\u9a8c\u6765\u64cd\u4f5c\u3002\u4e00\u6b3e\u4ea7\u54c1\u8981\u4f7f\u7528\u4e09\u5757\u663e\u793a\u5668\uff0c\u5176\u4e2d\u4e24\u5757\u662f\u89e6\u5c4f\u3002\u5c4f\u5e55\u901a\u8fc7R5 420\u663e\u5361\uff0c\u90fd\u8f6c\u6362\u6210VGA\u8fde\u63a5\u3002<br \/>\n\u63a5\u5165\u8bbe\u5907\u540e\uff0c\u53d1\u73b0\u89e6\u6478\u5c4f\u9ed8\u8ba4\u662f\u6620\u5c04\u5230\u5168\u5c4f\u5e55\uff0c\u5728\u4efb\u4f55\u663e\u793a\u5668\u4e0a\u64cd\u4f5c\u90fd\u4f1a\u6309\u6392\u5217\u987a\u5e8f\u5728\u5bf9\u5e94\u7684\u533a\u57df\u89e6\u53d1\u3002\u6240\u4ee5\u9700\u8981\u7ed9\u6bcf\u4e2a\u663e\u793a\u5668\u5206\u522b\u6620\u5c04\u89e6\u6478\u3002\u6620\u5c04\u7684\u57fa\u672c\u6307\u4ee4\u4e3a<\/p>\n<p><code>xinput map-to-output <span class=\"katex math inline\">\u89e6\u5c4f\u8bbe\u5907id <\/span>\u663e\u793a\u5c4f\u540d\u79f0<\/code><\/p>\n<blockquote><p>\n  2021-04-28\u66f4\u65b0<\/p>\n<p>  <code>xinput map-to-output<\/code>\u6307\u4ee4\u652f\u6301\u89e6\u6478\u5c4f\u540d\u79f0\u4f5c\u4e3a\u53c2\u6570\uff0c\u6bd4\u5982\u6211\u901a\u8fc7<code>xinput<\/code>\u6307\u4ee4\u770b\u5230\u6709\u4e00\u4e2a\u89e6\u6478\u5c4f\u7684\u8bbe\u5907\u540d\u79f0\u4e3a<code>ILITEK XXXX<\/code>\uff0c\u90a3\u4e48\u6211\u6620\u5c04\u7684\u65f6\u5019\u76f4\u63a5\u8f93\u5165<\/p>\n<blockquote><p>\n    <code>xinput map-to-output \"ILITEK XXX\" HDMI-1<\/code>\n  <\/p><\/blockquote>\n<\/blockquote>\n<h2>\u5c1d\u8bd5\u89e3\u51b3<\/h2>\n<ul>\n<li>\u9996\u5148\u4f7f\u7528xinput\u67e5\u770b\u89e6\u6478\u8bbe\u5907\u53ca\u5176\u5e8f\u53f7$id\u3002\u8fd9\u91cc\u53ef\u4ee5\u770b\u5230\u591a\u4e2a\u8bbe\u5907\uff0c\u53ef\u4ee5\u901a\u8fc7\u5355\u72ec\u63d2\u62d4\u7684\u65b9\u5f0f\u627e\u5230\u6bcf\u4e2a\u8bbe\u5907\u3002<\/li>\n<li><del>\u7136\u540e<code>xinput list-props $id<\/code>\u67e5\u770b\u8bbe\u5907\u7684VID\uff0c\u8fd9\u4e2a\u5728\u540e\u7eed\u81ea\u52a8\u5316\u5904\u7406\u6709\u7528\u3002<\/del><\/li>\n<li><code>xrandr<\/code>\u67e5\u770b<code>$\u663e\u793a\u5668\u540d\u79f0<\/code><\/li>\n<\/ul>\n<h2>\u81ea\u52a8\u5316\u5904\u7406<\/h2>\n<pre><code class=\"language-bash  line-numbers\"># 2021-04-28\u66f4\u65b0\uff1a\n# \u672c\u90e8\u5206\u540e\u9762\u7684\u90fd\u53ef\u4ee5\u4e0d\u770b\u4e86\uff01\nxinput map-to-output \"DEVICE_NAME\" DISPLAY\n# \u628a\u8fd9\u4e00\u6bb5\u5199\u5165\u53ef\u4ee5\u81ea\u52a8\u6267\u884c\u7684\u811a\u672c\u91cc\u9762\uff0c\u6bd4\u5982\/etc\/rc.local, ~\/.bashrc, \/etc\/profile, \n# \u4ee5\u53ca\u5236\u4f5c\u6210service\u7b49\u3002\u6709\u51e0\u4e2a\u89e6\u6478\u5c4f\u5c31\u5199\u51e0\u884c\u6307\u4ee4\uff0c\u6bd4\u4e0b\u9762\u7684\u7b80\u6d01\u4e86\u592a\u591a~\n<\/code><\/pre>\n<p><strong>\u4ec5\u4f5c\u5f52\u6863\uff01\u4e0b\u9762\u8fd9\u4e9b\u65b9\u6cd5\u8fc7\u4e8e\u7e41\u7410\uff01<\/strong><\/p>\n<p>\u5229\u7528VID\u548c\u663e\u793a\u5668\u540d\u79f0\u4f5c\u4e3a\u53c2\u6570\uff0c\u8fd0\u884c\u4e0b\u9762\u7684\u811a\u672c\uff0c\u6216\u8005\u76f4\u63a5\u624b\u52a8\u6267\u884c\u91cd\u6620\u5c04\uff0c\u5373\u53ef\u89e3\u51b3\u89e6\u5c4f\u4f5c\u7528\u8303\u56f4\u95ee\u9898\u3002<code>bash this.sh VID1 VID2 ScreenID<\/code><\/p>\n<pre><code class=\"language-shell  line-numbers\">#!\/bin\/bash\n# \u8fd9\u6bb5\u9002\u5408\u89e6\u5c4f\u786c\u4ef6id\u4e0d\u540c\u7684\u60c5\u51b5\uff0c\u5982\u679c\u9047\u5230id\u4e0d\u540c\u9700\u8981\u5176\u4ed6\u65b9\u6cd5\u3002\n# 2021-03-22\u66f4\u65b0\uff1a\u5728\u524d\u51e0\u5929\u7684\u5b9e\u64cd\u4e2d\uff0c\u53d1\u73b0\u5b57\u7b26\u4e32\u6bd4\u8f83\u90e8\u5206\u51fa\u73b0\u4e86\u95ee\u9898\uff0c\u8fd9\u4e2a\u65b9\u6848\u7684\u53ef\u884c\u6027\u6709\u5f85\u8fdb\u4e00\u6b65\u63a2\u7d22\u3002\u73b0\u5728\u91c7\u7528\u53e6\u4e00\u79cd\u65b9\u6848\u3002\nMYID_FIRST=$1\nMYID_SECOND=$2\nOUT_PUT=$3\n\nfor I in $(xinput list --id-only)\ndo\n#[1]\n    CUR_FIRST=$(xinput list-props $I|grep \"Device Product ID\"|awk -F : '{print $2}'|awk -F , '{print $1}'|awk '{print $1}')\n    CUR_SECOND=$(xinput list-props $I|grep \"Device Product ID\"|awk -F : '{print $2}'|awk -F , '{print $2}'|awk '{print $1}')\n    if [ \"$MYID_FIRST\" == \"$CUR_FIRST\" ] &amp;&amp; [ \"$MYID_SECOND\" == \"$CUR_SECOND\" ];\n    then\n        MY_INDEX=$I\n        break;\n    fi\ndone\n\nxinput map-to-output $MY_INDEX $OUT_PUT\n\n#.\/this.sh VID VID HDMI2\n#.\/this.sh VID VID HDMI1\n<\/code><\/pre>\n<pre><code class=\"language-shell  line-numbers\">#!\/bin\/bash\n# 2021-03-22\u66f4\u65b0\uff1a\u8fd9\u79cd\u65b9\u6848\u53ea\u8981\u56db\u884c\u5c31\u80fd\u5b9e\u73b0\u4e00\u5757\u7684\u6620\u5c04\uff0c\u9700\u8981\u65f6\u53ea\u8981\u590d\u5236\u8fd9\u4e2a\u4ee3\u7801\u5757\u5373\u53ef\uff0c\u4fee\u6539DEVICE_NAME \u548c SCREEN_NAME \u3002\u5982\u679c\u540d\u79f0\u4e2d\u5e26\u6709\u91cd\u590d\u7684\u90e8\u5206\uff0c\u53ef\u4ee5\u518d\u52a0\u4e00\u4e2agrep -v xxxx\u6765\u6392\u9664\u5173\u952e\u8bcd\u3002\u4f46\u662f\u5982\u679c\u9047\u5230\u5c4f\u5e55\u5b8c\u5168\u91cd\u540d\u7684\u60c5\u51b5\uff0c\u5c31\u4e0d\u53ef\u89e3\u4e86\u3002\nTOUCH_ID=$(xinput | grep -iw DEVICE_NAME)\nTOUCH_ID=$(echo ${TOUCH_ID#*id=})\nTOUCH_ID=$(echo ${TOUCH_ID%% *})\nxinput map-to-output $TOUCH_ID SCREEN_NAME\n<\/code><\/pre>\n<p>\u6b64\u65b9\u6cd5\u53ef\u4ee5\u5728\u76f4\u5230\u89e6\u5c4fVID\u540e\uff0c\uff08\u4e00\u822c\u591a\u663e\u793a\u5668\u4f7f\u7528\u7684\u662f\u4e0d\u540c\u7684\u578b\u53f7\uff09\uff0c<del>\u4f7f\u7528\u81ea\u542f\u52a8rc.local\u5f00\u673a\u6267\u884c\u91cd\u6620\u5c04\u6307\u4ee4\uff0c\u4fdd\u8bc1\u6bcf\u6b21\u5f00\u673a\u90fd\u80fd\u51c6\u786e\u627e\u5230\u5c4f\u5e55\uff0c\u4e14\u9002\u7528\u4e8e\u7cfb\u5217\u4ea7\u54c1\u4e0d\u7528\u5355\u72ec\u627eid<\/del>\u3002<\/p>\n<p>\u7ecf\u6d4b\u8bd5rc.local\u7531\u4e8e\u53ea\u5728\u5f00\u673a\u6267\u884c\uff0c\u5982\u679c\u5206\u8fa8\u7387\u5728\u5f00\u673a\u7684\u65f6\u5019\u6539\u53d8\u4e86\uff08\u6bd4\u5982\u7528\u4e86\u8f6c\u63a5\u5934\u5206\u8fa8\u7387\u4f1a\u91cd\u65b0\u8c03\u6574\uff09\uff0c\u6620\u5c04\u5173\u7cfb\u8fd8\u662f\u4f1a\u51fa\u9519\u3002\u6211\u51b3\u5b9a\u7528\u4e00\u4e2a\u53d6\u5de7\u7684\u529e\u6cd5\uff0c\u628a\u6267\u884c\u811a\u672c\u7684\u547d\u4ee4\u653e\u5728<code>~\/.bashrc<\/code>\u4e2d\uff0c\u8fd9\u6837\u53ea\u9700\u8981\u6253\u5f00\u4e00\u6b21\u7ec8\u7aef\uff0c\u5c31\u53ef\u4ee5\u5b9e\u73b0\u5c4f\u5e55\u91cd\u65b0\u6620\u5c04\u3002<\/p>\n<h2>\u540e\u7eed\u95ee\u9898<\/h2>\n<ol>\n<li>\u5f53\u5c4f\u5e55\u53c2\u6570\u6539\u53d8\uff0c\u5982\u8c03\u6574\u5206\u8fa8\u7387\u3001\u8c03\u6574\u987a\u5e8f\u3001\u63d2\u62d4\u5c4f\u5e55\u3001\u6362\u5c4f\u5e55\u7b49\uff0c\u90fd\u4f1a\u5f15\u53d1\u6620\u5c04\u7684\u5931\u6548\uff0c\u9700\u8981\u518d\u6b21\u6267\u884c\u811a\u672c\u3002<\/li>\n<li>\u5f53\u5c4f\u5e55\u53d1\u751f\u6539\u53d8\uff0c\u9700\u8981\u8c03\u6574\u811a\u672c\u4e2d\u56fa\u5316\u7684\u53c2\u6570\uff0c\u6216\u8c03\u6574\u6267\u884c\u811a\u672c\u7684\u8f93\u5165\u53c2\u6570<\/li>\n<li>\u5982\u679c\u5c4f\u5e55\u4f7f\u7528\u4e86\u76f8\u540c\u7684\u9a71\u52a8ic\uff0c\u4f1a\u770b\u5230\u540c\u6837\u7684VID\uff0c\u8fd9\u6837\u5b50\u4f1a\u96be\u4ee5\u533a\u5206\u3002\u8fd9\u65f6\u5019\u628a[1]\u5904\u7684\u5224\u65ad\u6761\u4ef6\u6539\u6210\u6309\u540d\u79f0\u6216\u8005\u5176\u4ed6\u4e0d\u540c\u7684\u53c2\u6570\uff0c\u4e5f\u80fd\u591f\u81ea\u52a8\u9002\u914d\u3002\u4f46\u4e24\u5757\u5b8c\u5168\u4e00\u6837\u7684\u5c4f\u5e55\uff0c\u73b0\u9636\u6bb5\u8fd8\u6ca1\u60f3\u5230\u89e3\u51b3\u65b9\u6cd5\uff0c\u53ea\u80fd\u81ea\u5df1\u624b\u52a8\u6620\u5c04\u8bd5\u8bd5\u4e86\u3002<\/li>\n<\/ol>\n<h2>\u89e6\u5c4f\u6821\u51c6\uff08\u5982\u679c\u9700\u8981\uff09<\/h2>\n<p>\u7f51\u4e0a\u8bf4\u7684\u5229\u7528\u6821\u51c6\u6765\u533a\u5206\u591a\u89e6\u6478\u5c4f\u7684\u65b9\u6cd5\u662f<strong>\u5b8c\u5168\u9519\u8bef<\/strong>\u7684\uff0c\u4ec5\u9002\u7528\u4e8e\u4ed6\u4eec\u7684\u4ea7\u54c1\u800c\u4e0d\u662f\u901a\u7528\u89e3\u51b3\u65b9\u6848\uff0c\u5f88\u591a\u4eba\u5c31\u662f\u6284\u6765\u6284\u53bb\u800c\u5df2\u3002\u4f46\u662f\u5982\u679c\u9047\u5230\u89e6\u6478\u504f\u79fb\uff0c\u8fd8\u662f\u6709\u9700\u8981\u8fdb\u884c\u6821\u51c6\u7684\uff0c\u6821\u51c6\u65b9\u6cd5\u4e3a\uff08\u6700\u540e\u4e00\u6b65\u9700\u8981\u7504\u522b\uff0c\u6709\u4e9b\u7cfb\u7edf\u6ca1\u6709\u8fd9\u4e2a\u76ee\u5f55\uff09<\/p>\n<ul>\n<li><code>sudo apt install xinput-calibrator<\/code>\uff0c\u9700\u8981\u66f4\u65b0\u6e90<\/li>\n<li><code>sudo xinput_calibrator<\/code><\/li>\n<li>\u5c06\u6821\u51c6\u4fe1\u606f\u4fdd\u5b58\u5230<code>\/usr\/share\/X11\/xorg.conf.d\/10-evdev.conf<\/code>\u7684&#8221;Driver evdev\u201d\u4e0b\u9762\u4e00\u884c\uff0c\u91cd\u542f\u751f\u6548\u3002<\/li>\n<\/ul>\n<h2>\u53c2\u8003\uff1a<\/h2>\n<p>[1]https:\/\/blog.csdn.net\/yuan_da_xian\/article\/details\/72864008<br \/>\n[2]https:\/\/blog.csdn.net\/qq_33406883\/article\/details\/106649087<br \/>\n[3]https:\/\/segmentfault.com\/a\/1190000020334077<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2021-03-22\u66f4\u65b0\u90e8\u5206\u5185\u5bb9 2021-04-28\u518d\u6b21\u66f4\u65b0\u5185\u5bb9 \u95ee\u9898\u6765\u6e90 \u6700\u8fd1\u5ba2\u6237\u8981\u6c42\u4f7f\u7528\u4fe1\u521b\u5e73\u53f0\uff0c\u5373\u56fd\u4ea7 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[3,4,5],"_links":{"self":[{"href":"https:\/\/wp.small09.top\/index.php?rest_route=\/wp\/v2\/posts\/23"}],"collection":[{"href":"https:\/\/wp.small09.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.small09.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.small09.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.small09.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=23"}],"version-history":[{"count":1,"href":"https:\/\/wp.small09.top\/index.php?rest_route=\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":25,"href":"https:\/\/wp.small09.top\/index.php?rest_route=\/wp\/v2\/posts\/23\/revisions\/25"}],"wp:attachment":[{"href":"https:\/\/wp.small09.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.small09.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.small09.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}