The trackpad's click often fails during normal use.
It fails when the computer is used in a horizontal position flat on the table, but when the computer is tilted at a 45º angle the click starts working again.
The computer has gone to sleep twice in the middle of use.
Now every time I wake the computer up from sleep, the computer's screen flashes green or with a pixelated image, and the trackpad and keyboard do not work, so I have to force shutdown and do an SMC restart.
I was using El Capitan when the problems started, and now I have updated to High Sierra with no improvement.
I used cocnutBattery to assess the battery health in case of swelling, but it says the battery is completely healthy. Apple diagnostics also couldn't detect any problem.
I have tried the NVAM and SMC resets many times to no avail.