Which version of PulseAudio is in use here?
or
Code:
pulseaudio --version
There was a long-standing
bug describing this behaviour ie auto-switching works on HDMI connect, but not on disconnect. Apparently resolved in PulseAudio 12.99.1.
Some additional thoughts...
1. As per this
comment I wonder whether explicitly setting the default sink to the internal speakers would help.
2. Just in case this is helpful as a possible workaround...
https://wiki.archlinux.org/index.php..._audio_to_HDMI
I'm sure this script could be adapted to work for the case when disconnecting HDMI.