/usr/share/X11/xorg.conf.d/20-intel.conf
ファイルに以下の内容を記述.
Section "Device" Identifier "intelgpu0" Driver "intel" Option "VirtualHeads" "2" EndSection
xorg再起動.
cvtコマンドで利用したい解像度の情報を取得.
$ cvt -r 640 480 # 640x480 59.46 Hz (CVT 0.31M3-R) hsync: 29.38 kHz; pclk: 23.50 MHz Modeline "640x480R" 23.50 640 688 720 800 480 483 487 494 +hsync -vsync (reverse-i-search)`addm': xrandr --^Cdmode VIRTUAL1 800x600R
cvtコマンドの結果からxrandr –newmode に設定
$ xrandr --newmode "640x480R" 23.50 640 688 720 800 480 483 487 494 +hsync -vsync
xrandr –addmode で反映
$ xrandr --addmode VIRTUAL1 640x480R
arandr等で設定.
以下のようなscriptを用意しておくと便利. 4つの解像度を設定して仮想モニタを有効にしてx11vncを起動している.スマートフォンなどをサブモニタに. 最後のxrandrはarandrで設定後書き出したものをそのまま書いている.
#!/bin/sh #$ cvt -r 640 480 ## 640x480 59.46 Hz (CVT 0.31M3-R) hsync: 29.38 kHz; pclk: 23.50 MHz #Modeline "640x480R" 23.50 640 688 720 800 480 483 487 494 +hsync -vsync #(reverse-i-search)`addm': xrandr --^Cdmode VIRTUAL1 800x600R xrandr --newmode "1280x720R" 63.75 1280 1328 1360 1440 720 723 728 741 +hsync -vsync xrandr --newmode "800x600R" 35.50 800 848 880 960 600 603 607 618 +hsync -vsync xrandr --newmode "720x405R" 21.75 720 768 800 880 405 408 413 419 +hsync -vsync xrandr --newmode "640x480R" 23.50 640 688 720 800 480 483 487 494 +hsync -vsync xrandr --addmode VIRTUAL1 1280x720R xrandr --addmode VIRTUAL1 800x600R xrandr --addmode VIRTUAL1 720x405R xrandr --addmode VIRTUAL1 640x480R #arandr # arandr export xrandr --output eDP1 --primary --mode 1366x768 --pos 0x0 --rotate normal --output DP1 --off --output DP2 --off --output HDMI1 --off --output HDMI2 --off --output VIRTUAL1 --mode 1280x720R --pos 1366x0 --rotate normal --output VIRTUAL2 --off #Deskreen.AppImage & x11vnc -display :0 -clip 720x405+1366+0 -forever -avahi &
$ dpkg-query -W xorg arandr arandr 0.1.10-1.1 xorg 1:7.7+22 $ lsb_release -dr Description: Debian GNU/Linux 11 (bullseye) Release: 11 $ arch x86_64
ハードウェアのダミープラグも50〜100Ωの抵抗機x3で作れるようだが未確認.
2022-01-08の小江戸らぐで発表
eDP1 が内蔵モニタ,それ以外は利用していない状態.
$ xrandr Screen 0: minimum 8 x 8, current 1366 x 768, maximum 32767 x 32767 eDP1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 280mm x 160mm 1366x768 60.00*+ 1360x768 59.96 1280x720 59.86 60.00 59.74 1024x768 60.00 1024x576 60.00 59.90 59.82 960x540 60.00 59.63 59.82 800x600 60.32 56.25 864x486 60.00 59.92 59.57 640x480 59.94 720x405 59.51 60.00 58.99 680x384 60.00 640x360 59.84 59.32 60.00 DP1 disconnected (normal left inverted right x axis y axis) DP2 disconnected (normal left inverted right x axis y axis) HDMI1 disconnected (normal left inverted right x axis y axis) HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI2 を仮想モニタとして使うために /sys/kernel/debug/dri/0/HDMI-A-2/force
を on
に.
有効になるのでxrandrやarandr等でアクティブにして利用する
$ echo on | sudo tee /sys/kernel/debug/dri/0/HDMI-A-2/force on matoken@yoga-260:~$ xrandr Screen 0: minimum 8 x 8, current 1366 x 768, maximum 32767 x 32767 eDP1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 280mm x 160mm 1366x768 60.00*+ 1360x768 59.96 1280x720 59.86 60.00 59.74 1024x768 60.00 1024x576 60.00 59.90 59.82 960x540 60.00 59.63 59.82 800x600 60.32 56.25 864x486 60.00 59.92 59.57 640x480 59.94 720x405 59.51 60.00 58.99 680x384 60.00 640x360 59.84 59.32 60.00 DP1 disconnected (normal left inverted right x axis y axis) DP2 disconnected (normal left inverted right x axis y axis) HDMI1 disconnected (normal left inverted right x axis y axis) HDMI2 connected (normal left inverted right x axis y axis) 1024x768 60.00 800x600 60.32 56.25 848x480 60.00 640x480 59.94
狭いモニタなどで解像度が低く使いづらいときなどに.
$ xrandr | grep ^eDP1 eDP1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 280mm x 160mm $ xrandr --output eDP1 --scale 1.25x1.25 $ xrandr | grep ^eDP1 eDP1 connected primary 1708x960+0+0 (normal left inverted right x axis y axis) 280mm x 160mm
コメント