# GDM configuration storage
[daemon]
InitialSetupEnable=False
TimedLogin=guest
TimedLoginDelay=10
TimedLoginEnable=true
[security]
[xdmcp]
[greeter]
[chooser]
[debug]
(2) ~/.config/autostart/autostart.desktop を作成します。
[Desktop Entry]
Name=MyAutoExecScript
GenericName=My Auto execution script
Comment=Some description about your script
Exec=/root/.xsession
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true
(3) ~/.config/autostart/autostart.desktop の権限を設定します。
# chmod 644 ~/.config/autostart/autostart.desktop
(4) /root/.xsesssion を作成します。
#!/bin/bash
/usr/bin/glxgears
(5) ~/.xesessionの権限を設定します。
# chmod 755 ~/.xesession
オンボードグラフィックカード:radeon: BusID "PCI:2:0:0"
Nvidia(グラフィック)カード:Nvidia: BusID "PCI:101:0:0"
記設定例に示すようにNvidiaの設定をすべてコメントにするか削除してください。
# mv /lib64/xorg/modules/xxx.libglamoregl.so.RPMSAVE /lib64/xorg/modules/libglamoregl.so
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
#Screen 1 "Screen1" RightOf "Screen0"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
ModulePath "/usr/lib64/xorg/modules"
FontPath "catalogue:/etc/X11/fontpath.d"
FontPath "built-ins"
EndSection
#Section "Module"
# Load "glx"
# Load "glxserver_nvidia"
#EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection
#Section "Monitor"
# Identifier "Monitor1"
# VendorName "Monitor Vendor"
# ModelName "Monitor Model"
#EndSection
Section "Device"
Identifier "Card0"
Driver "radeon"
BusID "PCI:2:0:0"
EndSection
#Section "Device"
# Identifier "Card1"
# Driver "nvidia"
# BusID "PCI:101:0:0"
#EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
#Section "Screen"
# Identifier "Screen1"
# Device "Card1"
# Monitor "Monitor1"
# SubSection "Display"
# Viewport 0 0
# Depth 24
# EndSubSection
#EndSection
# lsmod|grep nvidia
nvidia_uvm 1134592 0
nvidia_drm 65536 1
nvidia_modeset 1200128 2 nvidia_drm
nvidia 35311616 35 nvidia_uvm,nvidia_modeset
drm_kms_helper 270336 2 radeon,nvidia_drm
drm 548864 10 drm_kms_helper,nvidia,radeon,nvidia_drm,ttm
# nvidia-smi
Mon Mar 18 14:58:47 2024
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.74 Driver Version: 470.74 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Quadro P1000 On | 00000000:65:00.0 On | N/A |
| 34% 32C P8 N/A / N/A | 51MiB / 4040MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
# cd /lib/modules/`uname -r`/build
# ./ccur-config -n -c
# make -C /lib/modules/`uname -r`/build SUBDIRS=/lib/modules/`uname -r`/build/drivers/hid REDHAWKFLAVOR=`cat /proc/ccur/flavor` -e "CONFIG_HID_MULTITOUCH=m" -e "CONFIG_HID_KENSINGTON=m" modules
# make -C /lib/modules/`uname -r`/build SUBDIRS=/lib/modules/`uname -r`/build/drivers/hid REDHAWKFLAVOR=`cat /proc/ccur/flavor` -e "CONFIG_HID_MULTITOUCH=m" -e "CONFIG_HID_KENSINGTON=m" modules_install
# depmod
# xmodmap -e "pointer = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16“
# xmodmap -pp
There are 16 pointer buttons defined.
Physical Button
Button Code
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
16 16
(2) xevを動作させて、Button をクリックしてデバイスのボタンイベント番号を確認してください。
Section "InputClass"
Identifier "libinput ignore Logitech"
MatchProduct "Kensington Slimblade Trackball"
Driver "libinput"
Option "Ignore" "True"
EndSection
Section "InputClass"
Identifier "evdev for Logitech"
MatchProduct "Kensington Slimblade Trackball"
Driver "evdev"
Option "Ignore" "False"
EndSection
Section "InputClass"
Identifier "EmulateWheeland change button"
MatchProduct "Kensington Slimblade Trackball"
Option "EmulateWheel" "True"
Option "EmulateWheelButton" "10"
Option "YAxisMapping" "4 5"
EndSection
Option "YAxisMapping" "N1 N2"は、ホイール エミュレーション モードで、どのボタンを Y 方向のモーションにマップするかを指定します。
[ 2070.155] (II) No input driver specified, ignoring this device.
[ 2070.155] (II) This device may have been added with another device file.
[ 2070.156] (II) config/udev: Adding input device Kensington Slimblade Trackball (/dev/input/event7)
[ 2070.156] (**) Kensington Slimblade Trackball: Applying InputClass "evdev pointer catchall"
[ 2070.156] (**) Kensington Slimblade Trackball: Applying InputClass "change button"
[ 2070.156] (II) Using input driver 'evdev' for 'Kensington Slimblade Trackball'
[ 2070.156] (**) Kensington Slimblade Trackball: always reports core events
[ 2070.156] (**) evdev: Kensington Slimblade Trackball: Device: "/dev/input/event7"
[ 2070.207] (--) evdev: Kensington Slimblade Trackball: Vendor 0x47d Product 0x2041
[ 2070.207] (--) evdev: Kensington Slimblade Trackball: Found 11 mouse buttons
[ 2070.207] (--) evdev: Kensington Slimblade Trackball: Found scroll wheel(s)
[ 2070.207] (--) evdev: Kensington Slimblade Trackball: Found relative axes
[ 2070.207] (--) evdev: Kensington Slimblade Trackball: Found x and y relative axes
[ 2070.207] (II) evdev: Kensington Slimblade Trackball: Configuring as mouse
[ 2070.207] (II) evdev: Kensington Slimblade Trackball: Adding scrollwheel support
[ 2070.207] (**) Option "EmulateWheel" "True"
[ 2070.207] (**) Option "EmulateWheelButton" "10"
[ 2070.207] (**) Option "YAxisMapping" "4 5"
[ 2070.207] (**) evdev: Kensington Slimblade Trackball: YAxisMapping: buttons 4 and 5
[ 2070.207] (**) evdev: Kensington Slimblade Trackball: EmulateWheelButton: 10, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[ 2070.207] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.2/1-8.2:1.0/0003:047D:2041.0004/input/input9/event7"
[ 2070.207] (II) XINPUT: Adding extended input device "Kensington Slimblade Trackball" (type: MOUSE, id 11)
[ 2070.207] (II) evdev: Kensington Slimblade Trackball: initialized for relative axes.
[ 2070.207] (**) Kensington Slimblade Trackball: (accel) keeping acceleration scheme 1
[ 2070.207] (**) Kensington Slimblade Trackball: (accel) acceleration profile 0
[ 2070.207] (**) Kensington Slimblade Trackball: (accel) acceleration factor: 2.000
[ 2070.207] (**) Kensington Slimblade Trackball: (accel) acceleration threshold: 4
[ 2070.207] (II) config/udev: Adding input device Kensington Slimblade Trackball (/dev/input/mouse2)
[ 2070.207] (**) Kensington Slimblade Trackball: Applying InputClass "change button"
上記設定どおりになっていれば、右上(Button 10)を押しながらトラックボールを上下させれば、gnome-terminalのスクロールが発生するはずです。
Section "InputClass"
Identifier "Emulate Wheel and change button"
MatchProduct "Kensington Slimblade Trackball"
Option "ButtonMapping" "1 0 3 4 5 6 7 8 9 10 11 12 13 14 15 16"
Option "EmulateWheel" "True"
Option "EmulateWheelButton" "10"
Option "YAxisMapping" "4 5"
EndSection
Option "ButtonMapping"は、このデバイスのボタン マッピングを設定します。
[ 4622.185] (**) evdev: Kensington Slimblade Trackball: ButtonMapping '1 0 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
# xprop -name 'My window name' -format _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS 2
この-name 'My window name'の代わりに -id を利用するには、下記のようにxpropに対してオプション無しで起動することで、どのウィンドウを対象にするのかクリック指定できます。
# xprop|grep "WM_CLIENT_LEADER(WINDOW):"
WM_CLIENT_LEADER(WINDOW): window id # 0x2600001
# xprop -id 0x2600001 -format _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS 2
また、xpropに対して、明確に指定対象が無い場合、十字カーソルで対象を指定することが出来ます。設定値 | 移動 | タイトル | リサイズ |
0(リセット) | 可能 | あり | 可能 |
1 | 不可 | あり | 可能 |
2 | 可能 | 無し | 不可 |
3 | 不可 | 無し | 不可 |
# xprop -format _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS 0 元の状態
# xprop -format _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS 1 移動不可、タイトルあり、リサイズ可
# xprop -format _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS 2 移動可 、タイトルなし、リサイズ不可
# xprop -format _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS 3 移動不可、タイトルなし、リサイズ不可
また、冗長な指定も可能です。
デコレーションを削除するには:
# xprop -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"
デコレーションを追加するには:
# xprop -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x1, 0x0, 0x0"
RedHawk7.x RedHawk8.x
# loginctl # loginctl
SESSION UID USER SEAT SESSION UID USER SEAT TTY
1 0 root seat0 2 0 root seat0 tty2
c1 42 gdm seat0 tty1
DISPLAY=:0の時、vt1
DISPLAY=:1の時、vt2
:
RedHawk7.x
# ls -l /usr/bin/X*
lrwxrwxrwx. 1 root root 4 10月 3 2019 /usr/bin/X -> Xorg
-rwsr-xr-x. 1 root root 2409344 4月 12 2018 /usr/bin/Xorg
-rwxr-xr-x. 1 root root 2487184 4月 11 2018 /usr/bin/Xvnc
# file /usr/bin/Xorg
/usr/bin/Xorg: setuid ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=2bd2e8f106d0ab1b93a101be4baefcee574bd6a3, stripped
RedHawk8.x
# ls -l /usr/bin/X*
lrwxrwxrwx 1 root root 4 1月 5 01:28 /usr/bin/X -> Xorg
-rwxr-xr-x 1 root root 273 4月 22 12:19 /usr/bin/Xorg
-rwxr-xr-x 1 root root 2672024 1月 5 01:27 /usr/bin/Xvnc
-rwxr-xr-x 1 root root 2373040 1月 5 01:29 /usr/bin/Xwayland
# file /usr/bin/Xorg
/usr/bin/Xorg: POSIX shell script, ASCII text executable
# cat /usr/bin/Xorg
#!/bin/sh
#
# Execute Xorg.wrap if it exists otherwise execute Xorg directly.
# This allows distros to put the suid wrapper in a separate package.
basedir=/usr/libexec
if [ -x "$basedir"/Xorg.wrap ]; then
exec "$basedir"/Xorg.wrap "$@"
else
exec "$basedir"/Xorg "$@"
fi
# ls -l /usr/libexec/Xorg*
-rwxr-xr-x 1 root root 2473792 1月 5 01:29 /usr/libexec/Xorg
-rwsr-xr-x 1 root root 12776 1月 5 01:29 /usr/libexec/Xorg.wrap
RedHawk7.x
# ps -efl|grep X
4 S root 6427 6196 0 80 0 - 70663 ep_pol 13:17 tty1 00:00:02 /usr/bin/X :0 -background none -noreset -audit 4 -verbose -auth /run/gdm/auth-for-gdm-u1Bahp/database -seat seat0 -nolisten tcp vt1
RedHawk8.x
# ps -efl|grep X
4 S root 14181 14166 0 80 0 - 81033 - 13:45 tty1 00:00:01 /usr/libexec/Xorg vt1 -displayfd 3 -auth /run/user/42/gdm/Xauthority -background none -noreset -keeptty -novtswitch -verbose 3
4 S root 14823 14821 1 80 0 - 89199 - 13:46 tty2 00:00:01 /usr/libexec/Xorg vt2 -displayfd 3 -auth /run/user/0/gdm/Xauthority -background none -noreset -keeptty -novtswitch -verbose 3
詳細は、RedHawk7と
RedHawk8のプロセスツリーを参照してください。
RedHawk7,8のXorg及びgnome3では、以下の制限があります。
(0,0) (1919,0) (1920,0) (3839,0)
+--------------------+---------------------+
| gnome window manager |
| (ibus-engine) |
| DISPLAY=:0 DISPLAY=:0 |
| または |
| DISPLAY=:1 DISPLAY=:1 |
| |
+--------------------+---------------------+
(0,1079) (1919,1079) (1920,1079) (3889,1079)
(2) シングルX,デュアルスクリーン(Singleボード構成)
(0,0) (1919,0) (0,0) (1919,0)
+--------------------+---------------------+
|gnome window manager| No window manager |
| (ibus-engine) | |
| DISPLAY=:0.0 | DISPLAY=:0.1 |
| または |
| DISPLAY=:1.0 | DISPLAY=:1.1 |
| | |
+--------------------+---------------------+
(0,1079) (1919,1079) (0,1079) (1919,1079)
(3) デュアルX,デュアルスクリーン(Dualボード構成)
(0,0) (1919,0) (0,0) (1919,0)
+--------------------+---------------------+
|gnome window manager|gnome window manager |
| (ibus-engine) |(ibus-engine) |
| DISPLAY=:0 | DISPLAY=:1 |
| または |
| DISPLAY=:1 | DISPLAY=:2 |
| | |
+--------------------+---------------------+
(0,1079) (1919,1079) (0,1079) (1919,1079)
(4) トリプルX,デュアルスクリーン(Singleボード構成)
(0,0) (1919,0) (1920,0) (3839,0)
+--------------------+---------------------+
| No window manager |
| |
| DISPLAY=:0 |
| |
| Xorg |
+--------------------+---------------------+
+--------------------+---------------------+
|gnome window manager|gnome window manager |
| (ibus-engine) |(ibus-engine) |
| | |
| DISPLAY=:1 | DISPLAY=:2 |
| | |
| Xephyr | Xephyr |
+--------------------+---------------------+
(0,1079) (1919,1079) (0,1079) (1919,1079)
#!/bin/sh
#
# 1st Xorg(DISPLAY=:0)
#
export LANG=ja_JP.UTF8
Xorg :0 &
sleep 1
#
# 2nd Xorg Left Side (DISPLAY=:1)
#
DISPLAY=:0 Xephyr +iglx -screen 1920x1080+0+0 :1 &
sleep 1
#
# 最初は gnome-session
#
DISPLAY=:1 gnome-session &
/usr/libexec/gvfsd-fuse /run/user/0/gvfs -f -o big_writes &
sleep 1
#
# 3rd Xorg Right Side(DISPLAY=:2)
#
DISPLAY=:0 Xephyr +iglx -screen 1920x1080+1920+0 :2 &
sleep 1
#
# 2つめ以降は、gnome-shell
#
DISPLAY=:2 dbus-launch gnome-shell &
#
# Touchscreen Setup(複数タッチスクリーンの調整を参照)
#
DISPLAY=:0 xinput set-float-prop 12 "Coordinate Transformation Matrix" 0.500000 0.000000 0.500000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000
DISPLAY=:0 xinput set-float-prop 13 "Coordinate Transformation Matrix" 0.500000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000
(5) 複数タッチスクリーンの調整
(0,0) (1919,0) (1920,0) (3839,0)
+--------------------+---------------------+
| gnome window manager |
| (ibus-engine) |
| DISPLAY=:0 DISPLAY=:0 |
| または |
| DISPLAY=:1 DISPLAY=:1 |
| |
+--------------------+---------------------+
(0,1079) (1919,1079) (1920,1079) (3889,1079)
Xサーバは、以下の計算を行い補正を行います。
# xinput
+ Virtual core pointer id=2 [master pointer (3)]
| L Virtual core XTEST pointer id=4 [slave pointer (2)]
| L PixArt USB Optical Mouse id=8 [slave pointer (2)]
| L Dell KB216 Wired Keyboard id=10 [slave pointer (2)]
| L Advanced Silicon S.A. CoolTouch(TM) System id=12 [slave pointer (2)]
| L Advanced Silicon S.A. CoolTouch(TM) System id=13 [slave pointer (2)]
L Virtual core keyboard id=3 [master keyboard (2)]
| Virtual core XTEST keyboard id=5 [slave keyboard (3)]
| Power Button id=6 [slave keyboard (3)]
| Power Button id=7 [slave keyboard (3)]
| Dell KB216 Wired Keyboard id=9 [slave keyboard (3)]
L AT Translated Set 2 keyboard id=11 [slave keyboard (3)]
② タッチスクリーンデバイスを指定してプロパティを表示
# xinput list-props 12 # (Left Side)
Device 'Advanced Silicon S.A. CoolTouch(TM) System':
Device Enabled (153): 1
Coordinate Transformation Matrix (155): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (283): 0
Device Accel Constant Deceleration (284): 1.000000
Device Accel Adaptive Deceleration (285): 1.000000
Device Accel Velocity Scaling (286): 10.000000
Device Product ID (273): 8521, 8482
Device Node (274): "/dev/input/event7"
Evdev Axis Inversion (287): 0, 0
Evdev Axis Calibration (288): 274, 32621, -111, 32939
Evdev Axes Swap (289): 0
Axis Labels (290): "Abs MT Position X" (529), "Abs MT Position Y" (530), "None" (0), "None" (0)
Button Labels (291): "Button Unknown" (276), "Button Unknown" (276), "Button Unknown" (276), "Button Wheel Up" (159), "Button Wheel Down" (160)
Evdev Scrolling Distance (292): 0, 0, 0
Evdev Middle Button Emulation (293): 0
Evdev Middle Button Timeout (294): 50
Evdev Third Button Emulation (295): 0
Evdev Third Button Emulation Timeout (296): 1000
Evdev Third Button Emulation Button (297): 3
Evdev Third Button Emulation Threshold (298): 20
Evdev Wheel Emulation (299): 0
Evdev Wheel Emulation Axes (300): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (301): 10
Evdev Wheel Emulation Timeout (302): 200
Evdev Wheel Emulation Button (303): 4
# xinput list-props 13 #Right Side
Device 'Advanced Silicon S.A. CoolTouch(TM) System':
Device Enabled (153): 1
Coordinate Transformation Matrix (155): 0.500000, 0.000000, 0.500000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (283): 0
Device Accel Constant Deceleration (284): 1.000000
Device Accel Adaptive Deceleration (285): 1.000000
Device Accel Velocity Scaling (286): 10.000000
Device Product ID (273): 8521, 8482
Device Node (274): "/dev/input/event8"
Evdev Axis Inversion (287): 0, 0
Evdev Axis Calibration (288): 274, 32621, -111, 32939
Evdev Axes Swap (289): 0
Axis Labels (290): "Abs MT Position X" (529), "Abs MT Position Y" (530), "None" (0), "None" (0)
Button Labels (291): "Button Unknown" (276), "Button Unknown" (276), "Button Unknown" (276), "Button Wheel Up" (159), "Button Wheel Down" (160)
Evdev Scrolling Distance (292): 0, 0, 0
Evdev Middle Button Emulation (293): 0
Evdev Middle Button Timeout (294): 50
Evdev Third Button Emulation (295): 0
Evdev Third Button Emulation Timeout (296): 1000
Evdev Third Button Emulation Button (297): 3
Evdev Third Button Emulation Threshold (298): 20
Evdev Wheel Emulation (299): 0
Evdev Wheel Emulation Axes (300): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (301): 10
Evdev Wheel Emulation Timeout (302): 200
Evdev Wheel Emulation Button (303): 4
Evdev Drag Lock Buttons (304): 0
Evdev Drag Lock Buttons (304): 0
③ "Coordinate Transformation Matrix"値を変更します。(ブランク区切りです)
# xinput set-float-prop 12 "Coordinate Transformation Matrix" 0.500000 0.000000 0.500000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000
# xinput set-float-prop 13 "Coordinate Transformation Matrix" 0.500000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000
# ls -l /dev/input/by-path/*usb*-event-kbd* /dev/input/by-path/*usb*-event-mouse*
lrwxrwxrwx 1 root root 9 8月 27 13:20 /dev/input/by-path/pci-0000:00:14.0-usb-0:14:1.0-event-mouse -> ../event5
lrwxrwxrwx 1 root root 9 8月 27 13:20 /dev/input/by-path/pci-0000:00:14.0-usb-0:4:1.0-event-kbd -> ../event3
lrwxrwxrwx 1 root root 9 8月 27 13:27 /dev/input/by-path/pci-0000:00:14.0-usb-0:8.1:1.0-event-mouse -> ../event8
lrwxrwxrwx 1 root root 9 8月 27 13:21 /dev/input/by-path/pci-0000:00:14.0-usb-0:8.2:1.0-event-kbd -> ../event6
#
# Xorg#1 側 /etc/X11/xorg.conf
#
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "IsolateDevice" "PCI:23:0:0"
Option "Sharevts" "True"
EndSection
Section "Files"
FontPath "/usr/share/fonts/default/Type1"
EndSection
#
# Xorg#1 側で使用しないデバイスをIgnoreする
# この時、/dev/input/by-path/や/dev/input/by-id/指定は動作しない(注1)
Section "InputClass"
Identifier "IgnoreDevice68"
MatchDevicePath "/dev/input/event[68]"
Option "Ignore" "True"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "evdev"
Option "GrabDevice" "True"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "evdev"
Option "GrabDevice" "True"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BusID "PCI:23:0:0"
Option "UseDisplayDevice" "DP-3"
Option "ProbeAllGpus" "false"
Option "MultiGPU" "no"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "SERVERFLAGS"
Option "MaxClients" "512"
Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
Option "AutoAddGPU" "false"
EndSection
#
# Xorg#2 側 /etc/X11/xorg.conf.2nd
#
Section "ServerLayout"
Identifier "Layout0"
Screen 1 "Screen1"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "IsolateDevice" "PCI:6:0:0"
EndSection
Section "Files"
FontPath "/usr/share/fonts/default/Type1"
EndSection
#
# Xorg#2 側で使用しないデバイスをIgnoreする
# この時、/dev/input/by-path/や/dev/input/by-id/指定は動作しない(注1)
Section "InputClass"
Identifier "IgnoreDevice35"
MatchDevicePath "/dev/input/event[35]"
Option "Ignore" "True"
EndSection
Section "InputDevice"
Identifier "Mouse1"
Driver "evdev"
Option "GrabDevice" "True"
EndSection
Section "InputDevice"
Identifier "Keyboard1"
Driver "evdev"
Option "GrabDevice" "True"
EndSection
Section "Monitor"
Identifier "Monitor1"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 28.0 - 33.0
VertRefresh 43.0 - 72.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BusID "PCI:6:0:0"
Option "ProbeAllGpus" "false"
Option "MultiGPU" "no"
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
Section "SERVERFLAGS"
Option "MaxClients" "512"
Option "DontVTSwitch" "yes"
Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
Option "AutoAddGPU" "false"
EndSection
(注1)
上記サンプル構成ファイルでは、usbのベンダーIDとデバイスIDのペアを利用し、デバイスの区別を行うことも出来ます。
# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
Bus 001 Device 003: ID 413c:2113 Dell Computer Corp. Xorg #1用キーボード
Bus 001 Device 022: ID 17ef:602e Lenovo Xorg #1用マウス
Bus 001 Device 012: ID 413c:2107 Dell Computer Corp. Xorg #2用キーボード
Bus 001 Device 018: ID 413c:3012 Dell Computer Corp. Optical Wheel Mouse Xorg #2用マウス
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Section "InputClass"
Identifier "IgnoreDevice3"
#MatchDevicePath "/dev/input/event3"
MatchUSBID "413c:2113"
Option "Ignore" "True"
EndSection
Section "InputClass"
Identifier "IgnoreDevice5"
#MatchDevicePath "/dev/input/event5"
MatchUSBID "17ef:602e"
Option "Ignore" "True"
EndSection
Section "InputClass"
Identifier "IgnoreDevice6"
#MatchDevicePath "/dev/input/event6"
MatchUSBID "413c:2107"
Option "Ignore" "True"
EndSection
Section "InputClass"
Identifier "IgnoreDevice8"
#MatchDevicePath "/dev/input/event8"
MatchUSBID "413c:3012"
Option "Ignore" "True"
EndSection
[Desktop Entry]
Type=Application
Exec=/usr/local/bin/2ndgnome
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[ja_JP]=2nd window manager
Name=2nd window manager
Comment[ja_JP]=
Comment=
#!/bin/sh
export LANG=ja_JP.UTF-8;
/usr/bin/startx -- :1 vt1 -sharevts -config /etc/X11/xorg.conf.2nd
Section "Files"
FontPath "/usr/share/fonts/default/Type1"
ModulePath "/opt/centos/lib64/xorg/modules"
EndSection
当然オンボード側のデバイスドライバはNvidiaではありませんので、fbdevを指定し 必ずBusIDを記述します。
Section "Device"
Identifier "Device0"
Driver "fbdev"
VendorName "Onboard"
BusID "PCI:2:0:0"
EndSection
if [ "$DISPLAY" == ":1" ]
then
export LD_LIBRARY_PATH=/opt/centos/lib64:/opt/centos/lib:/usr/lib64:/usr/lib
fi
+------------------------------\___
| (4) (3) (2) (1) |
| [---] [---] [---] [---] |
+------------------------------/~~~
DP-5 DP-7 DP-1 DP-3
/var/log/Xor.0.logでは、下記の様にBIOS表示ディスプレイとして、bootデバイスが表示されています。
# fgrep DFP /var/log/Xor.0.log
[ 32.350] (--) NVIDIA(0): DFP-0
[ 32.350] (--) NVIDIA(0): DFP-1
[ 32.350] (--) NVIDIA(0): DFP-2
[ 32.350] (--) NVIDIA(0): DFP-3 (boot)
[ 32.350] (--) NVIDIA(0): DFP-4
[ 32.350] (--) NVIDIA(0): DFP-5
[ 32.350] (--) NVIDIA(0): DFP-6
[ 32.350] (--) NVIDIA(0): DFP-7
:
:
通常、2ディスプレイ構成の場合、1,2番目のディスプレイポートに接続しますが、内部的には、DP-3とDP-1に接続しているので、DP-1がプライマリディスプレイになり、BIOS表示ディスプレイと異なるディスプレイでログインする事になります。
# xrandr
Screen 0: minimum 8 x 8, current 3840 x 1100, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 connected 1920x1080+1920+20 (normal left inverted right x axis y axis) 477mm x 268mm
1920x1080 60.00*+
1280x1024 75.02 60.02
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
640x480 75.00 59.94
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
1920x1080 60.00*+
1280x1024 75.02 60.02
1152x864 75.00
1024x768 75.03 60.00
800x600 75.00 60.32
640x480 75.00 59.94
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)
DP-6 disconnected (normal left inverted right x axis y axis)
DP-7 disconnected (normal left inverted right x axis y axis)
「gnome-control-centor」を起動して、「デバイス」→ 「Displays」 を選択し、以下の様にマウスでディスプレイ1の位置を移動してから、適用してください。
<monitors version="2">
<configuration>
<logicalmonitor>
<x>1920</x>
<y>20</y>
<scale>1</scale>
<primary>no</primary>
<monitor>
<monitorspec>
<connector>DP-1</connector>
<vendor>DEL</vendor>
<product>DELL S2240T</product>
<serial>Y0HPW67A0C8U</serial>
</monitorspec>
<mode>
<width>1920</width>
<height>1080</height>
<rate>60</rate>
</mode>
</monitor>
</logicalmonitor>
<logicalmonitor>
<x>0</x>
<y>0</y>
<scale>1</scale>
<primary>yes</primary>
<monitor>
<monitorspec>
<connector>DP-3</connector>
<vendor>DEL</vendor>
<product>DELL S2240T</product>
<serial>Y0HPW59G064U</serial>
</monitorspec>
<mode>
<width>1920</width>
<height>1080</height>
<rate>60</rate>
</mode>
</monitor>
</logicalmonitor>
</configuration>
</monitors>
再起動すると、bootデバイスからログインできるようになります。