@stefan.tx
Hi Stefan
Thank you so much for your reply.
Yes, I do start X server manually on DISPLAY=:1. This is a headless setup. I use Xvfb to create an X server on a virtual frame buffer. I don’t have a real display interface as those pins have been repurposed for GPIO. So I belive there should not be an X server running on DISPLAY=:0.
Here is the output of ps auxf after the system is booted up.
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 197 0.0 0.0 0 0 ? S 19:42 0:00 \_ [kworker/u4:2]
root 207 0.0 0.0 0 0 ? S 19:42 0:00 \_ [kworker/1:3]
root 214 0.0 0.0 0 0 ? S< 19:42 0:00 \_ [kworker/1:1H]
root 1 13.6 0.4 5876 4584 ? Ss 19:41 0:02 /sbin/init
root 192 2.6 0.4 16532 4416 ? Ss 19:41 0:00 /lib/systemd/systemd-journald
root 211 2.7 0.3 12900 3468 ? Ss 19:42 0:00 /lib/systemd/systemd-udevd
systemd+ 229 0.5 0.2 14504 3036 ? Ssl 19:42 0:00 /lib/systemd/systemd-timesyncd
root 309 1.1 0.3 5272 3628 ? Ss 19:42 0:00 /usr/sbin/ofonod -n
avahi 314 0.5 0.2 3916 2428 ? Ss 19:42 0:00 avahi-daemon: running [colibri-imx7-emmc.local]
avahi 318 0.0 0.1 3916 1524 ? S 19:42 0:00 \_ avahi-daemon: chroot helper
message+ 317 1.5 0.2 3784 2632 ? Ss 19:42 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root 329 1.0 0.4 7880 4144 ? Ss 19:42 0:00 /usr/sbin/connmand -n
root 332 0.0 0.1 2288 1428 ? Ss 19:42 0:00 /usr/sbin/atd -f
root 351 0.5 0.3 4748 3532 ? Ss 19:42 0:00 /lib/systemd/systemd-logind
rpc 362 0.0 0.1 3004 1428 ? Ss 19:42 0:00 /usr/sbin/rpcbind
root 414 0.4 0.1 4168 1152 ? Ss 19:42 0:00 /lib/systemd/systemd-hostnamed
root 426 0.1 0.3 8228 3588 ? Ss 19:42 0:00 /usr/sbin/wpa_supplicant -u
systemd+ 432 2.7 0.2 4968 2952 ? Ss 19:42 0:00 /lib/systemd/systemd-networkd
rpcuser 482 0.1 0.2 2708 2104 ? Ss 19:42 0:00 /usr/sbin/rpc.statd -F
root 485 0.1 0.1 2200 1376 tty1 Ss+ 19:42 0:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
root 486 0.1 0.1 2200 1404 ttymxc0 Ss+ 19:42 0:00 /sbin/agetty -8 -L ttymxc0 115200 xterm
root 531 1.0 0.3 5852 4104 ? Ss 19:42 0:00 sshd: root@pts/0
root 538 2.6 0.3 5260 3204 pts/0 Ss 19:42 0:00 \_ -sh
root 542 0.0 0.2 4688 2096 pts/0 R+ 19:42 0:00 \_ ps auxf
root 533 1.4 0.3 5480 3748 ? Ss 19:42 0:00 /lib/systemd/systemd --user
root 534 0.0 0.1 6920 1088 ? S 19:42 0:00 \_ (sd-pam)
I cant see any X server is running . After I start the x server manually on virtual display 1 and then surring lxdm service , here is the ps auxf output.
root 1 0.4 0.4 23352 4724 ? Ss 19:41 0:02 /sbin/init
root 192 0.0 0.4 24728 4528 ? Ss 19:41 0:00 /lib/systemd/systemd-journald
root 211 0.0 0.3 12900 3468 ? Ss 19:41 0:00 /lib/systemd/systemd-udevd
systemd+ 229 0.0 0.2 14504 3036 ? Ssl 19:42 0:00 /lib/systemd/systemd-timesyncd
root 309 0.0 0.3 5272 3628 ? Ss 19:42 0:00 /usr/sbin/ofonod -n
avahi 314 0.0 0.2 3916 2428 ? Ss 19:42 0:00 avahi-daemon: running [colibri-imx7-emmc.local]
avahi 318 0.0 0.1 3916 1524 ? S 19:42 0:00 \_ avahi-daemon: chroot helper
message+ 317 0.0 0.2 3784 2632 ? Ss 19:42 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root 329 0.0 0.4 7880 4144 ? Ss 19:42 0:00 /usr/sbin/connmand -n
root 332 0.0 0.1 2288 1428 ? Ss 19:42 0:00 /usr/sbin/atd -f
root 351 0.0 0.3 4748 3532 ? Ss 19:42 0:00 /lib/systemd/systemd-logind
rpc 362 0.0 0.1 3004 1428 ? Ss 19:42 0:00 /usr/sbin/rpcbind
root 426 0.0 0.3 8228 3588 ? Ss 19:42 0:00 /usr/sbin/wpa_supplicant -u
systemd+ 432 0.0 0.2 4968 2952 ? Ss 19:42 0:00 /lib/systemd/systemd-networkd
rpcuser 482 0.0 0.2 2708 2104 ? Ss 19:42 0:00 /usr/sbin/rpc.statd -F
root 485 0.0 0.1 2200 1376 tty1 Ss+ 19:42 0:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
root 486 0.0 0.1 2200 1404 ttymxc0 Ss+ 19:42 0:00 /sbin/agetty -8 -L ttymxc0 115200 xterm
root 531 0.0 0.3 5852 4104 ? Ss 19:42 0:00 sshd: root@pts/0
root 538 0.0 0.3 5260 3208 pts/0 Ss 19:42 0:00 \_ -sh
root 556 0.0 0.2 4688 2096 pts/0 R+ 19:49 0:00 \_ ps auxf
root 533 0.0 0.3 5480 3748 ? Ss 19:42 0:00 /lib/systemd/systemd --user
root 534 0.0 0.1 6920 1088 ? S 19:42 0:00 \_ (sd-pam)
root 551 0.3 1.2 20164 12560 ? Ss 19:49 0:00 /usr/bin/Xvfb :1 -screen 0 1024x768x24
And after this , I start the lxdm service. And you can see from ps auxf that lxdm triggers a non functiona X server on DISPLAY=:0. So I belive the lxdm service is starting an X server on DISPLAY=:0 .
root 1 0.4 0.4 23352 4732 ? Ss 19:41 0:02 /sbin/init
root 192 0.0 0.4 24728 4528 ? Ss 19:41 0:00 /lib/systemd/systemd-journald
root 211 0.0 0.3 12900 3568 ? Ss 19:41 0:00 /lib/systemd/systemd-udevd
systemd+ 229 0.0 0.2 14504 3036 ? Ssl 19:42 0:00 /lib/systemd/systemd-timesyncd
root 309 0.0 0.3 5272 3628 ? Ss 19:42 0:00 /usr/sbin/ofonod -n
avahi 314 0.0 0.2 3916 2428 ? Ss 19:42 0:00 avahi-daemon: running [colibri-imx7-emmc.local]
avahi 318 0.0 0.1 3916 1524 ? S 19:42 0:00 \_ avahi-daemon: chroot helper
message+ 317 0.0 0.2 3784 2632 ? Ss 19:42 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root 329 0.0 0.4 7880 4144 ? Ss 19:42 0:00 /usr/sbin/connmand -n
root 332 0.0 0.1 2288 1428 ? Ss 19:42 0:00 /usr/sbin/atd -f
root 351 0.0 0.3 4748 3532 ? Ss 19:42 0:00 /lib/systemd/systemd-logind
rpc 362 0.0 0.1 3004 1428 ? Ss 19:42 0:00 /usr/sbin/rpcbind
root 426 0.0 0.3 8228 3588 ? Ss 19:42 0:00 /usr/sbin/wpa_supplicant -u
systemd+ 432 0.0 0.2 4968 2952 ? Ss 19:42 0:00 /lib/systemd/systemd-networkd
rpcuser 482 0.0 0.2 2708 2104 ? Ss 19:42 0:00 /usr/sbin/rpc.statd -F
root 486 0.0 0.1 2200 1404 ttymxc0 Ss+ 19:42 0:00 /sbin/agetty -8 -L ttymxc0 115200 xterm
root 531 0.0 0.3 5852 4104 ? Ss 19:42 0:00 sshd: root@pts/0
root 538 0.0 0.3 5260 3208 pts/0 Ss 19:42 0:00 \_ -sh
root 564 0.0 0.2 4688 2188 pts/0 R+ 19:51 0:00 \_ ps auxf
root 533 0.0 0.3 5480 3748 ? Ss 19:42 0:00 /lib/systemd/systemd --user
root 534 0.0 0.1 6920 1088 ? S 19:42 0:00 \_ (sd-pam)
root 551 0.0 1.2 20164 12560 ? Ss 19:49 0:00 /usr/bin/Xvfb :1 -screen 0 1024x768x24
root 559 2.5 0.2 3628 2396 ? Rs 19:51 0:00 /usr/sbin/lxdm-binary
root 561 1.0 0.0 0 0 ? Zs 19:51 0:00 \_ [X] <defunct>
So, it seems that the lxdm service itself is triggering an X server on DISPLAY=:0 (which is of course not functional). Therefore if we can modify the lxdm service to start on DISPLAY=:1 without starting another X server, the problem can be solved.
EDIT2:
In ubuntu "/etc/X11/xinit/xserverrc " is the file which launches the real X server. I have achieved my target on ubuntu by editing this file as follows.
#!/bin/sh
#exec /usr/bin/X -nolisten tcp "$@"
exec /usr/bin/Xvfb :0 -screen 0 1024x768x24
But in Toradex open embedded build, I could not find a similar file that launches the real X server before LXDM starts. Can you please point me which file starts the x server in toradex openembedded ?
Edit3:
I have found the entry in lxdm.conf which starts the xserver. I have edited the entry as I did on ubuntu test setup. But now I always , get a defunct xvfb server.
Here is my lxdm.conf
[base]
### uncomment and set autologin username to enable autologin
#autologin=root
### uncomment and set timeout to enable timeout autologin,
## the value should >=5
# timeout=10
## default session or desktop used when no systemwide config
session=/usr/bin/startlxde
## uncomment and set to set numlock on your keyboard
numlock=1
## set this if you don't want to put xauth file at ~/.Xauthority
# xauth_path=/tmp
# not ask password for users who have empty password
skip_password=1
## greeter used to welcome the user
greeter=/usr/libexec/lxdm-greeter-gtk
[server]
## arg used to start xserver, not fully function
arg=/usr/bin/Xvfb :0 -screen 0 1024x768x24
# uncomment this if you really want xserver listen to tcp
# tcp_listen=1
# uncoment this if you want reset the xserver after logou
# reset=1
[display]
## gtk theme used by greeter
gtk_theme=Clearlooks
## background of the greeter
# bg=/usr/share/backgrounds/default.png
## if show bottom pane
bottom_pane=1
## if show language select control
lang=1
## if show keyboard layout select control
keyboard=0
## the theme of greeter
theme=Industrial
[input]
[userlist]
## if disable the user list control at greeter
disable=0
## whitelist user
white=
## blacklist user
black=