From: Zack Rusin <zackr@vmware.com>
To: "dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Michael Banack <banackm@vmware.com>
Subject: Suspend with ps2 keyboard/mice
Date: Thu, 2 Feb 2023 03:23:34 +0000 [thread overview]
Message-ID: <6d7b3cda248c7ca14d6fb3c8fbd49345306ae46e.camel@vmware.com> (raw)
Hi, Dmitry.
We've been scratching our heads about:
a1cec0617738 ("Input: psmouse - properly reset mouse on shutdown/suspend")
because we're having trouble seeing how it can work with suspend on ps2. We were
planning to wait another 4 years to get to a 20 year anniversary of that patch but
we figured 16 is probably good enough.
So the kernels i8042 module specifically calls device_set_wakeup_enable only on the
keyboard port. Then because of the a1cec0617738 psbase leaves the mouse enabled on
suspend which, in case of a mouse move/click right before the suspend makes sure
Linux will never wake up.
That's because the dataport will be effectively latched to the mouse (mouse irq
wasn't serviced in the guest) and it won't be possible to deliver a keyboard
interrupt anymore, and mouse interrupts won't wake Linux.
Our suggestion would be to simply remove the:
ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE);
added in a1cec0617738 . I don't have access to HP nx7400 from 2007 but it seems like
that code breaks every other well formed ps/2 controller with suspend/wakeup.
I think the ps2 mouse has to be disabled on suspend in order to be able to get the
keyboard interrupts required to wake up. Otherwise if the mouse is supposed to be
really enabled (but mouse irq's will be ignored), then how does the PS/2 controller
decide whether to return mouse or keyboard data when they do the data port read?
z
next reply other threads:[~2023-02-02 3:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 3:23 Zack Rusin [this message]
2023-02-02 6:12 ` Suspend with ps2 keyboard/mice dmitry.torokhov
2023-02-03 2:53 ` Zack Rusin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6d7b3cda248c7ca14d6fb3c8fbd49345306ae46e.camel@vmware.com \
--to=zackr@vmware.com \
--cc=banackm@vmware.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).