2010-07-01 05:00:50

by Jerome Lacoste

[permalink] [raw]
Subject: i8042 no mouse on resume. (i8042: failed to resume active multiplexor, mouse won't work.)

[Please CC me]

Hei,

I've had a suspend/resume issue for 3 years: my mouse isn't working
upon resume. I see this at resume time:

i8042: failed to resume active multiplexor, mouse won't work.

and also some

atkbd.c: Spurious ACK on isa0060/serio0. Some program might be
trying access hardware directly.

I used to solve it by unbinding/binding my i8042 module after suspend.
Worked great.
Now that I've upgraded my distribution once more, the latest kernel
doesn't expose unbind/bind attributes for the driver.
See http://marc.info/?l=linux-kernel&m=125585230724962&w=2 for patch
and thread that (understandably) disabled the feature.

So it looks like there's no workaround left for me to troubleshoot
this problem. I guess I need to finally fix the original issue !

I've enabled i8042.debug. I've tested the following: boot. go to
console. echo mem > /sys/power/state, resume, ALT+F7: no mouse on gdm.

Here's the log

[ startup ]

Jul 1 05:50:28 expresso2 kernel: [ 0.678904] PNP: PS/2 Controller
[PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
Jul 1 05:50:28 expresso2 kernel: [ 0.678992]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 20 -> i8042
(command) [0]
Jul 1 05:50:28 expresso2 kernel: [ 0.679004]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 47 <- i8042
(return) [0]
Jul 1 05:50:28 expresso2 kernel: [ 0.679068]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 20 -> i8042
(command) [0]
Jul 1 05:50:28 expresso2 kernel: [ 0.679080]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 47 <- i8042
(return) [0]
Jul 1 05:50:28 expresso2 kernel: [ 0.679089]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 60 -> i8042
(command) [0]
Jul 1 05:50:28 expresso2 kernel: [ 0.680008]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 56 -> i8042
(parameter) [0]
Jul 1 05:50:28 expresso2 kernel: [ 0.681368]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: d3 -> i8042
(command) [1]
Jul 1 05:50:28 expresso2 kernel: [ 0.682935]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 5a -> i8042
(parameter) [1]
Jul 1 05:50:28 expresso2 kernel: [ 0.684248]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 5a <- i8042
(return) [1]
Jul 1 05:50:28 expresso2 kernel: [ 0.684280]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: a7 -> i8042
(command) [2]
Jul 1 05:50:28 expresso2 kernel: [ 0.685793]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 20 -> i8042
(command) [2]
Jul 1 05:50:28 expresso2 kernel: [ 0.685805]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 76 <- i8042
(return) [2]
Jul 1 05:50:28 expresso2 kernel: [ 0.685812]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: a8 -> i8042
(command) [2]
Jul 1 05:50:28 expresso2 kernel: [ 0.688266]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 20 -> i8042
(command) [2]
Jul 1 05:50:28 expresso2 kernel: [ 0.688266]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 56 <- i8042
(return) [2]
Jul 1 05:50:28 expresso2 kernel: [ 0.688387]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 60 -> i8042
(command) [3]
Jul 1 05:50:28 expresso2 kernel: [ 0.689747]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 74 -> i8042
(parameter) [3]
Jul 1 05:50:28 expresso2 kernel: [ 0.690485]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: d3 -> i8042
(command) [3]
Jul 1 05:50:28 expresso2 kernel: [ 0.692052]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: f0 -> i8042
(parameter) [3]
Jul 1 05:50:28 expresso2 kernel: [ 0.692340]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: f0 <- i8042
(return) [3]
Jul 1 05:50:28 expresso2 kernel: [ 0.693420]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: d3 -> i8042
(command) [4]
Jul 1 05:50:28 expresso2 kernel: [ 0.694831]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 56 -> i8042
(parameter) [4]
Jul 1 05:50:28 expresso2 kernel: [ 0.695935]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 56 <- i8042
(return) [4]
Jul 1 05:50:28 expresso2 kernel: [ 0.695942]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: d3 -> i8042
(command) [4]
Jul 1 05:50:28 expresso2 kernel: [ 0.697383]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: a4 -> i8042
(parameter) [4]
Jul 1 05:50:28 expresso2 kernel: [ 0.697383]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 11 <- i8042
(return) [4]
Jul 1 05:50:28 expresso2 kernel: [ 0.698303] i8042.c: Detected
active multiplexing controller, rev 1.1.
Jul 1 05:50:28 expresso2 kernel: [ 0.698310]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 60 -> i8042
(command) [5]
Jul 1 05:50:28 expresso2 kernel: [ 0.699410]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 74 -> i8042
(parameter) [5]
Jul 1 05:50:28 expresso2 kernel: [ 0.724392]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 90 -> i8042
(command) [12]
Jul 1 05:50:28 expresso2 kernel: [ 0.725442]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: a8 -> i8042
(command) [12]
Jul 1 05:50:28 expresso2 kernel: [ 0.727114]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 91 -> i8042
(command) [12]
Jul 1 05:50:28 expresso2 kernel: [ 0.728008]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: a8 -> i8042
(command) [12]
Jul 1 05:50:28 expresso2 kernel: [ 0.731100]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 92 -> i8042
(command) [13]
Jul 1 05:50:28 expresso2 kernel: [ 0.732512]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: a8 -> i8042
(command) [13]
Jul 1 05:50:28 expresso2 kernel: [ 0.734979]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 93 -> i8042
(command) [14]
Jul 1 05:50:28 expresso2 kernel: [ 0.736390]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: a8 -> i8042
(command) [14]
Jul 1 05:50:28 expresso2 kernel: [ 0.738286]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 60 -> i8042
(command) [15]
Jul 1 05:50:28 expresso2 kernel: [ 0.739594]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 56 -> i8042
(parameter) [15]
Jul 1 05:50:28 expresso2 kernel: [ 0.748647]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 60 -> i8042
(command) [18]
Jul 1 05:50:28 expresso2 kernel: [ 0.749800]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 47 -> i8042
(parameter) [18]
Jul 1 05:50:28 expresso2 kernel: [ 0.749809] serio: i8042 KBD port
at 0x60,0x64 irq 1
Jul 1 05:50:28 expresso2 kernel: [ 0.749828] serio: i8042 AUX0
port at 0x60,0x64 irq 12
Jul 1 05:50:28 expresso2 kernel: [ 0.756100] serio: i8042 AUX1
port at 0x60,0x64 irq 12
Jul 1 05:50:28 expresso2 kernel: [ 0.756166] serio: i8042 AUX2
port at 0x60,0x64 irq 12
Jul 1 05:50:28 expresso2 kernel: [ 0.756217] serio: i8042 AUX3
port at 0x60,0x64 irq 12
Jul 1 05:50:28 expresso2 kernel: [ 0.756472] mice: PS/2 mouse
device common for all mice
Jul 1 05:50:28 expresso2 kernel: [ 0.756692]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: f2 -> i8042
(kbd-data) [20]
Jul 1 05:50:28 expresso2 kernel: [ 0.756745] rtc_cmos 00:08: RTC
can wake from S4
Jul 1 05:50:28 expresso2 kernel: [ 0.756819] rtc_cmos 00:08: rtc
core: registered rtc_cmos as rtc0
Jul 1 05:50:28 expresso2 kernel: [ 0.756862] rtc0: alarms up to
one month, y3k, 242 bytes nvram, hpet irqs
Jul 1 05:50:28 expresso2 kernel: [ 0.757079] device-mapper:
uevent: version 1.0.3
Jul 1 05:50:28 expresso2 kernel: [ 0.759440]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: fa <- i8042
(interrupt, 0, 1) [20]
Jul 1 05:50:28 expresso2 kernel: [ 0.760116]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: ab <- i8042
(interrupt, 0, 1) [21]
Jul 1 05:50:28 expresso2 kernel: [ 0.760587]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 41 <- i8042
(interrupt, 0, 1) [21]
Jul 1 05:50:28 expresso2 kernel: [ 0.761107]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: ed -> i8042
(kbd-data) [21]
Jul 1 05:50:28 expresso2 kernel: [ 0.762370]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: fa <- i8042
(interrupt, 0, 1) [21]
Jul 1 05:50:28 expresso2 kernel: [ 0.762525]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 00 -> i8042
(kbd-data) [21]
Jul 1 05:50:28 expresso2 kernel: [ 0.765162]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: fa <- i8042
(interrupt, 0, 1) [22]
Jul 1 05:50:28 expresso2 kernel: [ 0.765485]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: f3 -> i8042
(kbd-data) [22]
Jul 1 05:50:28 expresso2 kernel: [ 0.767824]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: fa <- i8042
(interrupt, 0, 1) [22]
Jul 1 05:50:28 expresso2 kernel: [ 0.768066]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 00 -> i8042
(kbd-data) [23]
Jul 1 05:50:28 expresso2 kernel: [ 0.769838]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: fa <- i8042
(interrupt, 0, 1) [23]
Jul 1 05:50:28 expresso2 kernel: [ 0.769942] isapnp: No Plug &
Play device found
Jul 1 05:50:28 expresso2 kernel: [ 0.769972]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: f4 -> i8042
(kbd-data) [23]
Jul 1 05:50:28 expresso2 kernel: [ 0.770177] device-mapper: ioctl:
4.15.0-ioctl (2009-04-01) initialised: [email protected]
Jul 1 05:50:28 expresso2 kernel: [ 0.770305] device-mapper:
multipath: version 1.1.0 loaded
Jul 1 05:50:28 expresso2 kernel: [ 0.770311] device-mapper:
multipath round-robin: version 1.0.0 loaded
Jul 1 05:50:28 expresso2 kernel: [ 0.770542] EISA: Probing bus 0 at eisa.0
Jul 1 05:50:28 expresso2 kernel: [ 0.770552] Cannot allocate
resource for EISA slot 1
Jul 1 05:50:28 expresso2 kernel: [ 0.770557] Cannot allocate
resource for EISA slot 2
Jul 1 05:50:28 expresso2 kernel: [ 0.770561] Cannot allocate
resource for EISA slot 3
Jul 1 05:50:28 expresso2 kernel: [ 0.770566] Cannot allocate
resource for EISA slot 4
Jul 1 05:50:28 expresso2 kernel: [ 0.770590] EISA: Detected 0 cards.
Jul 1 05:50:28 expresso2 kernel: [ 0.770869] cpuidle: using governor ladder
Jul 1 05:50:28 expresso2 kernel: [ 0.771111] cpuidle: using governor menu
Jul 1 05:50:28 expresso2 kernel: [ 0.771563]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: fa <- i8042
(interrupt, 0, 1) [23]
Jul 1 05:50:28 expresso2 kernel: [ 0.772026] TCP cubic registered
Jul 1 05:50:28 expresso2 kernel: [ 0.772287] input: AT Translated
Set 2 keyboard as /devices/platform/i8042/serio0/input/input4
Jul 1 05:50:28 expresso2 kernel: [ 0.772369]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 90 -> i8042
(command) [24]
Jul 1 05:50:28 expresso2 kernel: [ 0.772391] NET: Registered
protocol family 10
Jul 1 05:50:28 expresso2 kernel: [ 0.773314]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: f2 -> i8042
(parameter) [24]
Jul 1 05:50:28 expresso2 kernel: [ 0.773373] lo: Disabled Privacy Extensions
Jul 1 05:50:28 expresso2 kernel: [ 0.774080] NET: Registered
protocol family 17
Jul 1 05:50:28 expresso2 kernel: [ 0.774710]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: fe <- i8042
(interrupt, 2, 12) [24]
Jul 1 05:50:28 expresso2 kernel: [ 0.774907]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 90 -> i8042
(command) [24]
Jul 1 05:50:28 expresso2 kernel: [ 0.774943] Using IPI No-Shortcut mode
Jul 1 05:50:28 expresso2 kernel: [ 0.775061] PM: Resume from disk failed.
Jul 1 05:50:28 expresso2 kernel: [ 0.775074] registered taskstats version 1
Jul 1 05:50:28 expresso2 kernel: [ 0.775682] Magic number: 2:183:815
Jul 1 05:50:28 expresso2 kernel: [ 0.776009]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: ed -> i8042
(parameter) [24]
Jul 1 05:50:28 expresso2 kernel: [ 0.776097] rtc_cmos 00:08:
setting system clock to 2010-07-01 03:50:08 UTC (1277956208)
Jul 1 05:50:28 expresso2 kernel: [ 0.776101] BIOS EDD facility
v0.16 2004-Jun-25, 0 devices found
Jul 1 05:50:28 expresso2 kernel: [ 0.776103] EDD information not available.
Jul 1 05:50:28 expresso2 kernel: [ 0.777365]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: fe <- i8042
(interrupt, 2, 12) [25]
Jul 1 05:50:28 expresso2 kernel: [ 0.777442]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 91 -> i8042
(command) [25]
Jul 1 05:50:28 expresso2 kernel: [ 0.778846]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: f2 -> i8042
(parameter) [25]
Jul 1 05:50:28 expresso2 kernel: [ 0.779739]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: fe <- i8042
(interrupt, 3, 12) [25]
Jul 1 05:50:28 expresso2 kernel: [ 0.779802]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 91 -> i8042
(command) [25]
Jul 1 05:50:28 expresso2 kernel: [ 0.780947]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: ed -> i8042
(parameter) [25]
Jul 1 05:50:28 expresso2 kernel: [ 0.781990]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: fe <- i8042
(interrupt, 3, 12) [26]
Jul 1 05:50:28 expresso2 kernel: [ 0.782061]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 92 -> i8042
(command) [26]
Jul 1 05:50:28 expresso2 kernel: [ 0.783931]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: f2 -> i8042
(parameter) [26]
Jul 1 05:50:28 expresso2 kernel: [ 0.784844]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: fe <- i8042
(interrupt, 4, 12) [27]
Jul 1 05:50:28 expresso2 kernel: [ 0.784906]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 92 -> i8042
(command) [27]
Jul 1 05:50:28 expresso2 kernel: [ 0.786621]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: ed -> i8042
(parameter) [27]
Jul 1 05:50:28 expresso2 kernel: [ 0.787544]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: fe <- i8042
(interrupt, 4, 12) [27]
Jul 1 05:50:28 expresso2 kernel: [ 0.787615]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 93 -> i8042
(command) [27]
Jul 1 05:50:28 expresso2 kernel: [ 0.788967]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: f2 -> i8042
(parameter) [27]
Jul 1 05:50:28 expresso2 kernel: [ 0.794694]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: fa <- i8042
(interrupt, 5, 12) [29]
Jul 1 05:50:28 expresso2 kernel: [ 0.795382]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 00 <- i8042
(interrupt, 5, 12) [29]
Jul 1 05:50:28 expresso2 kernel: [ 0.812803] ata1.00: ATA-8: WDC
WD3200BEKT-22F3T0, 11.01A11, max UDMA/133


[resume]

Jul 1 05:53:46 expresso2 kernel: [ 208.988160] PM: resume of drv:usb
dev:usb2 complete after 247.950 msecs
Jul 1 05:53:46 expresso2 kernel: [ 209.236141] PM: resume of drv:usb
dev:usb4 complete after 247.936 msecs
Jul 1 05:53:46 expresso2 kernel: [ 209.236236]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: aa <- i8042
(flush, kbd) [52140]
Jul 1 05:53:46 expresso2 kernel: [ 209.236246]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 60 -> i8042
(command) [52140]
Jul 1 05:53:46 expresso2 kernel: [ 209.237397]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 74 -> i8042
(parameter) [52140]
Jul 1 05:53:46 expresso2 kernel: [ 209.238607]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: d3 -> i8042
(command) [52140]
Jul 1 05:53:46 expresso2 kernel: [ 209.239758]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: f0 -> i8042
(parameter) [52140]
Jul 1 05:53:46 expresso2 kernel: [ 209.239769]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: -- i8042
(auxerr) [52140]
Jul 1 05:53:46 expresso2 kernel: [ 209.239780]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: fa <- i8042
(interrupt, 0, 1) [52140]
Jul 1 05:53:46 expresso2 kernel: [ 209.239786] i8042: failed to
resume active multiplexor, mouse won't work.
Jul 1 05:53:46 expresso2 kernel: [ 209.240064]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 60 -> i8042
(command) [52140]
Jul 1 05:53:46 expresso2 kernel: [ 209.240064]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: 65 -> i8042
(parameter) [52140]
Jul 1 05:53:46 expresso2 kernel: [ 209.241836]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: MUX error,
status is 37, data is f0 [52141]
Jul 1 05:53:46 expresso2 kernel: [ 209.241842]
/build/buildd/linux-2.6.32/drivers/input/serio/i8042.c: fe <- i8042
(interrupt, 2, 0, timeout) [52141]

And the relevant code:

http://lxr.free-electrons.com/source/drivers/input/serio/i8042.c?v=2.6.32#L1079
http://lxr.free-electrons.com/source/drivers/input/serio/i8042.c?v=2.6.32#L526

so i8042_set_mux_mode() doesn't seem to work at all

I am running

Linux expresso2 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3
22:02:19 UTC 2010 i686 GNU/Linux

But as far as I can tell, there's no modification to i8042 in that
kernel (http://packages.ubuntu.com/en/lucid/linux-image-2.6.32-22-generic)

Let me know if you need anything else.

Cheers,

Jerome

For reference,

* the hardware is a Lenovo 3000 N100
* some links:
https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/23497
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/86820


2010-07-01 16:25:05

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: i8042 no mouse on resume. (i8042: failed to resume active multiplexor, mouse won't work.)

Hi Jerome,

On Thu, Jul 01, 2010 at 07:00:45AM +0200, Jerome Lacoste wrote:
> [Please CC me]
>
> Hei,
>
> I've had a suspend/resume issue for 3 years: my mouse isn't working
> upon resume. I see this at resume time:
>
> i8042: failed to resume active multiplexor, mouse won't work.
>
> and also some
>
> atkbd.c: Spurious ACK on isa0060/serio0. Some program might be
> trying access hardware directly.
>
> I used to solve it by unbinding/binding my i8042 module after suspend.
> Worked great.
> Now that I've upgraded my distribution once more, the latest kernel
> doesn't expose unbind/bind attributes for the driver.
> See http://marc.info/?l=linux-kernel&m=125585230724962&w=2 for patch
> and thread that (understandably) disabled the feature.
>
> So it looks like there's no workaround left for me to troubleshoot
> this problem. I guess I need to finally fix the original issue !
>
> I've enabled i8042.debug. I've tested the following: boot. go to
> console. echo mem > /sys/power/state, resume, ALT+F7: no mouse on gdm.
>

...

>
> so i8042_set_mux_mode() doesn't seem to work at all
>
> I am running
>
> Linux expresso2 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3
> 22:02:19 UTC 2010 i686 GNU/Linux
>
> But as far as I can tell, there's no modification to i8042 in that
> kernel (http://packages.ubuntu.com/en/lucid/linux-image-2.6.32-22-generic)
>
> Let me know if you need anything else.
>
> Cheers,
>
> Jerome
>
> For reference,
>
> * the hardware is a Lenovo 3000 N100

We already trying to disable MUX mode on Lenovo 3000 N100, see
drivers/input/serio/i8042-x86ia64io.h:

{
/* Lenovo 3000 n100 */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_NAME, "076804U"),
},
},

What's in your dmi?

--
Dmitry

2010-07-01 21:20:34

by Jerome Lacoste

[permalink] [raw]
Subject: Re: i8042 no mouse on resume. (i8042: failed to resume active multiplexor, mouse won't work.)

On Thu, Jul 1, 2010 at 6:24 PM, Dmitry Torokhov
<[email protected]> wrote:
> Hi Jerome,
>
[...]
>> * the hardware is a Lenovo 3000 N100
>
> We already trying to disable MUX mode on Lenovo 3000 N100, see
> drivers/input/serio/i8042-x86ia64io.h:
>
> ? ? ? ?{
> ? ? ? ? ? ? ? ?/* Lenovo 3000 n100 */
> ? ? ? ? ? ? ? ?.matches = {
> ? ? ? ? ? ? ? ? ? ? ? ?DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> ? ? ? ? ? ? ? ? ? ? ? ?DMI_MATCH(DMI_PRODUCT_NAME, "076804U"),
> ? ? ? ? ? ? ? ?},
> ? ? ? ?},
>
> What's in your dmi?

System Information
Manufacturer: LENOVO
Product Name: 0768BKG
Version: 3000 N100

according to dmidecode

Jerome

2010-07-01 22:28:23

by Jerome Lacoste

[permalink] [raw]
Subject: Re: i8042 no mouse on resume. (i8042: failed to resume active multiplexor, mouse won't work.)

On Thu, Jul 1, 2010 at 11:19 PM, Jerome Lacoste
<[email protected]> wrote:
> On Thu, Jul 1, 2010 at 6:24 PM, Dmitry Torokhov
> <[email protected]> wrote:
>> Hi Jerome,
>>
> [...]
>>> * the hardware is a Lenovo 3000 N100
>>
>> We already trying to disable MUX mode on Lenovo 3000 N100, see
>> drivers/input/serio/i8042-x86ia64io.h:
>>
>> ? ? ? ?{
>> ? ? ? ? ? ? ? ?/* Lenovo 3000 n100 */
>> ? ? ? ? ? ? ? ?.matches = {
>> ? ? ? ? ? ? ? ? ? ? ? ?DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
>> ? ? ? ? ? ? ? ? ? ? ? ?DMI_MATCH(DMI_PRODUCT_NAME, "076804U"),
>> ? ? ? ? ? ? ? ?},
>> ? ? ? ?},
>>
>> What's in your dmi?
>
> System Information
> ? ? ? ?Manufacturer: LENOVO
> ? ? ? ?Product Name: 0768BKG
> ? ? ? ?Version: 3000 N100
>
> according to dmidecode

Note: I will try the i8042.nomux option, but can't reboot until tomorrow.

Some information that maybe relevant:

The blacklist used to be broader but was restricted by
https://kerneltrap.org/mailarchive/git-commits-head/2008/9/7/3217784

The discussion is in particular here:
http://lkml.indiana.edu/hypermail/linux/kernel/0809.0/0316.html

which states that the problem for which one didn't want to blacklist was a:

System Information
Manufacturer: LENOVO
Product Name: 076836U
Version: 3000 N100

There seems to be many various versions of that Product Name

http://smolts.org/reports/view_profiles?profile=+3000+N100&search=Submit

I wonder if there are other versions affected by this "regression".

For example

https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/86820
points to
http://launchpadlibrarian.net/6494256/dmidecode

Manufacturer: LENOVO
Product Name: 0768B9G
Version: 3000 N100

which is probably also affected

It would be nice if the message that displays "failed to resume active
multiplexor, mouse won't work." could also print out the relevant dmi
information.

That way one could use google to find potentially affected systems :)

Cheers,

Jerome

2010-07-01 22:42:43

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: i8042 no mouse on resume. (i8042: failed to resume active multiplexor, mouse won't work.)

On Fri, Jul 02, 2010 at 12:28:17AM +0200, Jerome Lacoste wrote:
> On Thu, Jul 1, 2010 at 11:19 PM, Jerome Lacoste
> <[email protected]> wrote:
> > On Thu, Jul 1, 2010 at 6:24 PM, Dmitry Torokhov
> > <[email protected]> wrote:
> >> Hi Jerome,
> >>
> > [...]
> >>> * the hardware is a Lenovo 3000 N100
> >>
> >> We already trying to disable MUX mode on Lenovo 3000 N100, see
> >> drivers/input/serio/i8042-x86ia64io.h:
> >>
> >> ? ? ? ?{
> >> ? ? ? ? ? ? ? ?/* Lenovo 3000 n100 */
> >> ? ? ? ? ? ? ? ?.matches = {
> >> ? ? ? ? ? ? ? ? ? ? ? ?DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> >> ? ? ? ? ? ? ? ? ? ? ? ?DMI_MATCH(DMI_PRODUCT_NAME, "076804U"),
> >> ? ? ? ? ? ? ? ?},
> >> ? ? ? ?},
> >>
> >> What's in your dmi?
> >
> > System Information
> > ? ? ? ?Manufacturer: LENOVO
> > ? ? ? ?Product Name: 0768BKG
> > ? ? ? ?Version: 3000 N100
> >
> > according to dmidecode
>
> Note: I will try the i8042.nomux option, but can't reboot until tomorrow.

Could you please also try i8042.reset instead of i8042.nomux?

--
Dmitry

Subject: Re: i8042 no mouse on resume. (i8042: failed to resume active multiplexor, mouse won't work.)

On Fri, 02 Jul 2010, Jerome Lacoste wrote:
> The discussion is in particular here:
> http://lkml.indiana.edu/hypermail/linux/kernel/0809.0/0316.html

Which lists firmware version 61ET20WW, which according to:
http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-67008

is a *VERY* outdated BIOS.

And it looks like there are two firmware versions (61* and 63*). And many
releases. If the BIOS update program also upgrades the EC, it can very well
fix i8042-related problems, since it is usually emulated by EC firmware.

Doesn't look like a quirk you can tie to just model type. And if you do,
the three last letters usually doesn't mean much on any Lenovo or IBM box.
The first four are the main model type.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh

2010-07-03 08:26:18

by Jerome Lacoste

[permalink] [raw]
Subject: Re: i8042 no mouse on resume. (i8042: failed to resume active multiplexor, mouse won't work.)

On Fri, Jul 2, 2010 at 12:42 AM, Dmitry Torokhov
<[email protected]> wrote:
> On Fri, Jul 02, 2010 at 12:28:17AM +0200, Jerome Lacoste wrote:
>> On Thu, Jul 1, 2010 at 11:19 PM, Jerome Lacoste
>> <[email protected]> wrote:
>> > On Thu, Jul 1, 2010 at 6:24 PM, Dmitry Torokhov
>> > <[email protected]> wrote:
>> >> Hi Jerome,
>> >>
>> > [...]
>> >>> * the hardware is a Lenovo 3000 N100
>> >>
>> >> We already trying to disable MUX mode on Lenovo 3000 N100, see
>> >> drivers/input/serio/i8042-x86ia64io.h:
>> >>
[...]
>> > System Information
>> > Manufacturer: LENOVO
>> > Product Name: 0768BKG
>> > Version: 3000 N100
>> >
>> > according to dmidecode
>>
>> Note: I will try the i8042.nomux option, but can't reboot until tomorrow.
>
> Could you please also try i8042.reset instead of i8042.nomux?

the i8042.reset works so far after 5 resumes.

Tested with: Linux expresso2 2.6.32-23-generic #37-Ubuntu SMP Fri Jun
11 07:54:58 UTC 2010 i686 GNU/Linux

Should I test something else ?

Jerome

2010-07-03 21:20:22

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: i8042 no mouse on resume. (i8042: failed to resume active multiplexor, mouse won't work.)

On Sat, Jul 03, 2010 at 10:26:13AM +0200, Jerome Lacoste wrote:
> On Fri, Jul 2, 2010 at 12:42 AM, Dmitry Torokhov
> <[email protected]> wrote:
> > On Fri, Jul 02, 2010 at 12:28:17AM +0200, Jerome Lacoste wrote:
> >> On Thu, Jul 1, 2010 at 11:19 PM, Jerome Lacoste
> >> <[email protected]> wrote:
> >> > On Thu, Jul 1, 2010 at 6:24 PM, Dmitry Torokhov
> >> > <[email protected]> wrote:
> >> >> Hi Jerome,
> >> >>
> >> > [...]
> >> >>> * the hardware is a Lenovo 3000 N100
> >> >>
> >> >> We already trying to disable MUX mode on Lenovo 3000 N100, see
> >> >> drivers/input/serio/i8042-x86ia64io.h:
> >> >>
> [...]
> >> > System Information
> >> > Manufacturer: LENOVO
> >> > Product Name: 0768BKG
> >> > Version: 3000 N100
> >> >
> >> > according to dmidecode
> >>
> >> Note: I will try the i8042.nomux option, but can't reboot until tomorrow.
> >
> > Could you please also try i8042.reset instead of i8042.nomux?
>
> the i8042.reset works so far after 5 resumes.
>
> Tested with: Linux expresso2 2.6.32-23-generic #37-Ubuntu SMP Fri Jun
> 11 07:54:58 UTC 2010 i686 GNU/Linux
>
> Should I test something else ?
>

Coudl you please try the patch below?

Thanks.

--
Dmitry


Input: i8042 - reset keyboard controller wehen resuming from S2R

From: Dmitry Torokhov <[email protected]>

Some laptops, such as Lenovo 3000 N100, require keyboard controller reset
in order to have touchpad operable after suspend to RAM. Even if box does
not need the reset it should be safe to do so, so instead of chasing
after misbehaving boxes and grow DMI tables. let's reset the controller
unconditionally.

Reported-by: Jerome Lacoste <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
---

drivers/input/serio/i8042.c | 65 +++++++++++++++++++++++++++----------------
1 files changed, 41 insertions(+), 24 deletions(-)


diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index 6440a8f..258b98b 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -861,9 +861,6 @@ static int i8042_controller_selftest(void)
unsigned char param;
int i = 0;

- if (!i8042_reset)
- return 0;
-
/*
* We try this 5 times; on some really fragile systems this does not
* take the first time...
@@ -1020,7 +1017,8 @@ static void i8042_controller_reset(void)
* Reset the controller if requested.
*/

- i8042_controller_selftest();
+ if (i8042_reset)
+ i8042_controller_selftest();

/*
* Restore the original control register setting.
@@ -1094,23 +1092,11 @@ static void i8042_dritek_enable(void)
#ifdef CONFIG_PM

/*
- * Here we try to restore the original BIOS settings to avoid
- * upsetting it.
- */
-
-static int i8042_pm_reset(struct device *dev)
-{
- i8042_controller_reset();
-
- return 0;
-}
-
-/*
* Here we try to reset everything back to a state we had
* before suspending.
*/

-static int i8042_pm_restore(struct device *dev)
+static int i8042_controller_resume(bool force_reset)
{
int error;

@@ -1118,9 +1104,11 @@ static int i8042_pm_restore(struct device *dev)
if (error)
return error;

- error = i8042_controller_selftest();
- if (error)
- return error;
+ if (i8042_reset || force_reset) {
+ error = i8042_controller_selftest();
+ if (error)
+ return error;
+ }

/*
* Restore original CTR value and disable all ports
@@ -1162,6 +1150,28 @@ static int i8042_pm_restore(struct device *dev)
return 0;
}

+/*
+ * Here we try to restore the original BIOS settings to avoid
+ * upsetting it.
+ */
+
+static int i8042_pm_reset(struct device *dev)
+{
+ i8042_controller_reset();
+
+ return 0;
+}
+
+static int i8042_pm_resume(struct device *dev)
+{
+ /*
+ * On resume from S2R we always try to reset the controller
+ * to bring it in a sane state. (In case of S2D we expect
+ * BIOS to reset the controller for us.)
+ */
+ return i8042_controller_resume(true);
+}
+
static int i8042_pm_thaw(struct device *dev)
{
i8042_interrupt(0, NULL);
@@ -1169,9 +1179,14 @@ static int i8042_pm_thaw(struct device *dev)
return 0;
}

+static int i8042_pm_restore(struct device *dev)
+{
+ return i8042_controller_resume(false);
+}
+
static const struct dev_pm_ops i8042_pm_ops = {
.suspend = i8042_pm_reset,
- .resume = i8042_pm_restore,
+ .resume = i8042_pm_resume,
.thaw = i8042_pm_thaw,
.poweroff = i8042_pm_reset,
.restore = i8042_pm_restore,
@@ -1389,9 +1404,11 @@ static int __init i8042_probe(struct platform_device *dev)

i8042_platform_device = dev;

- error = i8042_controller_selftest();
- if (error)
- return error;
+ if (i8042_reset) {
+ error = i8042_controller_selftest();
+ if (error)
+ return error;
+ }

error = i8042_controller_init();
if (error)

Subject: Re: i8042 no mouse on resume. (i8042: failed to resume active multiplexor, mouse won't work.)

Won't this cause an extra delay on resume to everyone who has a device
with proper firmware?

Would it be possible to reset the i8042 only if failures to bring the
active multiplexer are detected?

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh

2010-07-04 05:26:37

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: i8042 no mouse on resume. (i8042: failed to resume active multiplexor, mouse won't work.)

Hi Henrique,

On Sun, Jul 04, 2010 at 01:53:15AM -0300, Henrique de Moraes Holschuh wrote:
> Won't this cause an extra delay on resume to everyone who has a device
> with proper firmware?

I do not think that i8042 reset itself takes long time, touchpads are
the ones that need about 1 sec to do a full reset,

>
> Would it be possible to reset the i8042 only if failures to bring the
> active multiplexer are detected?
>

Failure to revive multiplexor is the only issue there is...

--
Dmitry

2010-07-12 14:28:48

by Jerome Lacoste

[permalink] [raw]
Subject: Re: i8042 no mouse on resume. (i8042: failed to resume active multiplexor, mouse won't work.)

On Sat, Jul 3, 2010 at 11:20 PM, Dmitry Torokhov
<[email protected]> wrote:
[...]
>> > Could you please also try i8042.reset instead of i8042.nomux?
>>
>> the i8042.reset works so far after 5 resumes.
>>
>> Tested with: Linux expresso2 2.6.32-23-generic #37-Ubuntu SMP Fri Jun
>> 11 07:54:58 UTC 2010 i686 GNU/Linux
>>
>> Should I test something else ?
>>
>
> Coudl you please try the patch below?
>
> Thanks.

Patch works ( I adapted it to work for my kernel:
http://launchpadlibrarian.net/51784930/0001-Input-i8042-reset-keyboard-controller-wehen-resuming.patch
)

Sorry it took me quite a bit of time to manage to get Ubuntu's git
repo cloned and build my kernel.

I suspended/resumed 3 times so far after removing the i8042.quiet
option. There's nothing wrong in the logs. I'll report if I see a
problem.

I haven't noticed delays in resuming.

Jerome

2010-07-12 16:08:10

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: i8042 no mouse on resume. (i8042: failed to resume active multiplexor, mouse won't work.)

On Mon, Jul 12, 2010 at 04:28:41PM +0200, Jerome Lacoste wrote:
> On Sat, Jul 3, 2010 at 11:20 PM, Dmitry Torokhov
> <[email protected]> wrote:
> [...]
> >> > Could you please also try i8042.reset instead of i8042.nomux?
> >>
> >> the i8042.reset works so far after 5 resumes.
> >>
> >> Tested with: Linux expresso2 2.6.32-23-generic #37-Ubuntu SMP Fri Jun
> >> 11 07:54:58 UTC 2010 i686 GNU/Linux
> >>
> >> Should I test something else ?
> >>
> >
> > Coudl you please try the patch below?
> >
> > Thanks.
>
> Patch works ( I adapted it to work for my kernel:
> http://launchpadlibrarian.net/51784930/0001-Input-i8042-reset-keyboard-controller-wehen-resuming.patch
> )
>
> Sorry it took me quite a bit of time to manage to get Ubuntu's git
> repo cloned and build my kernel.
>
> I suspended/resumed 3 times so far after removing the i8042.quiet
> option. There's nothing wrong in the logs. I'll report if I see a
> problem.
>
> I haven't noticed delays in resuming.
>

Great, I will mark it as 'Tested-by:' by you then.

--
Dmitry