De acordo com esta saída de /var/log/Xorg.0.log
quando eu quero começar X
a escrever
iniciarx
Então a saída é exibida.
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.
O problema aqui é que ele não consegue encontrar o layout section
. Então, em vez disso, ele está usando uma tela padrão, o que parece não funcionar porque ele tem um 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.
O meu device
tem essa configuração
[?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:~#
Pergunta:
Como posso criar um arquivo de configuração para que meu kernel Linux ou qualquer outro leia esse arquivo quando estou escrevendo startx
para carregar a tela gráfica?
- Como deve ser a aparência do arquivo?
- Onde ele deve ser colocado?
- O que o arquivo deve conter?
Editar:
Isso ocorre emUbuntu 24.04 LTS armhf
Edição 2:
Tentei 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:~#
E o/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:~#
Isenção de responsabilidade: tenho bastante experiência no servidor X.org X11 no Linux, mas nenhuma experiência pessoal em configurá-lo em hardware ARM.
Notei que as notas de lançamento do STM32 indicam que o Wayland e seu Weston display composer foram atualizados especificamente para o STM32 - mas não há menção aos drivers de display X.org correspondentes. Receio que isso possa significar algo entre esses casos:
ARMSOC
driver X.org já suporta seu hardware bem o suficiente para que nenhuma alteração fosse necessária - é só que a autosondagem dos monitores não funciona muito bem, e você pode precisar configurar as resoluções dos monitores e os limites do clock de pixel de uma maneira tradicional. Pela sua pergunta, acho que é isso que você está esperando.stm
driver DRM do kernel tenha recursos suficientes implementados para o Wayland, mas algo que o servidor X11 precisa ainda não foi implementado. Ou talvez oARMSOC
driver X11 precise de um patch específico do STM32.O
stm
driver DRM do kernel parece ser específico para a plataforma STM32, pois não consegui encontrar nenhuma documentação sobre ele em nenhum outro lugar.Então, se você quer apenas uma sessão GUI e não se importa se é X11 ou Wayland, tente este comando em vez de
startx
:como diz na documentação do STM32 . Nesse caso, o arquivo de configuração para a exibição GUI baseada em Wayland seria
/etc/xdg/weston/weston.ini
.Mas se você quiser especificamente o X11, você pode pedir ao servidor de exibição X11 para produzir um modelo de arquivo de configuração para você, executando este comando como root:
Isso deve produzir um
/root/xorg.conf.new
arquivo, que deve ser um arquivo de modelo mais ou menos completoxorg.conf
. Note que você provavelmente não precisará do arquivo de configuração completo, pois o servidor X moderno é geralmente muito bom em autoprobing o hardware.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.