Sometimes I have the problem with Lubuntu 18.04 LTS on a Thinkpad T430S, that a shutdown needs a long time. Mostly the problem is Samba, which does not stop in the specified time. During shutdown you got a message like this on console:
A stop job is running for Session [..]
The systemd starts and stops processes. For stopping jobs there is an timeout of 90s. This is certainly appropriate for servers, especially when databases are running, but much too long for a client system.
To change this timeout you have to edit /etc/systemd/systemd.conf:
#DefaultStandardError=inherit #DefaultTimeoutStartSec=90s #DefaultTimeoutStopSec=90s #DefaultRestartSec=100ms #DefaultStartLimitIntervalSec=10s
Simple uncomment the line which defines this timeout, 'DefaultTimeoutStopSec' and change the value as you like.