2014-10-10 20:51:38

by Dmitry Torokhov

[permalink] [raw]
Subject: [PATCH] Input: i8042 - disable active multiplexing by default

Active multiplexing is a nice feature as it allows several pointing devices
(such as touchpad and external mouse) use their native protocols at the
same time. Unfortunately many manufacturers do not implement the feature
properly even though they advertise it. The problematic implementations are
never fixed, since Windows by default does not use this mode, and move from
one BIOS/model of laptop to another. When active multiplexing is broken
turning it on usually results in touchpad, keyboard, or both unresponsive.

With PS/2 usage on decline (most of PS/2 devices in use nowadays are
internal laptop touchpads), I expect number of users who have laptops with
working MUX implementation, docking stations with external PS/2 ports, and
who are still using external PS/2 mice, to be rather small. Let's flip the
default to be OFF and allow activating it through i8042.nomux=0 kernel
option. We'll also keep DMI table where we can record known good models.

Signed-off-by: Dmitry Torokhov <[email protected]>
---
Documentation/kernel-parameters.txt | 2 +-
drivers/input/serio/i8042-x86ia64io.h | 281 +---------------------------------
drivers/input/serio/i8042.c | 2 +-
3 files changed, 10 insertions(+), 275 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 10d51c2..6b10543 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1237,7 +1237,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
i8042.noloop [HW] Disable the AUX Loopback command while probing
for the AUX port
i8042.nomux [HW] Don't check presence of an active multiplexing
- controller
+ controller. Default: true.
i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
controllers
i8042.notimeout [HW] Ignore timeout condition signalled by controller
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index 40b7d6c..75409ab 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -201,282 +201,17 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = {
};

/*
- * Some Fujitsu notebooks are having trouble with touchpads if
- * active multiplexing mode is activated. Luckily they don't have
- * external PS/2 ports so we can safely disable it.
- * ... apparently some Toshibas don't like MUX mode either and
- * die horrible death on reboot.
+ * Some laptops do increment active multiplexing mode correctly;
+ * unfortunately they are in minority.
*/
-static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = {
- {
- /* Fujitsu Lifebook P7010/P7010D */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
- DMI_MATCH(DMI_PRODUCT_NAME, "P7010"),
- },
- },
- {
- /* Fujitsu Lifebook P7010 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
- DMI_MATCH(DMI_PRODUCT_NAME, "0000000000"),
- },
- },
- {
- /* Fujitsu Lifebook P5020D */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
- DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook P Series"),
- },
- },
- {
- /* Fujitsu Lifebook S2000 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
- DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S Series"),
- },
- },
- {
- /* Fujitsu Lifebook S6230 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
- DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S6230"),
- },
- },
- {
- /* Fujitsu T70H */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
- DMI_MATCH(DMI_PRODUCT_NAME, "FMVLT70H"),
- },
- },
- {
- /* Fujitsu-Siemens Lifebook T3010 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
- DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK T3010"),
- },
- },
- {
- /* Fujitsu-Siemens Lifebook E4010 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
- DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E4010"),
- },
- },
- {
- /* Fujitsu-Siemens Amilo Pro 2010 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
- DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pro V2010"),
- },
- },
- {
- /* Fujitsu-Siemens Amilo Pro 2030 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
- DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
- },
- },
- {
- /*
- * No data is coming from the touchscreen unless KBC
- * is in legacy mode.
- */
- /* Panasonic CF-29 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Matsushita"),
- DMI_MATCH(DMI_PRODUCT_NAME, "CF-29"),
- },
- },
- {
- /*
- * HP Pavilion DV4017EA -
- * errors on MUX ports are reported without raising AUXDATA
- * causing "spurious NAK" messages.
- */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EA032EA#ABF)"),
- },
- },
- {
- /*
- * HP Pavilion ZT1000 -
- * like DV4017EA does not raise AUXERR for errors on MUX ports.
- */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
- DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion Notebook PC"),
- DMI_MATCH(DMI_PRODUCT_VERSION, "HP Pavilion Notebook ZT1000"),
- },
- },
- {
- /*
- * HP Pavilion DV4270ca -
- * like DV4017EA does not raise AUXERR for errors on MUX ports.
- */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EH476UA#ABL)"),
- },
- },
- {
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P10"),
- },
- },
- {
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
- DMI_MATCH(DMI_PRODUCT_NAME, "EQUIUM A110"),
- },
- },
- {
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
- DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE C850D"),
- },
- },
- {
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "ALIENWARE"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Sentia"),
- },
- },
- {
- /* Sharp Actius MM20 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "SHARP"),
- DMI_MATCH(DMI_PRODUCT_NAME, "PC-MM20 Series"),
- },
- },
- {
- /* Sony Vaio FS-115b */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
- DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FS115B"),
- },
- },
+static const struct dmi_system_id __initconst i8042_dmi_mux_table[] = {
{
/*
- * Sony Vaio FZ-240E -
- * reset and GET ID commands issued via KBD port are
- * sometimes being delivered to AUX3.
+ * Panasonic CF-18 needs to be in MUX mode since the
+ * touchscreen is on serio3 and it also has touchpad.
*/
.matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
- DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ240E"),
- },
- },
- {
- /*
- * Most (all?) VAIOs do not have external PS/2 ports nor
- * they implement active multiplexing properly, and
- * MUX discovery usually messes up keyboard/touchpad.
- */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
- DMI_MATCH(DMI_BOARD_NAME, "VAIO"),
- },
- },
- {
- /* Amoi M636/A737 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Amoi Electronics CO.,LTD."),
- DMI_MATCH(DMI_PRODUCT_NAME, "M636/A737 platform"),
- },
- },
- {
- /* Lenovo 3000 n100 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "076804U"),
- },
- },
- {
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1360"),
- },
- },
- {
- /* Acer Aspire 5710 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5710"),
- },
- },
- {
- /* Gericom Bellagio */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Gericom"),
- DMI_MATCH(DMI_PRODUCT_NAME, "N34AS6"),
- },
- },
- {
- /* IBM 2656 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "IBM"),
- DMI_MATCH(DMI_PRODUCT_NAME, "2656"),
- },
- },
- {
- /* Dell XPS M1530 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "XPS M1530"),
- },
- },
- {
- /* Compal HEL80I */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "COMPAL"),
- DMI_MATCH(DMI_PRODUCT_NAME, "HEL80I"),
- },
- },
- {
- /* Dell Vostro 1510 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Vostro1510"),
- },
- },
- {
- /* Acer Aspire 5536 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
- DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5536"),
- DMI_MATCH(DMI_PRODUCT_VERSION, "0100"),
- },
- },
- {
- /* Dell Vostro V13 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
- DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V13"),
- },
- },
- {
- /* Newer HP Pavilion dv4 models */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
- DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv4 Notebook PC"),
- },
- },
- {
- /* Asus X450LCP */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
- DMI_MATCH(DMI_PRODUCT_NAME, "X450LCP"),
- },
- },
- {
- /* Avatar AVIU-145A6 */
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "Intel"),
- DMI_MATCH(DMI_PRODUCT_NAME, "IC4I"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "CF-18"),
},
},
{ }
@@ -999,8 +734,8 @@ static int __init i8042_platform_init(void)
if (dmi_check_system(i8042_dmi_noloop_table))
i8042_noloop = true;

