Random touchpad-keyboard freeze after boot


The issue I describe below is a very old (kernel?) bug and still present in today’s versions. I have already came accross with it in multiple distributions (currently I am using Ubuntu, but openSUSE is affected as well).

My problem is that sometimes after boot the touchpad and the keyboard crash. In this case, the only thing I can do is reboot and hope that next time it works, however, sometimes that is not the case.

How can I debug this issue?

I have tried dmesg. Since my keyboard did not work, I have created an entry in Startup Applications with a bash script containing the dmesg command. Here is the output which is created when the keyboard crashed, and here is an output when everything works. Unfortuantely, I could not find relevant differences between them.