linux console implemented by the VT subsystem of the linux kernel, when I login in form the serial port console, does it using the terminfo or termcap?
It makes no difference. A few systems may use a termcap library for certain applications (offhand, probably only Slackware), but an application uses the same libraries whether or not it runs on a serial port.
Several applications use a termcap interface to the ncurses library (which provides both termcap and terminfo interfaces), but that does not change the answer. They will still use the same library (and same interface) simply because there's little point in switching between different low-level interfaces to the same library.
By "interface" of course is meant the handful of functions which are used to initialize and query the terminal database. An application using a termcap interface to ncurses still gets terminfo data, albeit slightly adjusted to work better with applications such as screen
which assume that the alternate character set is not reset by the termcap md
(the "same" as sgr0
).
Further reading: