KDOC 200: X windowのログを見る
この文書のステータス
- 作成
- 2024-07-20 貴島
- レビュー
- 2024-07-22 貴島
概要
X Window Systemアプリケーションをデバッグ、学習するために、ログを確認する。
xtrace -o output.log ./app
000:<:0001: 20: Request(55): CreateGC cid=0x05600001 drawable=0x00000773 values={foreground=0x00ffffff}
000:<:0002: 40: Request(1): CreateWindow depth=0x18 window=0x05600002 parent=0x00000773 x=-1000 y=-1000 width=1 height=1 border-width=0 class=InputOutput(0x0001) visual=0x00000021 value-list={override-redirect=true(0x01) event-mask=PropertyChange}
000:<:0003: 8: Request(8): MapWindow window=0x05600002
000:<:0004: 16: Request(98): QueryExtension name='XINERAMA'
000:>:0004:32: Reply to QueryExtension: present=true(0x01) major-opcode=141 first-event=0 first-error=0
このようにリクエスト、レスポンスする様子や値を確認できる。
また、システムのログを見るとおもしろい。
head /var/log/Xorg.0.log -n 50
[193692.808]
X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
[193692.808] Current Operating System: Linux orange-ThinkPad-X1-Carbon-Gen-10 5.15.0-105-generic #115-Ubuntu SMP Mon Apr 15 09:52:04 UTC 2024 x86_64
[193692.808] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.15.0-105-generic root=UUID=2ef9dd21-ea63-4656-8249-b9355b9d7052 ro quiet splash
[193692.808] xorg-server 2:21.1.4-2ubuntu1.7~22.04.10 (For technical support please see http://www.ubuntu.com/support)
[193692.808] Current version of pixman: 0.40.0
[193692.808] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[193692.808] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[193692.808] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Jul 16 11:18:22 2024
[193692.808] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[193692.808] (==) No Layout section. Using the first Screen section.
[193692.808] (==) No screen section available. Using defaults.
[193692.808] (**) |-->Screen "Default Screen Section" (0)
[193692.808] (**) | |-->Monitor "<default monitor>"
[193692.808] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[193692.808] (==) Automatically adding devices
[193692.808] (==) Automatically enabling devices
[193692.808] (==) Automatically adding GPU devices
[193692.808] (==) Automatically binding GPU devices
[193692.808] (==) Max clients allowed: 256, resource mask: 0x1fffff
[193692.808] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[193692.808] Entry deleted from font path.
[193692.808] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[193692.808] Entry deleted from font path.
[193692.808] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[193692.808] Entry deleted from font path.
[193692.808] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[193692.808] Entry deleted from font path.
[193692.808] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[193692.808] Entry deleted from font path.
[193692.808] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/Type1,
built-ins
[193692.808] (==) ModulePath set to "/usr/lib/xorg/modules"
[193692.808] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[193692.808] (II) Loader magic: 0x55f1ebf6f020
[193692.808] (II) Module ABI versions:
[193692.808] X.Org ANSI C Emulation: 0.4
[193692.808] X.Org Video Driver: 25.2
[193692.808] X.Org XInput driver : 24.4
[193692.808] X.Org Server Extension : 10.0
[193692.809] (++) using VT number 7
tail /var/log/Xorg.0.log -n 50
[331536.041] (II) modeset(0): EDID vendor "AUO", prod id 53905
[331536.041] (II) modeset(0): Using hsync ranges from config file
[331536.041] (II) modeset(0): Using vrefresh ranges from config file
[331536.041] (II) modeset(0): Printing DDC gathered Modelines:
[331536.041] (II) modeset(0): Modeline "1920x1200"x0.0 156.10 1920 1936 1952 2104 1200 1203 1217 1236 -hsync -vsync (74.2 kHz eP)
[332036.859] (II) modeset(0): EDID vendor "AUO", prod id 53905
[332036.859] (II) modeset(0): Using hsync ranges from config file
[332036.859] (II) modeset(0): Using vrefresh ranges from config file
[332036.859] (II) modeset(0): Printing DDC gathered Modelines:
[332036.859] (II) modeset(0): Modeline "1920x1200"x0.0 156.10 1920 1936 1952 2104 1200 1203 1217 1236 -hsync -vsync (74.2 kHz eP)
[337606.169] (II) config/udev: Adding input device WH-1000XM3 (AVRCP) (/dev/input/event17)
[337606.169] (**) WH-1000XM3 (AVRCP): Applying InputClass "libinput keyboard catchall"
[337606.169] (II) Using input driver 'libinput' for 'WH-1000XM3 (AVRCP)'
[337606.169] (**) WH-1000XM3 (AVRCP): always reports core events
[337606.169] (**) Option "Device" "/dev/input/event17"
[337606.169] (II) event17 - WH-1000XM3 (AVRCP): is tagged by udev as: Keyboard
[337606.170] (II) event17 - WH-1000XM3 (AVRCP): device is a keyboard
[337606.170] (II) event17 - WH-1000XM3 (AVRCP): device removed
[337606.192] (**) Option "config_info" "udev:/sys/devices/virtual/input/input34/event17"
[337606.192] (II) XINPUT: Adding extended input device "WH-1000XM3 (AVRCP)" (type: KEYBOARD, id 18)
[337606.192] (**) Option "xkb_model" "pc105"
[337606.192] (**) Option "xkb_layout" "jp"
[337606.192] (WW) Option "xkb_variant" requires a string value
[337606.192] (WW) Option "xkb_options" requires a string value
[337606.194] (II) event17 - WH-1000XM3 (AVRCP): is tagged by udev as: Keyboard
[337606.194] (II) event17 - WH-1000XM3 (AVRCP): device is a keyboard
[344364.017] (II) event17 - WH-1000XM3 (AVRCP): device removed
[344364.068] (II) config/udev: removing device WH-1000XM3 (AVRCP)
[344364.071] (II) UnloadModule: "libinput"
[345174.520] (II) modeset(0): EDID vendor "AUO", prod id 53905
[345174.520] (II) modeset(0): Using hsync ranges from config file
[345174.520] (II) modeset(0): Using vrefresh ranges from config file
[345174.520] (II) modeset(0): Printing DDC gathered Modelines:
[345174.520] (II) modeset(0): Modeline "1920x1200"x0.0 156.10 1920 1936 1952 2104 1200 1203 1217 1236 -hsync -vsync (74.2 kHz eP)
[362198.169] (II) config/udev: Adding input device WH-1000XM3 (AVRCP) (/dev/input/event17)
[362198.169] (**) WH-1000XM3 (AVRCP): Applying InputClass "libinput keyboard catchall"
[362198.169] (II) Using input driver 'libinput' for 'WH-1000XM3 (AVRCP)'
[362198.169] (**) WH-1000XM3 (AVRCP): always reports core events
[362198.169] (**) Option "Device" "/dev/input/event17"
[362198.170] (II) event17 - WH-1000XM3 (AVRCP): is tagged by udev as: Keyboard
[362198.170] (II) event17 - WH-1000XM3 (AVRCP): device is a keyboard
[362198.170] (II) event17 - WH-1000XM3 (AVRCP): device removed
[362198.204] (**) Option "config_info" "udev:/sys/devices/virtual/input/input35/event17"
[362198.204] (II) XINPUT: Adding extended input device "WH-1000XM3 (AVRCP)" (type: KEYBOARD, id 18)
[362198.204] (**) Option "xkb_model" "pc105"
[362198.204] (**) Option "xkb_layout" "jp"
[362198.204] (WW) Option "xkb_variant" requires a string value
[362198.204] (WW) Option "xkb_options" requires a string value
[362198.207] (II) event17 - WH-1000XM3 (AVRCP): is tagged by udev as: Keyboard
[362198.207] (II) event17 - WH-1000XM3 (AVRCP): device is a keyboard
- 画面サイズ
1920x1200などが表示されていて何かしていることがわかる WH-1000XMは使っているワイヤレスヘッドホンの型番だ。これらの接続ログも出されているのがわかる
関連
抽象。
- 画面に描くアプリが、表示を担う別のプロセスと要求と応答をやりとりして動いている
関連。
なし。