I am using lightdm alongside light-locker. So as i understand when I want to unlock the session lightdm VT switches to VT8 after unlocking it then takes me back to VT7 and kills the session in VT8. But this doesn't seem to happen in my laptop.
Check my ps list to see that there are two sessions running:
[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.30.0, UID=0 PID=680
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Registered seat module local
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: _g_io_module_get_default: Found default implementation local (GLocalVfs) for ‘gio-vfs’
[+0.29s] DEBUG: Monitoring logind for seats
[+0.29s] DEBUG: New seat added from logind: seat0
[+0.29s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.29s] DEBUG: Seat seat0: Starting
[+0.29s] DEBUG: Seat seat0: Creating greeter session
[+0.30s] DEBUG: Seat seat0: Creating display server of type x
[+0.30s] DEBUG: Could not run plymouth --ping: Failed to execute child process “plymouth” (No such file or directory)
[+0.30s] DEBUG: Using VT 7
[+0.30s] DEBUG: Seat seat0: Starting local X display on VT 7
[+0.30s] DEBUG: XServer 0: Logging to /var/log/lightdm/x-0.log
[+0.30s] DEBUG: XServer 0: Writing X server authority to /var/run/lightdm/root/:0
[+0.30s] DEBUG: XServer 0: Launching X Server
[+0.30s] DEBUG: Launching process 755: /usr/bin/X :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
[+0.30s] DEBUG: XServer 0: Waiting for ready signal from X server :0
[+0.30s] DEBUG: Acquired bus name org.freedesktop.DisplayManager
[+0.30s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0
[+0.41s] DEBUG: Loading users from org.freedesktop.Accounts
[+0.41s] DEBUG: User /org/freedesktop/Accounts/User1000 added
[+1.18s] DEBUG: Got signal 10 from process 755
[+1.18s] DEBUG: XServer 0: Got signal from X server :0
[+1.18s] DEBUG: XServer 0: Connecting to XServer :0
[+1.24s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+1.24s] DEBUG: Session pid=791: Started with service 'lightdm-greeter', username 'lightdm'
[+1.26s] DEBUG: Session pid=791: Authentication complete with return value 0: Success
[+1.26s] DEBUG: Seat seat0: Session authenticated, running command
[+1.26s] DEBUG: Session pid=791: Running command /usr/bin/lightdm-webkit2-greeter
[+1.26s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm
[+1.26s] DEBUG: Session pid=791: Logging to /var/log/lightdm/seat0-greeter.log
[+1.26s] DEBUG: Activating VT 7
[+1.26s] DEBUG: Activating login1 session c1
[+1.26s] DEBUG: Seat seat0 changes active session to c1
[+1.26s] DEBUG: Session c1 is already active
[+1.65s] DEBUG: Greeter connected version=1.30.0 api=1 resettable=false
[+2.32s] DEBUG: Greeter requests data directory for user void
[+2.32s] DEBUG: Creating shared data directory /var/lib/lightdm-data/void
[+2.33s] DEBUG: Greeter start authentication for void
[+2.33s] DEBUG: Session pid=869: Started with service 'lightdm', username 'void'
[+2.33s] DEBUG: Session pid=869: Got 1 message(s) from PAM
[+2.33s] DEBUG: Prompt greeter with 1 message(s)
[+10.66s] DEBUG: Continue authentication
[+10.97s] DEBUG: Session pid=869: Authentication complete with return value 0: Success
[+10.97s] DEBUG: Authenticate result for user void: Success
[+10.97s] DEBUG: User void authorized
[+11.98s] DEBUG: Greeter requests session bspwm
[+11.98s] DEBUG: Seat seat0: Stopping greeter; display server will be re-used for user session
[+11.98s] DEBUG: Terminating login1 session c1
[+11.98s] DEBUG: Session pid=791: Sending SIGTERM
[+11.99s] DEBUG: Seat seat0 changes active session to
[+12.01s] DEBUG: Greeter closed communication channel
[+12.01s] DEBUG: Session pid=791: Exited with return value 0
[+12.01s] DEBUG: Seat seat0: Session stopped
[+12.01s] DEBUG: Seat seat0: Greeter stopped, running session
[+12.01s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0
[+12.02s] DEBUG: Session pid=869: Running command /etc/lightdm/Xsession bspwm
[+12.02s] DEBUG: Creating shared data directory /var/lib/lightdm-data/void
[+12.02s] DEBUG: Session pid=869: Logging to .xsession-errors
[+12.03s] DEBUG: Activating VT 7
[+12.03s] DEBUG: Activating login1 session c2
[+12.03s] DEBUG: Seat seat0 changes active session to c2
[+12.03s] DEBUG: Session c2 is already active
[+3546.96s] DEBUG: Seat seat0: Locking
[+3546.96s] DEBUG: Seat seat0: Creating greeter session
[+3546.96s] DEBUG: Seat seat0: Creating display server of type x
[+3546.96s] DEBUG: Using VT 8
[+3546.96s] DEBUG: Seat seat0: Starting local X display on VT 8
[+3546.96s] DEBUG: XServer 1: Logging to /var/log/lightdm/x-1.log
[+3546.96s] DEBUG: XServer 1: Writing X server authority to /var/run/lightdm/root/:1
[+3546.96s] DEBUG: XServer 1: Launching X Server
[+3546.96s] DEBUG: Launching process 25241: /usr/bin/X :1 -seat seat0 -auth /var/run/lightdm/root/:1 -nolisten tcp vt8 -novtswitch
[+3546.96s] DEBUG: XServer 1: Waiting for ready signal from X server :1
[+3547.38s] DEBUG: Seat seat0 changes active session to
[+3548.13s] DEBUG: Got signal 10 from process 25241
[+3548.13s] DEBUG: XServer 1: Got signal from X server :1
[+3548.13s] DEBUG: XServer 1: Connecting to XServer :1
[+3548.18s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+3548.19s] DEBUG: Session pid=25260: Started with service 'lightdm-greeter', username 'lightdm'
[+3548.22s] DEBUG: Session pid=25260: Authentication complete with return value 0: Success
[+3548.22s] DEBUG: Seat seat0: Session authenticated, running command
[+3548.22s] DEBUG: Session pid=25260: Running command /usr/bin/lightdm-webkit2-greeter
[+3548.22s] DEBUG: Creating shared data directory /var/lib/lightdm-data/lightdm
[+3548.22s] DEBUG: Session pid=25260: Logging to /var/log/lightdm/seat0-greeter.log
[+3548.23s] DEBUG: Activating VT 8
[+3548.23s] DEBUG: Locking login1 session c2
[+3548.23s] DEBUG: Activating login1 session c3
[+3548.23s] DEBUG: Seat seat0 changes active session to c3
[+3548.23s] DEBUG: Session c3 is already active
[+3548.50s] DEBUG: Greeter connected version=1.30.0 api=1 resettable=false
[+3550.35s] DEBUG: Greeter requests data directory for user void
[+3550.35s] DEBUG: Creating shared data directory /var/lib/lightdm-data/void
[+3550.36s] DEBUG: Greeter start authentication for void
[+3550.36s] DEBUG: Session pid=25342: Started with service 'lightdm', username 'void'
[+3550.36s] DEBUG: Session pid=25342: Got 1 message(s) from PAM
[+3550.36s] DEBUG: Prompt greeter with 1 message(s)
[+3557.34s] DEBUG: Continue authentication
[+3557.61s] DEBUG: Session pid=25342: Authentication complete with return value 0: Success
[+3557.61s] DEBUG: Authenticate result for user void: Success
[+3557.61s] DEBUG: User void authorized
[+3558.62s] DEBUG: Greeter requests session bspwm
[+3558.62s] DEBUG: Seat seat0: Returning to existing user session void
[+3558.62s] DEBUG: Unlocking login1 session c2
[+3558.62s] DEBUG: Activating VT 7
[+3558.77s] DEBUG: Seat seat0: Stopping greeter
[+3558.77s] DEBUG: Terminating login1 session c3
[+3558.78s] DEBUG: Session pid=25260: Sending SIGTERM
[+3558.78s] DEBUG: Activating login1 session c2
[+3558.78s] DEBUG: Session pid=25342: Exited with return value 0
[+3558.78s] DEBUG: Seat seat0: Session stopped
[+3558.78s] DEBUG: Seat seat0 changes active session to c2
[+3558.78s] DEBUG: Session c2 is already active
As can be clearly seen, it says sending SIGTERM to Session pid=25260. But for some reason, it is still running when I log in, this keeps happening every time i lock my screen and by the time i notice it there are 4 sessions running with 4 different X servers.
See issue https://github.com/canonical/lightdm/issues/160, I am reproducing it here just in case if it's a light-locker issue.
I am using lightdm alongside light-locker. So as i understand when I want to unlock the session lightdm VT switches to VT8 after unlocking it then takes me back to VT7 and kills the session in VT8. But this doesn't seem to happen in my laptop.
Check my ps list to see that there are two sessions running:
Here are the debug logs from lightdm
As can be clearly seen, it says sending SIGTERM to Session pid=25260. But for some reason, it is still running when I log in, this keeps happening every time i lock my screen and by the time i notice it there are 4 sessions running with 4 different X servers.