- if (dmi_check_system(i8042_dmi_nomux_table))
- i8042_nomux = true;
+ if (dmi_check_system(i8042_dmi_mux_table))
+ i8042_nomux = false;

if (dmi_check_system(i8042_dmi_notimeout_table))
i8042_notimeout = true;
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index f5a98af..9a97c2b 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -39,7 +39,7 @@ static bool i8042_noaux;
module_param_named(noaux, i8042_noaux, bool, 0);
MODULE_PARM_DESC(noaux, "Do not probe or use AUX (mouse) port.");

-static bool i8042_nomux;
+static bool i8042_nomux = true;
module_param_named(nomux, i8042_nomux, bool, 0);
MODULE_PARM_DESC(nomux, "Do not check whether an active multiplexing controller is present.");

--
2.1.0.rc2.206.gedb03e5


--
Dmitry


2014-10-10 20:59:24

by Jiri Kosina

[permalink] [raw]
Subject: Re: [PATCH] Input: i8042 - disable active multiplexing by default

On Fri, 10 Oct 2014, Dmitry Torokhov wrote:

> Active multiplexing is a nice feature as it allows several pointing devices
> (such as touchpad and external mouse) use their native protocols at the
> same time. Unfortunately many manufacturers do not implement the feature
> properly even though they advertise it. The problematic implementations are
> never fixed, since Windows by default does not use this mode, and move from
> one BIOS/model of laptop to another. When active multiplexing is broken
> turning it on usually results in touchpad, keyboard, or both unresponsive.
>
> With PS/2 usage on decline (most of PS/2 devices in use nowadays are
> internal laptop touchpads), I expect number of users who have laptops with
> working MUX implementation, docking stations with external PS/2 ports, and
> who are still using external PS/2 mice, to be rather small. Let's flip the
> default to be OFF and allow activating it through i8042.nomux=0 kernel
> option. We'll also keep DMI table where we can record known good models.

