I have a DELL Inspiron laptop it's inbuilt keyboard gets disconnected or stops responding randomly I don't know, but still my touchpad works and I always have to logout and sign in again to make the keyboard again working.
Do you have (or can you borrow) a USB keyboard that you can plug in when the built in keyboard stops working ?
That may allow us to do some diagnostics.
When it stops working and you logout and log in again does the in built keyboard allow you to enter a password ?