$ libinput quirks list /dev/input/event19
$ libinput quirks list /dev/input/event0
- AttrLidSwitchReliability=reliable
+ AttrLidSwitchReliability=unreliable
The device `event19` does not have any quirks assigned.
trigger a release (M), when a palm touch is triggered (O) and when a
thumb touch is triggered (P). O > P > N > M. See
:ref:`touchpad_pressure_hwdb` for more details.
-AttrLidSwitchReliability=reliable|write_open
- Indicates the reliability of the lid switch. This is a string enum. Do not
- use "reliable" for any specific device. Very few devices need this, if in
- doubt do not set. See :ref:`switches_lid` for details.
+AttrLidSwitchReliability=reliable|unreliable|write_open
+ Indicates the reliability of the lid switch. This is a string enum.
+ Very few devices need this, if in doubt do not set. See :ref:`switches_lid`
+ for details. libinput 1.21.0 changed the default from unreliable to
+ reliable, which may be removed from local overrides.
AttrKeyboardIntegration=internal|external
Indicates the integration of the keyboard. This is a string enum.
Generally only needed for USB keyboards.
The ``libinput quirks`` tool can show quirks applied for any given device. ::
$ libinput quirks list /dev/input/event0
- AttrLidSwitchReliability=reliable
+ AttrLidSwitchReliability=unreliable
If the tool's output is empty, no quirk is applied. See :ref:`device-quirks`
for more information.
+++ /dev/null
-# Do not edit this file, it will be overwritten on update
-
-[Lid Switch Ct9]
-MatchName=*Lid Switch*
-MatchDMIModalias=dmi:*:ct9:*
-AttrLidSwitchReliability=reliable
-
-[Lid Switch Ct10]
-MatchName=*Lid Switch*
-MatchDMIModalias=dmi:*:ct10:*
-AttrLidSwitchReliability=reliable
quirks = evdev_libinput_context(device)->quirks;
q = quirks_fetch_for_device(quirks, device->udev_device);
if (!q || !quirks_get_string(q, QUIRK_ATTR_LID_SWITCH_RELIABILITY, &prop)) {
- r = RELIABILITY_UNKNOWN;
+ r = RELIABILITY_RELIABLE;
} else if (!parse_switch_reliability_property(prop, &r)) {
evdev_log_error(device,
"%s: switch reliability set to unknown value '%s'\n",
device->devname,
prop);
- r = RELIABILITY_UNKNOWN;
+ r = RELIABILITY_RELIABLE;
} else if (r == RELIABILITY_WRITE_OPEN) {
evdev_log_info(device, "will write switch open events\n");
}
} else if (streq(key, quirk_get_name(QUIRK_ATTR_LID_SWITCH_RELIABILITY))) {
p->id = QUIRK_ATTR_LID_SWITCH_RELIABILITY;
if (!streq(value, "reliable") &&
- !streq(value, "write_open"))
+ !streq(value, "write_open") &&
+ !streq(value, "unreliable"))
goto out;
p->type = PT_STRING;
p->value.s = safe_strdup(value);
enum switch_reliability *reliability)
{
if (!prop) {
- *reliability = RELIABILITY_UNKNOWN;
+ *reliability = RELIABILITY_RELIABLE;
return true;
}
if (streq(prop, "reliable"))
*reliability = RELIABILITY_RELIABLE;
+ else if (streq(prop, "unreliable"))
+ *reliability = RELIABILITY_UNRELIABLE;
else if (streq(prop, "write_open"))
*reliability = RELIABILITY_WRITE_OPEN;
else
enum tpkbcombo_layout *layout);
enum switch_reliability {
- RELIABILITY_UNKNOWN,
RELIABILITY_RELIABLE,
+ RELIABILITY_UNRELIABLE,
RELIABILITY_WRITE_OPEN,
};
enum switch_reliability reliability;
} tests[] = {
{ "reliable", true, RELIABILITY_RELIABLE },
- { "unreliable", false, 0 },
+ { "unreliable", true, RELIABILITY_UNRELIABLE },
+ { "write_open", true, RELIABILITY_WRITE_OPEN },
{ "", false, 0 },
{ "0", false, 0 },
{ "1", false, 0 },
success = parse_switch_reliability_property(NULL, &r);
ck_assert(success == true);
- ck_assert_int_eq(r, RELIABILITY_UNKNOWN);
+ ck_assert_int_eq(r, RELIABILITY_RELIABLE);
success = parse_switch_reliability_property("foo", NULL);
ck_assert(success == false);