Being responsible for introducing a non-trivial portion of
i8042_dmi_nomux_table[] entries:

Acked-by: Jiri Kosina <[email protected]>

If nothing else, it'd make my life easier :)

[ ... snip ... ]
> diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
> index f5a98af..9a97c2b 100644
> --- a/drivers/input/serio/i8042.c
> +++ b/drivers/input/serio/i8042.c
> @@ -39,7 +39,7 @@ static bool i8042_noaux;
> module_param_named(noaux, i8042_noaux, bool, 0);
> MODULE_PARM_DESC(noaux, "Do not probe or use AUX (mouse) port.");
>
> -static bool i8042_nomux;
> +static bool i8042_nomux = true;

Hmmm ... perhaps if we want to be really friendly, we should warn (and I
definitely don't mean WARN(), but rather pr_info() or something) if we
encounter that the cmdline contains 'i8042.nomux=1'.

Thanks,

--
Jiri Kosina
SUSE Labs

2014-10-10 21:02:38

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH] Input: i8042 - disable active multiplexing by default

On Fri, Oct 10, 2014 at 10:59:19PM +0200, Jiri Kosina wrote:
> On Fri, 10 Oct 2014, Dmitry Torokhov wrote:
>
> > Active multiplexing is a nice feature as it allows several pointing devices
> > (such as touchpad and external mouse) use their native protocols at the
> > same time. Unfortunately many manufacturers do not implement the feature
> > properly even though they advertise it. The problematic implementations are
> > never fixed, since Windows by default does not use this mode, and move from
> > one BIOS/model of laptop to another. When active multiplexing is broken
> > turning it on usually results in touchpad, keyboard, or both unresponsive.
> >
> > With PS/2 usage on decline (most of PS/2 devices in use nowadays are
> > internal laptop touchpads), I expect number of users who have laptops with
> > working MUX implementation, docking stations with external PS/2 ports, and
> > who are still using external PS/2 mice, to be rather small. Let's flip the
> > default to be OFF and allow activating it through i8042.nomux=0 kernel
> > option. We'll also keep DMI table where we can record known good models.
>
> Being responsible for introducing a non-trivial portion of
> i8042_dmi_nomux_table[] entries:
>
> Acked-by: Jiri Kosina <[email protected]>
>
> If nothing else, it'd make my life easier :)
>
> [ ... snip ... ]
> > diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
> > index f5a98af..9a97c2b 100644
> > --- a/drivers/input/serio/i8042.c
> > +++ b/drivers/input/serio/i8042.c
> > @@ -39,7 +39,7 @@ static bool i8042_noaux;
> > module_param_named(noaux, i8042_noaux, bool, 0);
> > MODULE_PARM_DESC(noaux, "Do not probe or use AUX (mouse) port.");
> >
> > -static bool i8042_nomux;
> > +static bool i8042_nomux = true;
>
> Hmmm ... perhaps if we want to be really friendly, we should warn (and I
> definitely don't mean WARN(), but rather pr_info() or something) if we
> encounter that the cmdline contains 'i8042.nomux=1'.

Warn about what? That they do not need this option anymore? They might
if they downgrade the kernel. I would not bother...

Thanks.

--
Dmitry

2014-10-10 21:18:45

by Dave Jones

[permalink] [raw]
Subject: Re: [PATCH] Input: i8042 - disable active multiplexing by default

On Fri, Oct 10, 2014 at 01:51:31PM -0700, Dmitry Torokhov wrote:

> /*
> - * Some Fujitsu notebooks are having trouble with touchpads if
> - * active multiplexing mode is activated. Luckily they don't have
> - * external PS/2 ports so we can safely disable it.
> - * ... apparently some Toshibas don't like MUX mode either and
> - * die horrible death on reboot.
> + * Some laptops do increment active multiplexing mode correctly;
> + * unfortunately they are in minority.
> */

s/increment/implement/ ?

Dave

2014-10-10 21:22:53

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH] Input: i8042 - disable active multiplexing by default

On Fri, Oct 10, 2014 at 05:18:27PM -0400, Dave Jones wrote:
> On Fri, Oct 10, 2014 at 01:51:31PM -0700, Dmitry Torokhov wrote:
>
> > /*
> > - * Some Fujitsu notebooks are having trouble with touchpads if
> > - * active multiplexing mode is activated. Luckily they don't have
> > - * external PS/2 ports so we can safely disable it.
> > - * ... apparently some Toshibas don't like MUX mode either and
> > - * die horrible death on reboot.
> > + * Some laptops do increment active multiplexing mode correctly;
> > + * unfortunately they are in minority.
> > */
>
> s/increment/implement/ ?

