This is caused by systemd-tty-ask-password-agent: rxvt-unicode(28371)-+-bash(28373)---sudo(14210)---dpkg(14211)---ifupdown.postin(14214)---systemctl(15338)---systemd-tty-ask(15342)
(from pstree) But it seems like the systemd helper is trying to talk to tty1, while the terminal I've ran dpkg --configure -a from is a rxvt-unicode on /dev/pts/1. So, it seems this is a systemd issue where systemd-tty-ask is failing to detect X properly and trying to ask for something on tty1 instead. (Which is unavailable because that's what X is using.) That said, I don't think systemd should be asking anything during ifup restart, so possibly a second bug somewhere..? Hope it helps :) Regards, Martin Hradil