-Dell Latitude 7490
-FiiO E10K USB DAC
-Gnome DE with GDM. LightDM and Light Locker are turned off
-TLP as the power management

This bug is always can be replicated on my laptop.
I always plugged in the USB DAC from the booting up, but rarely I remove the USB DAC when I need to listen with the speakers.

-At the first time plugged out the USB DAC, it will restart the DE.
-At the second time within a few seconds, plug-out & in the USB DAC can give force automatic log out from the session.
-Within a few minutes, plug out & in the USB DAC only restart the DE.
-Plug out & in from the lock screen doesn’t give a similar bug.