Thanks Dave, I'll fix it up.

--
Dmitry

2014-10-11 09:12:16

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH] Input: i8042 - disable active multiplexing by default

Hi,

On 10/10/2014 11:22 PM, Dmitry Torokhov wrote:
> On Fri, Oct 10, 2014 at 05:18:27PM -0400, Dave Jones wrote:
>> On Fri, Oct 10, 2014 at 01:51:31PM -0700, Dmitry Torokhov wrote:
>>
>> > /*
>> > - * Some Fujitsu notebooks are having trouble with touchpads if
>> > - * active multiplexing mode is activated. Luckily they don't have
>> > - * external PS/2 ports so we can safely disable it.
>> > - * ... apparently some Toshibas don't like MUX mode either and
>> > - * die horrible death on reboot.
>> > + * Some laptops do increment active multiplexing mode correctly;
>> > + * unfortunately they are in minority.
>> > */
>>
>> s/increment/implement/ ?
>
> Thanks Dave, I'll fix it up.

The patch looks good to me, and with the above fixup is:

Acked-by: Hans de Goede <[email protected]>

Regards,

Hans

2014-10-12 14:30:48

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH] Input: i8042 - disable active multiplexing by default

On Fri 2014-10-10 13:51:31, Dmitry Torokhov wrote:
> Active multiplexing is a nice feature as it allows several pointing devices
> (such as touchpad and external mouse) use their native protocols at the
> same time. Unfortunately many manufacturers do not implement the feature
> properly even though they advertise it. The problematic implementations are
> never fixed, since Windows by default does not use this mode, and move from
> one BIOS/model of laptop to another. When active multiplexing is broken
> turning it on usually results in touchpad, keyboard, or both unresponsive.
>
> With PS/2 usage on decline (most of PS/2 devices in use nowadays are
> internal laptop touchpads), I expect number of users who have laptops with
> working MUX implementation, docking stations with external PS/2 ports, and
> who are still using external PS/2 mice, to be rather small. Let's flip the
> default to be OFF and allow activating it through i8042.nomux=0 kernel
> option. We'll also keep DMI table where we can record known good models.
>
> Signed-off-by: Dmitry Torokhov <[email protected]>

Could we keep the old default / blacklist for the old laptops? We did
something like that for ACPI, based on year of the bios.

Old laptops are not being made any more, so blacklist will not grow
too fast...

Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

2014-10-13 16:43:45

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH] Input: i8042 - disable active multiplexing by default

Hi Pavel,

On Sun, Oct 12, 2014 at 04:30:39PM +0200, Pavel Machek wrote:
> On Fri 2014-10-10 13:51:31, Dmitry Torokhov wrote:
> > Active multiplexing is a nice feature as it allows several pointing devices
> > (such as touchpad and external mouse) use their native protocols at the
> > same time. Unfortunately many manufacturers do not implement the feature
> > properly even though they advertise it. The problematic implementations are
> > never fixed, since Windows by default does not use this mode, and move from
> > one BIOS/model of laptop to another. When active multiplexing is broken
> > turning it on usually results in touchpad, keyboard, or both unresponsive.
> >
> > With PS/2 usage on decline (most of PS/2 devices in use nowadays are
> > internal laptop touchpads), I expect number of users who have laptops with
> > working MUX implementation, docking stations with external PS/2 ports, and
> > who are still using external PS/2 mice, to be rather small. Let's flip the
> > default to be OFF and allow activating it through i8042.nomux=0 kernel
> > option. We'll also keep DMI table where we can record known good models.
> >
> > Signed-off-by: Dmitry Torokhov <[email protected]>
>
> Could we keep the old default / blacklist for the old laptops? We did
> something like that for ACPI, based on year of the bios.
>

I would prefer not to. Unlike ACPI we do not see any improvement or
decline in quality of MUX implementation over time. The implementations
were buggy 10 years ago, 5 years go and they are buggy now. So there is
not a point in time to draw a line at.

> Old laptops are not being made any more, so blacklist will not grow
> too fast...

It is already quite big and I do not believe we've gotten nearly all of
them. I guess in many cases people would try Linux, find that
keyboard/mouse do not work at all and they are done and not bother
filing bugs/reaching out on LKML, etc.

Again, the only people would might be negatively affected are people who
have proper implementation of active MUX, who use both touchpad and
external mouse at the same time and want touchpad in native mode, and who
use PS/2 external mice.

Thanks.

--
Dmitry