xinit: connection to X server lost when startx in QEMU
by unekoala from LinuxQuestions.org on (#5NEN5)
Hi,
I am using QEMU for RISC-V and have installed a graphics driver which supports X, together with its xorg conf. I booted QEMU using this tutorial: https://fedorapeople.org/groups/risc...ges/readme.txt.
Then I installed GNOME environment, but found that gnome-session was still missing, so I built and installed gnome-session from source. After that, I added `exec gnome-session` to the end of /etc/X11/xinit/xinitrc. I also built and installed vncserver in QEMU.
Afterwards, I startx, it failed shortly after started by saying connection to X server lost:
Code:xauth: file /root/.serverauth.884 does not exist
xauth: (stdin):2: unknown command "95963fb477451eea8fc8c08b95db6932"
xauth: (stdin):3: unknown command "95963fb477451eea8fc8c08b95db6932"
xauth: (stdin):4: unknown command "95963fb477451eea8fc8c08b95db6932"
InitConnectionLimits: MaxClients = 2048
X.Org X Server 1.20.10
X Protocol Version 11, Revision 0
Build Operating System: Linux
Current Operating System: Linux stage4.fedoraproject.org 4.19.0-rc8 #1 SMP Wed Oct 17 15:11:25 UTC 2018 riscv64
Kernel command line: console=ttyS0 ro root=/dev/vda
Build Date: 30 July 2021 07:26:16PM
Current version of pixman: 0.38.4
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: "/usr/local/var/log/Xorg.1.log", Time: Tue Aug 17 19:52:30 2021
Converted `%D/X11/%X' to `/usr/local/share/X11/xorg.conf.d'
Converted `/etc/X11/%X' to `/etc/X11/xorg.conf.d'
Converted `/etc/X11/%X' to `/etc/X11/xorg.conf'
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
InputClass section parsed
InputClass section parsed
InputClass section parsed
InputClass section parsed
InputClass section parsed
InputClass section parsed
InputClass section parsed
InputClass section parsed
InputClass section parsed
Device section parsed
Monitor section parsed
Screen section parsed
Layout section parsed
Flags section parsed
Device section parsed
Monitor section parsed
Screen section parsed
Layout section parsed
Flags section parsed
Found 1 screens in the layout section Server LayoutFound 0 inactive devices in the layout section Server Layout
Found 0 input devices in the layout section Server Layout
APM: OSPMOpen called
APM: Opening device
LoaderOpen(/usr/local/lib/xorg/modules/drivers/modesetting_drv.so)
LoaderOpen(/usr/local/lib/xorg/modules/libglamoregl.so)
LoaderOpen(/usr/local/lib/xorg/modules/libfb.so)
(II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
InitOutput - xf86Screens[0]->pScreen = 0x368ee0
xf86Screens[0]->pScreen->CreateWindow = 0x20008edab4
Sync Extension 3.1
XFree86VidModeExtensionInitVidModeAddExtension
Popen: `"/usr/local/bin/xkbcomp" -w 1 "-R/usr/local/share/X11/xkb" -xkm "-" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "/tmp/server-1.xkm"', fp = 0x3499f0
Pclose: fp = 0x3499f0
Loaded XKB keymap /tmp/server-1.xkm, defined=0x7f
client(0): Reserved pid(905).
client(0): Reserved cmdname(/usr/local/bin/Xorg) and cmdargs(:1 -auth /root/.serverauth.884).
client(200000): Reserved pid(904).
client(200000): Reserved cmdname(xinit) and cmdargs(/etc/X11/xinit/xinitrc -- /usr/local/bin/Xorg :1 -auth /root/.serverauth.884).
AllocNewConnection: client index = 1, socket fd = 12
client(400000): Reserved pid(908).
client(400000): Reserved cmdname(xrdb) and cmdargs(-nocpp -merge /etc/X11/Xresources).
AllocNewConnection: client index = 2, socket fd = 13
client(400000): Released pid(908).
client(400000): Released cmdline(xrdb) and cmdargs(-nocpp -merge /etc/X11/Xresources).
client(400000): Reserved pid(909).
client(400000): Reserved cmdname(xmodmap) and cmdargs(/etc/X11/Xmodmap).
AllocNewConnection: client index = 2, socket fd = 13
client(400000): Released pid(909).
client(400000): Released cmdline(xmodmap) and cmdargs(/etc/X11/Xmodmap).
client(400000): Reserved pid(911).
client(400000): Reserved cmdname(dbus-launch) and cmdargs(--sh-syntax --exit-with-session).
AllocNewConnection: client index = 2, socket fd = 13
client(600000): Reserved pid(914).
client(600000): Reserved cmdname(dbus-launch) and cmdargs(--sh-syntax --exit-with-session).
AllocNewConnection: client index = 3, socket fd = 14
client(800000): Reserved pid(921).
client(800000): Reserved cmdname(xhost) and cmdargs(+si:localuser:root).
AllocNewConnection: client index = 4, socket fd = 15
client(800000): Released pid(921).
client(800000): Released cmdline(xhost) and cmdargs(+si:localuser:root).
client(800000): Reserved pid(922).
client(800000): Reserved cmdname(/usr/bin/xmbind) and cmdargs(NULL).
AllocNewConnection: client index = 4, socket fd = 15
client(800000): Released pid(922).
client(800000): Released cmdline(/usr/bin/xmbind) and cmdargs(NULL).
client(800000): Reserved pid(934).
client(800000): Reserved cmdname(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
AllocNewConnection: client index = 4, socket fd = 15
client(a00000): Reserved pid(934).
client(a00000): Reserved cmdname(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
AllocNewConnection: client index = 5, socket fd = 18
client(a00000): Released pid(934).
client(a00000): Released cmdline(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
client(a00000): Reserved pid(936).
client(a00000): Reserved cmdname(/usr/libexec/at-spi-bus-launcher) and cmdargs(NULL).
AllocNewConnection: client index = 5, socket fd = 18
client(a00000): Released pid(936).
client(a00000): Released cmdline(/usr/libexec/at-spi-bus-launcher) and cmdargs(NULL).
client(a00000): Reserved pid(936).
client(a00000): Reserved cmdname(/usr/libexec/at-spi-bus-launcher) and cmdargs(NULL).
AllocNewConnection: client index = 5, socket fd = 18
client(a00000): Released pid(936).
client(a00000): Released cmdline(/usr/libexec/at-spi-bus-launcher) and cmdargs(NULL).
client(a00000): Reserved pid(944).
client(a00000): Reserved cmdname(/usr/libexec/at-spi2-registryd) and cmdargs(--use-gnome-session).
AllocNewConnection: client index = 5, socket fd = 18
client(a00000): Released pid(944).
client(a00000): Released cmdline(/usr/libexec/at-spi2-registryd) and cmdargs(--use-gnome-session).
client(a00000): Reserved pid(944).
client(a00000): Reserved cmdname(/usr/libexec/at-spi2-registryd) and cmdargs(--use-gnome-session).
AllocNewConnection: client index = 5, socket fd = 18
client(800000): Released pid(934).
client(800000): Released cmdline(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
client(800000): Reserved pid(947).
client(800000): Reserved cmdname(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
AllocNewConnection: client index = 4, socket fd = 15
client(c00000): Reserved pid(947).
client(c00000): Reserved cmdname(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
AllocNewConnection: client index = 6, socket fd = 19
client(c00000): Released pid(947).
client(c00000): Released cmdline(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
client(800000): Released pid(947).
client(800000): Released cmdline(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
xinit: connection to X server lost
waiting for X server to shut down client(200000): Released pid(904).
client(200000): Released cmdline(xinit) and cmdargs(/etc/X11/xinit/xinitrc -- /usr/local/bin/Xorg :1 -auth /root/.serverauth.884).
client(400000): Released pid(911).
client(400000): Released cmdline(dbus-launch) and cmdargs(--sh-syntax --exit-with-session).
client(600000): Released pid(914).
client(600000): Released cmdline(dbus-launch) and cmdargs(--sh-syntax --exit-with-session).
client(a00000): Released pid(944).
client(a00000): Released cmdline(/usr/libexec/at-spi2-registryd) and cmdargs(--use-gnome-session).
(dix) removing device 2
(dix) removing device 3
(dix) removing device 5
(dix) removing device 4
client(0): Released pid(905).
client(0): Released cmdline(/usr/local/bin/Xorg) and cmdargs(:1 -auth /root/.serverauth.884).
(II) Server terminated successfully (0). Closing log file.I also tried `systemctl start vncserver@:1.service`, and the log:
Code:Using desktop session gnome-xorg
Warning: /etc/tigervnc/vncserver-config-mandatory is overriding previously defined 'session' to be 'gnome-xorg'
Warning: /etc/tigervnc/vncserver-config-mandatory is overriding previously defined 'securitytypes' to be 'vncauth,tlsvnc'
Warning: /etc/tigervnc/vncserver-config-mandatory is overriding previously defined 'geometry' to be '2000x1200'
Warning: /etc/tigervnc/vncserver-config-mandatory is overriding previously defined 'desktop' to be 'sandbox'
New 'stage4.fedoraproject.org:1 (root)' desktop is stage4.fedoraproject.org:1
Starting desktop session gnome-xorg
Xvnc TigerVNC 1.11.80 - built Aug 10 2021 18:52:33
Copyright (C) 1999-2021 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12010000, The X.Org Foundation
Tue Aug 17 19:46:44 2021
vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5901
vncext: created VNC server for screen 0
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Internal error: Could not resolve keysym XF86AudioPreset
> Internal error: Could not resolve keysym XF86WWAN
> Internal error: Could not resolve keysym XF86RFKill
Errors from xkbcomp are not fatal to the X server
xinit: XFree86_VT property unexpectedly has 0 items instead of 1
xinit: connection to X server lost
Tue Aug 17 19:46:51 2021
ComparingUpdateTracker: 0 pixels in / 0 pixels out
ComparingUpdateTracker: (1:nan ratio)
^M
waiting for X server to shut downThe overall problem is that `startx` wouldn't show a GUI desktop and I couldn't use `vncviewer :1` on the host machine to see this QEMU desktop (reported "authentication failed"). Therefore, I'm guessing it has something to do with the connection lost to X server, but I don't know how to resolve this.
Thanks for any suggestions.
I am using QEMU for RISC-V and have installed a graphics driver which supports X, together with its xorg conf. I booted QEMU using this tutorial: https://fedorapeople.org/groups/risc...ges/readme.txt.
Then I installed GNOME environment, but found that gnome-session was still missing, so I built and installed gnome-session from source. After that, I added `exec gnome-session` to the end of /etc/X11/xinit/xinitrc. I also built and installed vncserver in QEMU.
Afterwards, I startx, it failed shortly after started by saying connection to X server lost:
Code:xauth: file /root/.serverauth.884 does not exist
xauth: (stdin):2: unknown command "95963fb477451eea8fc8c08b95db6932"
xauth: (stdin):3: unknown command "95963fb477451eea8fc8c08b95db6932"
xauth: (stdin):4: unknown command "95963fb477451eea8fc8c08b95db6932"
InitConnectionLimits: MaxClients = 2048
X.Org X Server 1.20.10
X Protocol Version 11, Revision 0
Build Operating System: Linux
Current Operating System: Linux stage4.fedoraproject.org 4.19.0-rc8 #1 SMP Wed Oct 17 15:11:25 UTC 2018 riscv64
Kernel command line: console=ttyS0 ro root=/dev/vda
Build Date: 30 July 2021 07:26:16PM
Current version of pixman: 0.38.4
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: "/usr/local/var/log/Xorg.1.log", Time: Tue Aug 17 19:52:30 2021
Converted `%D/X11/%X' to `/usr/local/share/X11/xorg.conf.d'
Converted `/etc/X11/%X' to `/etc/X11/xorg.conf.d'
Converted `/etc/X11/%X' to `/etc/X11/xorg.conf'
(==) Using config file: "/etc/X11/xorg.conf"
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
InputClass section parsed
InputClass section parsed
InputClass section parsed
InputClass section parsed
InputClass section parsed
InputClass section parsed
InputClass section parsed
InputClass section parsed
InputClass section parsed
Device section parsed
Monitor section parsed
Screen section parsed
Layout section parsed
Flags section parsed
Device section parsed
Monitor section parsed
Screen section parsed
Layout section parsed
Flags section parsed
Found 1 screens in the layout section Server LayoutFound 0 inactive devices in the layout section Server Layout
Found 0 input devices in the layout section Server Layout
APM: OSPMOpen called
APM: Opening device
LoaderOpen(/usr/local/lib/xorg/modules/drivers/modesetting_drv.so)
LoaderOpen(/usr/local/lib/xorg/modules/libglamoregl.so)
LoaderOpen(/usr/local/lib/xorg/modules/libfb.so)
(II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
InitOutput - xf86Screens[0]->pScreen = 0x368ee0
xf86Screens[0]->pScreen->CreateWindow = 0x20008edab4
Sync Extension 3.1
XFree86VidModeExtensionInitVidModeAddExtension
Popen: `"/usr/local/bin/xkbcomp" -w 1 "-R/usr/local/share/X11/xkb" -xkm "-" -em1 "The XKEYBOARD keymap compiler (xkbcomp) reports:" -emp "> " -eml "Errors from xkbcomp are not fatal to the X server" "/tmp/server-1.xkm"', fp = 0x3499f0
Pclose: fp = 0x3499f0
Loaded XKB keymap /tmp/server-1.xkm, defined=0x7f
client(0): Reserved pid(905).
client(0): Reserved cmdname(/usr/local/bin/Xorg) and cmdargs(:1 -auth /root/.serverauth.884).
client(200000): Reserved pid(904).
client(200000): Reserved cmdname(xinit) and cmdargs(/etc/X11/xinit/xinitrc -- /usr/local/bin/Xorg :1 -auth /root/.serverauth.884).
AllocNewConnection: client index = 1, socket fd = 12
client(400000): Reserved pid(908).
client(400000): Reserved cmdname(xrdb) and cmdargs(-nocpp -merge /etc/X11/Xresources).
AllocNewConnection: client index = 2, socket fd = 13
client(400000): Released pid(908).
client(400000): Released cmdline(xrdb) and cmdargs(-nocpp -merge /etc/X11/Xresources).
client(400000): Reserved pid(909).
client(400000): Reserved cmdname(xmodmap) and cmdargs(/etc/X11/Xmodmap).
AllocNewConnection: client index = 2, socket fd = 13
client(400000): Released pid(909).
client(400000): Released cmdline(xmodmap) and cmdargs(/etc/X11/Xmodmap).
client(400000): Reserved pid(911).
client(400000): Reserved cmdname(dbus-launch) and cmdargs(--sh-syntax --exit-with-session).
AllocNewConnection: client index = 2, socket fd = 13
client(600000): Reserved pid(914).
client(600000): Reserved cmdname(dbus-launch) and cmdargs(--sh-syntax --exit-with-session).
AllocNewConnection: client index = 3, socket fd = 14
client(800000): Reserved pid(921).
client(800000): Reserved cmdname(xhost) and cmdargs(+si:localuser:root).
AllocNewConnection: client index = 4, socket fd = 15
client(800000): Released pid(921).
client(800000): Released cmdline(xhost) and cmdargs(+si:localuser:root).
client(800000): Reserved pid(922).
client(800000): Reserved cmdname(/usr/bin/xmbind) and cmdargs(NULL).
AllocNewConnection: client index = 4, socket fd = 15
client(800000): Released pid(922).
client(800000): Released cmdline(/usr/bin/xmbind) and cmdargs(NULL).
client(800000): Reserved pid(934).
client(800000): Reserved cmdname(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
AllocNewConnection: client index = 4, socket fd = 15
client(a00000): Reserved pid(934).
client(a00000): Reserved cmdname(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
AllocNewConnection: client index = 5, socket fd = 18
client(a00000): Released pid(934).
client(a00000): Released cmdline(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
client(a00000): Reserved pid(936).
client(a00000): Reserved cmdname(/usr/libexec/at-spi-bus-launcher) and cmdargs(NULL).
AllocNewConnection: client index = 5, socket fd = 18
client(a00000): Released pid(936).
client(a00000): Released cmdline(/usr/libexec/at-spi-bus-launcher) and cmdargs(NULL).
client(a00000): Reserved pid(936).
client(a00000): Reserved cmdname(/usr/libexec/at-spi-bus-launcher) and cmdargs(NULL).
AllocNewConnection: client index = 5, socket fd = 18
client(a00000): Released pid(936).
client(a00000): Released cmdline(/usr/libexec/at-spi-bus-launcher) and cmdargs(NULL).
client(a00000): Reserved pid(944).
client(a00000): Reserved cmdname(/usr/libexec/at-spi2-registryd) and cmdargs(--use-gnome-session).
AllocNewConnection: client index = 5, socket fd = 18
client(a00000): Released pid(944).
client(a00000): Released cmdline(/usr/libexec/at-spi2-registryd) and cmdargs(--use-gnome-session).
client(a00000): Reserved pid(944).
client(a00000): Reserved cmdname(/usr/libexec/at-spi2-registryd) and cmdargs(--use-gnome-session).
AllocNewConnection: client index = 5, socket fd = 18
client(800000): Released pid(934).
client(800000): Released cmdline(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
client(800000): Reserved pid(947).
client(800000): Reserved cmdname(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
AllocNewConnection: client index = 4, socket fd = 15
client(c00000): Reserved pid(947).
client(c00000): Reserved cmdname(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
AllocNewConnection: client index = 6, socket fd = 19
client(c00000): Released pid(947).
client(c00000): Released cmdline(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
client(800000): Released pid(947).
client(800000): Released cmdline(/usr/libexec/gnome-session-check-accelerated) and cmdargs(NULL).
xinit: connection to X server lost
waiting for X server to shut down client(200000): Released pid(904).
client(200000): Released cmdline(xinit) and cmdargs(/etc/X11/xinit/xinitrc -- /usr/local/bin/Xorg :1 -auth /root/.serverauth.884).
client(400000): Released pid(911).
client(400000): Released cmdline(dbus-launch) and cmdargs(--sh-syntax --exit-with-session).
client(600000): Released pid(914).
client(600000): Released cmdline(dbus-launch) and cmdargs(--sh-syntax --exit-with-session).
client(a00000): Released pid(944).
client(a00000): Released cmdline(/usr/libexec/at-spi2-registryd) and cmdargs(--use-gnome-session).
(dix) removing device 2
(dix) removing device 3
(dix) removing device 5
(dix) removing device 4
client(0): Released pid(905).
client(0): Released cmdline(/usr/local/bin/Xorg) and cmdargs(:1 -auth /root/.serverauth.884).
(II) Server terminated successfully (0). Closing log file.I also tried `systemctl start vncserver@:1.service`, and the log:
Code:Using desktop session gnome-xorg
Warning: /etc/tigervnc/vncserver-config-mandatory is overriding previously defined 'session' to be 'gnome-xorg'
Warning: /etc/tigervnc/vncserver-config-mandatory is overriding previously defined 'securitytypes' to be 'vncauth,tlsvnc'
Warning: /etc/tigervnc/vncserver-config-mandatory is overriding previously defined 'geometry' to be '2000x1200'
Warning: /etc/tigervnc/vncserver-config-mandatory is overriding previously defined 'desktop' to be 'sandbox'
New 'stage4.fedoraproject.org:1 (root)' desktop is stage4.fedoraproject.org:1
Starting desktop session gnome-xorg
Xvnc TigerVNC 1.11.80 - built Aug 10 2021 18:52:33
Copyright (C) 1999-2021 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.
Underlying X server release 12010000, The X.Org Foundation
Tue Aug 17 19:46:44 2021
vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5901
vncext: created VNC server for screen 0
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Internal error: Could not resolve keysym XF86AudioPreset
> Internal error: Could not resolve keysym XF86WWAN
> Internal error: Could not resolve keysym XF86RFKill
Errors from xkbcomp are not fatal to the X server
xinit: XFree86_VT property unexpectedly has 0 items instead of 1
xinit: connection to X server lost
Tue Aug 17 19:46:51 2021
ComparingUpdateTracker: 0 pixels in / 0 pixels out
ComparingUpdateTracker: (1:nan ratio)
^M
waiting for X server to shut downThe overall problem is that `startx` wouldn't show a GUI desktop and I couldn't use `vncviewer :1` on the host machine to see this QEMU desktop (reported "authentication failed"). Therefore, I'm guessing it has something to do with the connection lost to X server, but I don't know how to resolve this.
Thanks for any suggestions.