Keyboard randomly stops working

That will definitely be useful… Have you tried lts kernel? It can be installed along mainline and selected at boot.

Welcome to the community :grin:

Edit: just in case infos here