根据这个输出,/var/log/Xorg.0.log
当我想开始X
写的时候
启动
然后输出显示。
X.Org X Server 1.21.1.11
X Protocol Version 11, Revision 0
[ 1198.198] Current Operating System: Linux stm32-os 6.1.82 #1 PREEMPT Tue Sep 10 21:04:28 CEST 2024 armv7l
[ 1198.199] Kernel command line: root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw console=ttySTM0,115200
[ 1198.199] xorg-server 2:21.1.12-1ubuntu1 (For technical support please see http://www.ubuntu.com/support)
[ 1198.199] Current version of pixman: 0.42.2
[ 1198.199] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 1198.199] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 1198.200] (==) Log file: "/var/log/Xorg.0.log", Time: Fri Apr 19 14:44:17 2024
[ 1198.202] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 1198.202] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 1198.204] (==) No Layout section. Using the first Screen section.
[ 1198.205] (**) |-->Screen "DefaultScreen" (0)
[ 1198.205] (**) | |-->Monitor "<default monitor>"
[ 1198.206] (**) | |-->Device "Mali FBDEV"
[ 1198.206] (==) No monitor specified for screen "DefaultScreen".
Using a default monitor configuration.
[ 1198.206] (**) Allowing byte-swapped clients
[ 1198.206] (==) Automatically adding devices
[ 1198.206] (==) Automatically enabling devices
[ 1198.207] (==) Automatically adding GPU devices
[ 1198.207] (==) Automatically binding GPU devices
[ 1198.207] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 1198.207] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 1198.207] Entry deleted from font path.
[ 1198.207] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[ 1198.207] Entry deleted from font path.
[ 1198.207] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[ 1198.207] Entry deleted from font path.
[ 1198.207] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[ 1198.207] Entry deleted from font path.
[ 1198.207] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[ 1198.207] Entry deleted from font path.
[ 1198.208] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/Type1,
built-ins
[ 1198.208] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 1198.208] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 1198.208] (II) Loader magic: 0x5a9008
[ 1198.208] (II) Module ABI versions:
[ 1198.208] X.Org ANSI C Emulation: 0.4
[ 1198.208] X.Org Video Driver: 25.2
[ 1198.208] X.Org XInput driver : 24.4
[ 1198.208] X.Org Server Extension : 10.0
[ 1198.213] (--) using VT number 2
[ 1198.213] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[ 1198.219] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 1198.220] (II) Platform probe for /sys/devices/platform/soc/5a001000.display-controller/drm/card0
[ 1198.221] (II) no primary bus or device found
[ 1198.221] falling back to /sys/devices/platform/soc/5a001000.display-controller/drm/card0
[ 1198.221] (II) LoadModule: "glx"
[ 1198.223] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 1198.232] (II) Module glx: vendor="X.Org Foundation"
[ 1198.232] compiled for 1.21.1.11, module version = 1.0.0
[ 1198.232] ABI class: X.Org Server Extension, version 10.0
[ 1198.232] (II) LoadModule: "armsoc"
[ 1198.233] (II) Loading /usr/lib/xorg/modules/drivers/armsoc_drv.so
[ 1198.234] (II) Module armsoc: vendor="X.Org Foundation"
[ 1198.234] compiled for 1.21.1.3, module version = 1.4.1
[ 1198.235] Module class: X.Org Video Driver
[ 1198.235] ABI class: X.Org Video Driver, version 25.2
[ 1198.235] (II) ARMSOC: Driver for ARM Mali compatible chipsets
[ 1198.237] (WW) Falling back to old probe method for armsoc
[ 1198.237] (II) No BusID or DriverName specified - opening /dev/dri/card0
[ 1198.237] (II) Got BusID 5a001000.display-controller
[ 1198.238] (II) Opened DRM
[ 1198.238] (II) DeviceName is [/dev/dri/card0]
[ 1198.238] (II) bus_id is [5a001000.display-controller]
[ 1198.238] (II) DriverName is [stm]
[ 1198.238] (II) version is [1.0.0]
[ 1198.238] (II) Screen:0, CRTC:-1
[ 1198.238] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 1198.239] (II) ARMSOC(0): Creating default Display subsection in Screen section
"DefaultScreen" for depth/fbbpp 24/32
[ 1198.239] (**) ARMSOC(0): Depth 24, (--) framebuffer bpp 32
[ 1198.239] (==) ARMSOC(0): RGB weight 888
[ 1198.239] (==) ARMSOC(0): Using gamma correction (1.0, 1.0, 1.0)
[ 1198.239] (==) ARMSOC(0): Default visual is TrueColor
[ 1198.239] (II) No BusID or DriverName specified - opening /dev/dri/card0
[ 1198.239] (II) Got BusID 5a001000.display-controller
[ 1198.239] (II) Opened DRM
[ 1198.239] (II) DeviceName is [/dev/dri/card0]
[ 1198.240] (II) bus_id is [5a001000.display-controller]
[ 1198.240] (II) DriverName is [stm]
[ 1198.240] (II) version is [1.0.0]
[ 1198.240] (II) UnloadModule: "armsoc"
[ 1198.240] (EE) Screen(s) found, but none have a usable configuration.
[ 1198.241] (EE) Fatal server error:
[ 1198.241] (EE) no screens found(EE)
[ 1198.241] (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help.
[ 1198.241] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 1198.241] (EE)
[ 1198.243] (EE) Server terminated with error (1). Closing log file.
这里的问题是它找不到layout section
。因此,它改用默认屏幕,但这似乎不起作用,因为它有一个usable configuration
。
[ 1198.202] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 1198.202] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 1198.204] (==) No Layout section. Using the first Screen section.
[ 1198.205] (**) |-->Screen "DefaultScreen" (0)
[ 1198.205] (**) | |-->Monitor "<default monitor>"
[ 1198.206] (**) | |-->Device "Mali FBDEV"
[ 1198.206] (==) No monitor specified for screen "DefaultScreen". Using a default monitor configuration.
我device
有这个配置
[?2004hroot@stm32-os:~# modetest -M stm
[?2004l
Encoders:
id crtc type possible crtcs possible clones
31 38 DPI 0x00000001 0x00000001
Connectors:
id encoder status name size (mm) modes encoders
32 31 connected HDMI-A-1 1210x680 7 31
modes:
index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
#0 1920x1080 30.00 1920 2008 2052 2200 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
#1 1920x1080 25.00 1920 2448 2492 2640 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
#2 1920x1080 24.00 1920 2558 2602 2750 1080 1084 1089 1125 74250 flags: phsync, pvsync; type: driver
#3 1280x720 60.00 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync; type: driver
#4 1280x720 50.00 1280 1720 1760 1980 720 725 730 750 74250 flags: phsync, pvsync; type: driver
#5 720x576 50.00 720 732 796 864 576 581 586 625 27000 flags: nhsync, nvsync; type: driver
#6 720x480 59.94 720 736 798 858 480 489 495 525 27000 flags: nhsync, nvsync; type: driver
props:
1 EDID:
flags: immutable blob
blobs:
value:
00ffffffffffff00506c866511100100
271b0103807944780a0dc9a057479827
12484c2108008140a940818081c0a9c0
01010101010104740030f2705a80b058
8a0020c23100001e023a801871382d40
582c4500b9a84200001e000000fc0054
434c20534d4152542054560a000000fd
00324b1e5023000a20202020202001f0
020340f257909f051420041312110302
161507060121225d625e5f6429090707
15175055170083010000e200ff6e030c
002000b84421008001020304e3050301
023a801871382d40582c4500b9a84200
001e011d007251d01e206e285500b9a8
4200001e000000000000000000000000
000000000000000000000000000000a3
2 DPMS:
flags: enum
enums: On=0 Standby=1 Suspend=2 Off=3
value: 0
5 link-status:
flags: enum
enums: Good=0 Bad=1
value: 0
6 non-desktop:
flags: immutable range
values: 0 1
value: 0
4 TILE:
flags: immutable blob
blobs:
value:
33 dithering:
flags: enum
enums: Off=0 On=1
value: 0
CRTCs:
id fb pos size
38 0 (0,0) (1280x720)
#0 1280x720 60.00 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync; type: driver
props:
24 VRR_ENABLED:
flags: range
values: 0 1
value: 0
28 GAMMA_LUT:
flags: blob
blobs:
value:
29 GAMMA_LUT_SIZE:
flags: immutable range
values: 0 4294967295
value: 256
Planes:
id crtc fb CRTC x,y x,y gamma size possible crtcs
34 0 0 0,0 0,0 0 0x00000001
formats: AR24 XR24 RG24 RG16 AR15 XR15 AR12 XR12 C8
props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 1
30 IN_FORMATS:
flags: immutable blob
blobs:
value:
01000000000000000900000018000000
01000000400000004152323458523234
52473234524731364152313558523135
41523132585231324338202000000000
ff010000000000000000000000000000
0000000000000000
in_formats blob decoded:
AR24: LINEAR(0x0)
XR24: LINEAR(0x0)
RG24: LINEAR(0x0)
RG16: LINEAR(0x0)
AR15: LINEAR(0x0)
XR15: LINEAR(0x0)
AR12: LINEAR(0x0)
XR12: LINEAR(0x0)
C8: LINEAR(0x0)
36 alpha:
flags: range
values: 0 65535
value: 65535
37 zpos:
flags: immutable range
values: 0 0
value: 0
39 0 0 0,0 0,0 0 0x00000001
formats: AR24 RG24 RG16 AR15 AR12 C8
props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:
value:
01000000000000000600000018000000
01000000300000004152323452473234
52473136415231354152313243382020
3f000000000000000000000000000000
0000000000000000
in_formats blob decoded:
AR24: LINEAR(0x0)
RG24: LINEAR(0x0)
RG16: LINEAR(0x0)
AR15: LINEAR(0x0)
AR12: LINEAR(0x0)
C8: LINEAR(0x0)
41 alpha:
flags: range
values: 0 65535
value: 65535
42 zpos:
flags: immutable range
values: 1 1
value: 1
Frame buffers:
id size pitch
[?2004hroot@stm32-os:~#
问题:
startx
当我写入以加载图形屏幕时,如何创建一个配置文件,让我的 Linux 内核或任何东西读取该文件?
- 该文件应该是什么样的?
- 它应该被放在哪里?
- 该文件应包含什么内容?
编辑:
这发生在Ubuntu 24.04 LTS armhf
编辑2:
我试过X -configure
。
[?2004hroot@stm32-os:~# X -configure
[?2004l
X.Org X Server 1.21.1.11
X Protocol Version 11, Revision 0
Current Operating System: Linux stm32-os 6.1.82 #1 PREEMPT Tue Sep 10 21:04:28 CEST 2024 armv7l
Kernel command line: root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw console=ttySTM0,115200
xorg-server 2:21.1.12-1ubuntu1 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.42.2
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Apr 21 12:47:20 2024
List of video drivers:
amdgpu
armsoc
ati
nouveau
radeon
modesetting
fbdev
vesa
(++) Using config file: "/root/xorg.conf.new"
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Number of created screens does not match number of detected devices.
Configuration failed.
(EE) Server terminated with error (2). Closing log file.
[?2004hroot@stm32-os:~#
还有/root/xorg.config.new
less /root/xorg.conf.new
[?2004l
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/cyrillic"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "built-ins"
EndSection
Section "Module"
Load "glx"
EndSection
[7m/root/xorg.conf.new[27m[K
[KSection "InputDevice"
:[K
[K Identifier "Keyboard0"
:[K
[K Driver "kbd"
:[K
[KEndSection
:[K
[K
:[K
[KSection "InputDevice"
:[K
[K Identifier "Mouse0"
:[K
[K Driver "mouse"
:[K
[K Option "Protocol" "auto"
:[K
[K Option "Device" "/dev/input/mice"
:[K
[K Option "ZAxisMapping" "4 5 6 7"
:[K
[KEndSection
:[K
[K
:[K
[KSection "Monitor"
:[K
[K Identifier "Monitor0"
:[K
[K VendorName "Monitor Vendor"
:[K
[K ModelName "Monitor Model"
:[K
[KEndSection
:[K
[K
:[K
[KSection "Device"
:[K
[K ### Available Driver options are:-
:[K
[K ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
:[K
[K ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
:[K
[K ### <percent>: "<f>%"
:[K
[K ### [arg]: arg optional
:[K
[K #Option "Debug" # [<bool>]
:[K
[K #Option "NoFlip" # [<bool>]
:[K
[K #Option "DRICard" # <i>
:[K
[K #Option "BusID" # <str>
:[K
[K #Option "DriverName" # <str>
:[K
[K #Option "DRI2MaxBuffers" # <i>
:[K
[K #Option "InitFromFBDev" # <str>
:[K
[K #Option "UMP_LOCK" # [<bool>]
:[K
[K Identifier "Card0"
:[K
[K Driver "armsoc"
:[K
[KEndSection
:[K
[K
:[K
[KSection "Screen"
:[K
[K Identifier "Screen0"
:[K
[K Device "Card0"
:[K
[K Monitor "Monitor0"
:[K
[K SubSection "Display"
:[K
[K Viewport 0 0
:[K
[K Depth 1
:[K
[K EndSubSection
:[K
[K SubSection "Display"
:[K
[K Viewport 0 0
:[K
[K Depth 4
:[K
[K EndSubSection
:[K
[K SubSection "Display"
:[K
[K Viewport 0 0
:[K
[K Depth 8
:[K
[K EndSubSection
:[K
[K SubSection "Display"
:[K
[K Viewport 0 0
:[K
[K Depth 15
:[K
[K EndSubSection
:[K
[K SubSection "Display"
:[K
[K Viewport 0 0
:[K
[K Depth 16
:[K
[K EndSubSection
:[K
[K SubSection "Display"
:[K
[K Viewport 0 0
:[K
[K Depth 24
:[K
[K EndSubSection
:[K
[KEndSection
[K[?2004hroot@stm32-os:~#
免责声明:我在 Linux 上的 X.org X11 服务器上拥有丰富的经验,但在 ARM 硬件上设置它方面没有任何个人经验。
我注意到STM32 的发行说明表明 Wayland 及其 Weston 显示编辑器已专门针对 STM32 进行了更新 - 但没有提及相应的 X.org 显示驱动程序。恐怕这可能意味着介于以下情况之间的任何情况:
ARMSOC
X.org 驱动程序已经足够支持您的硬件,因此无需进行任何更改 - 只是自动探测显示器不太管用,您可能需要以老式的方式配置显示器分辨率和像素时钟限制。从您的问题来看,我猜这就是您所希望的。stm
DRM 驱动程序已经为 Wayland 实现了足够的功能,但 X11 服务器需要的功能仍未实现。或者也许ARMSOC
X11 驱动程序需要 STM32 特定的补丁。内核
stm
DRM 驱动程序似乎是特定于 STM32 平台的,因为我在其他地方找不到有关它的任何文档。因此,如果您只想要一个 GUI 会话,而并不特别关心它是 X11 还是 Wayland - 那么请尝试这个命令而不是
startx
:就像STM32 文档中说的那样。在这种情况下,基于 Wayland 的 GUI 显示的配置文件将是
/etc/xdg/weston/weston.ini
。但是如果您特别想要 X11,您可以要求 X11 显示服务器为您生成配置文件模板,通过以 root 身份运行以下命令:
这应该会生成一个
/root/xorg.conf.new
文件,它应该是一个或多或少完整的模板xorg.conf
文件。请注意,您可能不需要完整的配置文件,因为现代 X 服务器通常非常擅长自动探测硬件。So you might pick from the configuration template just the one or two sections the driver seems to be having trouble autoprobing: perhaps just the
Monitor
and maybeScreen
sections. Fill them out with valid data (seeman xorg.conf
for details) and place just those sections into a/etc/X11/xorg.conf.d/stm32.conf
file, for example.The really old-school way to configure the X11 server would be to take the whole template, copy it to
/etc/X11/xorg.conf
and fill out any missing data (e.g. the monitor pixel clock limits and maximum resolutions, as the driver doesn't appear to be able to autoprobe them currently).This might be more trouble than it's worth, as you might have to fill out any input device configuration (i.e. configuration information for keyboard and mouse) too.