On Tue, 21 Mar 2017 at 01:55:51 +0000, Raf Czlonka wrote: > I've installed -current on this laptop in August and not until some > weeks or months later had I actually started using xdm(1) - this > is when I noticed the issue. Before, I've been always using startx > and got into the habit of quitting X before I suspended the laptop > - yes, I had forgotten to mention this crucial bit of information > (it's pretty late here) - suspend works just fine if X isn't running > so I'm not entirely sure if it is purely kernel-related. > > I've got release CDs going back several years so once I get a hold > of another disk, I'll try to narrow it down - this may take a while > as currently it is my main machine.
Actually, this bug is sort of known and not easy to fix. It is caused by the keyboard and mouse devices (which attach over USB) detaching at suspend time and reattaching after resume. Xorg's keyboard input driver tries to talk to the keyboard device when the machine resumes but does so before the device has actually attached, which fails, and prints this error: (EE) can't switch keyboard to raw mode. Enable support for it in the kernel[..] Which takes down the X server. I'm not sure if the device retains its raw mode setting when it reattaches and causes the keys to input incorrectly on the console, but they are all related. Fixing this may require redesigning some Xorg and kernel components. A work around for this is to switch to the console before suspending, then just switch back to X once it comes back.
