
Ich arbeite an einem Display-Manager. Wenn ein X-Server bereits gestartet ist, funktioniert mein Display-Manager einwandfrei und kann einen Benutzer anmelden. Damit er jedoch ein richtiger Display-Manager ist, muss er in der Lage sein, selbst einen X-Server zu starten.
Wenn ich mir die Ausgabe von ansehe ps aux | grep X
und den Quellcode eines anderen Lightweight Display Managers (SLiM) untersuche, bin ich der Meinung, dass mein Display Manager den folgenden Befehl ausführen sollte:
/usr/bin/Xorg.bin :0 vt1
Dies setzt voraus, dass aktuell kein anderer Display-Manager/X-Server ausgeführt wird.
Das Problem ist, dass ich, wenn mein Programm diesen Befehl ausführt oder wenn ich diesen Befehl manuell ausführe, zu dem von mir angegebenen virtuellen Terminal umgeschaltet werde und das System dann „hängt“. Ich bin mir nicht sicher, ob es hängt oder ob ich einfach nicht auf andere virtuelle Terminals zugreifen kann (ich glaube, es ist Letzteres). Hier ist das Xorg.log, nachdem ich die Maschine neu gestartet habe:
[ 631.692]
X.Org X Server 1.16.3
Release Date: 2014-12-20
[ 631.692] X Protocol Version 11, Revision 0
[ 631.692] Build Operating System: Linux 3.18.1-1-ARCH x86_64
[ 631.692] Current Operating System: Linux arch 3.17.6-1-ARCH #1 SMP PREEMPT Sun Dec 7 23:43:32 UTC 2014 x86_64
[ 631.692] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=5ba710b1-c7b7-410d-baed-d6670f818d56 rw quiet
[ 631.692] Build Date: 29 December 2014 01:09:58PM
[ 631.693]
[ 631.693] Current version of pixman: 0.32.6
[ 631.693] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 631.693] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 631.693] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Jan 3 23:38:54 2015
[ 631.865] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 631.865] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 631.911] (==) No Layout section. Using the first Screen section.
[ 631.911] (==) No screen section available. Using defaults.
[ 631.911] (**) |-->Screen "Default Screen Section" (0)
[ 631.911] (**) | |-->Monitor "<default monitor>"
[ 631.918] (==) No device specified for screen "Default Screen Section".
Using the first device section listed.
[ 631.918] (**) | |-->Device "Intel Graphics"
[ 631.918] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 631.918] (==) Automatically adding devices
[ 631.918] (==) Automatically enabling devices
[ 631.918] (==) Automatically adding GPU devices
[ 631.996] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/OTF/".
[ 631.996] Entry deleted from font path.
[ 631.996] (Run 'mkfontdir' on "/usr/share/fonts/OTF/").
[ 632.040] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
[ 632.040] Entry deleted from font path.
[ 632.040] (Run 'mkfontdir' on "/usr/share/fonts/100dpi/").
[ 632.040] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
[ 632.040] Entry deleted from font path.
[ 632.040] (Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
[ 632.040] (==) FontPath set to:
/usr/share/fonts/misc/,
/usr/share/fonts/TTF/,
/usr/share/fonts/Type1/
[ 632.040] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 632.040] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 632.047] (II) Loader magic: 0x818d80
[ 632.047] (II) Module ABI versions:
[ 632.047] X.Org ANSI C Emulation: 0.4
[ 632.047] X.Org Video Driver: 18.0
[ 632.047] X.Org XInput driver : 21.0
[ 632.047] X.Org Server Extension : 8.0
[ 632.051] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c1
[ 632.052] (II) xfree86: Adding drm device (/dev/dri/card1)
[ 632.053] (II) systemd-logind: got fd for /dev/dri/card1 226:1 fd 10 paused 0
[ 632.053] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 632.054] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0
[ 632.058] (--) PCI:*(0:0:2:0) 8086:0116:103c:185d rev 9, Mem @ 0xc0000000/4194304, 0xb0000000/268435456, I/O @ 0x00006000/64
[ 632.058] (--) PCI: (0:1:0:0) 1002:6760:103c:185d rev 0, Mem @ 0xa0000000/268435456, 0xc6500000/131072, I/O @ 0x00005000/256, BIOS @ 0x????????/131072
[ 632.058] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[ 632.059] (II) LoadModule: "glx"
[ 632.097] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 632.114] (II) Module glx: vendor="X.Org Foundation"
[ 632.114] compiled for 1.16.3, module version = 1.0.0
[ 632.114] ABI class: X.Org Server Extension, version 8.0
[ 632.114] (==) AIGLX enabled
[ 632.114] (II) LoadModule: "intel"
[ 632.114] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[ 632.161] (II) Module intel: vendor="X.Org Foundation"
[ 632.161] compiled for 1.16.3, module version = 2.99.917
[ 632.161] Module class: X.Org Video Driver
[ 632.161] ABI class: X.Org Video Driver, version 18.0
[ 632.161] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[ 632.162] (II) intel: Driver for Intel(R) HD Graphics: 2000-6000
[ 632.162] (II) intel: Driver for Intel(R) Iris(TM) Graphics: 5100, 6100
[ 632.162] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics: 5200, 6200, P6300
[ 632.162] (++) using VT number 2
[ 632.177] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20140725
[ 632.184] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 3000
[ 632.184] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx
[ 632.184] (II) intel(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 632.184] (==) intel(0): Depth 24, (--) framebuffer bpp 32
[ 632.184] (==) intel(0): RGB weight 888
[ 632.184] (==) intel(0): Default visual is TrueColor
[ 632.184] (**) intel(0): Option "AccelMethod" "sna"
[ 632.184] (**) intel(0): Option "Backlight" "intel_backlight"
[ 632.184] (II) intel(0): Output LVDS1 has no monitor section
[ 632.184] (**) intel(0): Found backlight control interface intel_backlight (type 'raw') for output LVDS1
[ 632.184] (II) intel(0): Enabled output LVDS1
[ 632.185] (II) intel(0): Output VGA1 has no monitor section
[ 632.185] (II) intel(0): Enabled output VGA1
[ 632.185] (II) intel(0): Output HDMI1 has no monitor section
[ 632.185] (II) intel(0): Enabled output HDMI1
[ 632.185] (II) intel(0): Output DP1 has no monitor section
[ 632.185] (II) intel(0): Enabled output DP1
[ 632.185] (--) intel(0): Using a maximum size of 256x256 for hardware cursors
[ 632.185] (II) intel(0): Output VIRTUAL1 has no monitor section
[ 632.185] (II) intel(0): Enabled output VIRTUAL1
[ 632.185] (--) intel(0): Output LVDS1 using initial mode 1366x768 on pipe 0
[ 632.185] (--) intel(0): Output HDMI1 using initial mode 1920x1080 on pipe 1
[ 632.185] (==) intel(0): TearFree disabled
[ 632.185] (==) intel(0): DPI set to (96, 96)
[ 632.185] (II) Loading sub module "dri2"
[ 632.185] (II) LoadModule: "dri2"
[ 632.185] (II) Module "dri2" already built-in
[ 632.185] (II) Loading sub module "present"
[ 632.185] (II) LoadModule: "present"
[ 632.185] (II) Module "present" already built-in
[ 632.185] (==) Depth 24 pixmap format is 32 bpp
[ 632.201] (II) intel(0): SNA initialized with Sandybridge (gen6, gt2) backend
[ 632.201] (==) intel(0): Backing store enabled
[ 632.201] (==) intel(0): Silken mouse enabled
[ 632.202] (II) intel(0): HW Cursor enabled
[ 632.202] (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[ 632.204] (==) intel(0): DPMS enabled
[ 632.204] (==) intel(0): display hotplug detection enabled
[ 632.204] (II) intel(0): [DRI2] Setup complete
[ 632.204] (II) intel(0): [DRI2] DRI driver: i965
[ 632.204] (II) intel(0): [DRI2] VDPAU driver: i965
[ 632.204] (II) intel(0): direct rendering: DRI2 enabled
[ 632.204] (II) intel(0): hardware support for Present enabled
[ 632.204] (--) RandR disabled
[ 632.390] (II) AIGLX: enabled GLX_MESA_copy_sub_buffer
[ 632.390] (II) AIGLX: enabled GLX_ARB_create_context
[ 632.390] (II) AIGLX: enabled GLX_ARB_create_context_profile
[ 632.390] (II) AIGLX: enabled GLX_EXT_create_context_es2_profile
[ 632.390] (II) AIGLX: enabled GLX_INTEL_swap_event
[ 632.390] (II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
[ 632.390] (II) AIGLX: enabled GLX_EXT_framebuffer_sRGB
[ 632.390] (II) AIGLX: enabled GLX_ARB_fbconfig_float
[ 632.390] (II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
[ 632.390] (II) AIGLX: enabled GLX_ARB_create_context_robustness
[ 632.391] (II) AIGLX: Loaded and initialized i965
[ 632.391] (II) GLX: Initialized DRI2 GL provider for screen 0
[ 632.405] (II) intel(0): switch to mode [email protected] on LVDS1 using pipe 0, position (0, 0), rotation normal, reflection none
[ 632.407] (EE) intel(0): failed to set mode: Permission denied [13]
[ 632.408] (II) intel(0): switch to mode [email protected] on HDMI1 using pipe 1, position (0, 0), rotation normal, reflection none
[ 632.413] (EE) intel(0): failed to set mode: Permission denied [13]
[ 632.413] (WW) intel(0): failed to restore desired modes on VT switch
[ 632.413] (EE) intel(0): sna_mode_check: invalid state found on pipe 0, disabling CRTC:7
[ 632.413] (EE) intel(0): sna_mode_check: invalid state found on pipe 1, disabling CRTC:11
[ 632.769] (II) config/udev: Adding input device Power Button (/dev/input/event4)
[ 632.769] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[ 632.769] (II) LoadModule: "evdev"
[ 632.813] (II) Loading /usr/lib/xorg/modules/input/evdev_drv.so
[ 632.876] (II) Module evdev: vendor="X.Org Foundation"
[ 632.876] compiled for 1.16.2, module version = 2.9.1
[ 632.876] Module class: X.Org XInput Driver
[ 632.876] ABI class: X.Org XInput driver, version 21.0
[ 632.878] (II) systemd-logind: got fd for /dev/input/event4 13:68 fd 18 paused 1
[ 632.878] (II) systemd-logind: releasing fd for 13:68
[ 632.904] (II) config/udev: Adding input device Video Bus (/dev/input/event16)
[ 632.904] (**) Video Bus: Applying InputClass "evdev keyboard catchall"
[ 632.905] (II) systemd-logind: got fd for /dev/input/event16 13:80 fd 18 paused 1
[ 632.905] (II) systemd-logind: releasing fd for 13:80
[ 632.930] (II) config/udev: Adding input device Lid Switch (/dev/input/event1)
[ 632.931] (II) No input driver specified, ignoring this device.
[ 632.931] (II) This device may have been added with another device file.
[ 632.931] (II) config/udev: Adding input device Video Bus (/dev/input/event11)
[ 632.931] (**) Video Bus: Applying InputClass "evdev keyboard catchall"
[ 632.933] (II) systemd-logind: got fd for /dev/input/event11 13:75 fd 18 paused 1
[ 632.933] (II) systemd-logind: releasing fd for 13:75
[ 632.955] (II) config/udev: Adding input device Power Button (/dev/input/event3)
[ 632.955] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[ 632.956] (II) systemd-logind: got fd for /dev/input/event3 13:67 fd 18 paused 1
[ 632.956] (II) systemd-logind: releasing fd for 13:67
[ 632.984] (II) config/udev: Adding input device HDA Digital PCBeep (/dev/input/event6)
[ 632.984] (II) No input driver specified, ignoring this device.
[ 632.984] (II) This device may have been added with another device file.
[ 632.985] (II) config/udev: Adding input device HDA Intel PCH Front Headphone (/dev/input/event8)
[ 632.985] (II) No input driver specified, ignoring this device.
[ 632.985] (II) This device may have been added with another device file.
[ 632.985] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=3 (/dev/input/event9)
[ 632.985] (II) No input driver specified, ignoring this device.
[ 632.985] (II) This device may have been added with another device file.
[ 632.986] (II) config/udev: Adding input device HDA Intel PCH Mic (/dev/input/event7)
[ 632.986] (II) No input driver specified, ignoring this device.
[ 632.986] (II) This device may have been added with another device file.
[ 632.986] (II) config/udev: Adding input device Logitech USB Receiver (/dev/input/event13)
[ 632.986] (**) Logitech USB Receiver: Applying InputClass "evdev pointer catchall"
[ 632.988] (II) systemd-logind: got fd for /dev/input/event13 13:77 fd 18 paused 1
[ 632.988] (II) systemd-logind: releasing fd for 13:77
[ 633.048] (II) config/udev: Adding input device Logitech USB Receiver (/dev/input/mouse1)
[ 633.048] (II) No input driver specified, ignoring this device.
[ 633.048] (II) This device may have been added with another device file.
[ 633.049] (II) config/udev: Adding input device Logitech USB Receiver (/dev/input/event14)
[ 633.049] (**) Logitech USB Receiver: Applying InputClass "evdev keyboard catchall"
[ 633.050] (II) systemd-logind: got fd for /dev/input/event14 13:78 fd 18 paused 1
[ 633.050] (II) systemd-logind: releasing fd for 13:78
[ 633.104] (II) config/udev: Adding input device Microsft Microsoft Wireless Desktop Receiver 3.1 (/dev/input/event12)
[ 633.104] (**) Microsft Microsoft Wireless Desktop Receiver 3.1: Applying InputClass "evdev keyboard catchall"
[ 633.105] (II) systemd-logind: got fd for /dev/input/event12 13:76 fd 18 paused 1
[ 633.105] (II) systemd-logind: releasing fd for 13:76
[ 633.160] (II) config/udev: Adding input device Microsft Microsoft Wireless Desktop Receiver 3.1 (/dev/input/event15)
[ 633.161] (**) Microsft Microsoft Wireless Desktop Receiver 3.1: Applying InputClass "evdev pointer catchall"
[ 633.161] (**) Microsft Microsoft Wireless Desktop Receiver 3.1: Applying InputClass "evdev keyboard catchall"
[ 633.162] (II) systemd-logind: got fd for /dev/input/event15 13:79 fd 18 paused 1
[ 633.162] (II) systemd-logind: releasing fd for 13:79
[ 633.224] (II) config/udev: Adding input device Microsft Microsoft Wireless Desktop Receiver 3.1 (/dev/input/mouse2)
[ 633.224] (II) No input driver specified, ignoring this device.
[ 633.224] (II) This device may have been added with another device file.
[ 633.224] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event0)
[ 633.224] (**) AT Translated Set 2 keyboard: Applying InputClass "evdev keyboard catchall"
[ 633.226] (II) systemd-logind: got fd for /dev/input/event0 13:64 fd 18 paused 1
[ 633.226] (II) systemd-logind: releasing fd for 13:64
[ 633.290] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event10)
[ 633.290] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev touchpad catchall"
[ 633.290] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad catchall"
[ 633.290] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "Default clickpad buttons"
[ 633.290] (II) LoadModule: "synaptics"
[ 633.291] (II) Loading /usr/lib/xorg/modules/input/synaptics_drv.so
[ 633.346] (II) Module synaptics: vendor="X.Org Foundation"
[ 633.346] compiled for 1.16.0, module version = 1.8.1
[ 633.346] Module class: X.Org XInput Driver
[ 633.346] ABI class: X.Org XInput driver, version 21.0
[ 633.348] (II) systemd-logind: got fd for /dev/input/event10 13:74 fd 18 paused 1
[ 633.348] (II) systemd-logind: releasing fd for 13:74
[ 633.397] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/mouse0)
[ 633.397] (**) SynPS/2 Synaptics TouchPad: Ignoring device from InputClass "touchpad ignore duplicates"
[ 633.397] (II) config/udev: Adding input device ST LIS3LV02DL Accelerometer (/dev/input/event2)
[ 633.397] (II) No input driver specified, ignoring this device.
[ 633.397] (II) This device may have been added with another device file.
[ 633.398] (II) config/udev: Adding input device ST LIS3LV02DL Accelerometer (/dev/input/js0)
[ 633.398] (II) No input driver specified, ignoring this device.
[ 633.398] (II) This device may have been added with another device file.
[ 633.399] (II) config/udev: Adding input device HP WMI hotkeys (/dev/input/event5)
[ 633.399] (**) HP WMI hotkeys: Applying InputClass "evdev keyboard catchall"
[ 633.400] (II) systemd-logind: got fd for /dev/input/event5 13:69 fd 18 paused 1
[ 633.400] (II) systemd-logind: releasing fd for 13:69
Ich verwende Arch Linux mit X-Server Version 1.16.3. Eine Person auf #xorg im IRC bestätigte, dass sie auf ihrem System mit dem von mir angegebenen Befehl immer noch auf andere virtuelle Terminals zugreifen kann, obwohl sie Xorg Version 1.15 und nicht Arch Linux verwendet.
Kann jemand anderes bestätigen, dass sich sein System so verhält/nicht verhält, wie ich es beschrieben habe (Sie müssen Ihr System neu starten, wenn es sich so verhält wie meines). Wie kann ich den X-Server manuell starten und trotzdem auf die anderen virtuellen Terminals zugreifen?
Antwort1
Die Antwort habe ich hier gefunden:https://www.archlinux.org/news/xorg-server-116-ist-jetzt-verfügbar/
X ist jetzt mit Hilfe von systemd-logind rootless, das heißt auch, dass es vom selben virtuellen Terminal aus gestartet werden muss, das auch für die Anmeldung verwendet wurde. Auch die Umleitung von stderr unterbricht die rootless-Anmeldung. Das alte Root-Ausführungsverhalten kann über die Konfigurationsdatei Xorg.wrap (man xorg.wrap) wiederhergestellt werden. Bitte beachten Sie, dass der Start von X über einen Anmeldemanager (gdm, kdm, ...) noch keinen rootless-Zugriff bietet.
Ich habe versucht, X auf einem anderen TTY zu starten als dem, auf dem ich mich befand.