* [Bug Report] intel/vbtn: Dell Inspiron 7352 has unreliable tablet-mode switch
@ 2023-10-18 0:53 Arnold Gozum
2023-10-18 2:05 ` AceLan Kao
0 siblings, 1 reply; 7+ messages in thread
From: Arnold Gozum @ 2023-10-18 0:53 UTC (permalink / raw)
Cc: platform-driver-x86, acelan.kao
Hi,
In Linux 5.11, Dell Inspiron 7352 was added to the
dmi_switches_allow_list as it is a 2-in-1 which reports a chassis type
10 (actually it was me who submitted the patch).
However, the tablet mode switch can be unreliable. Randomly, switch
events stop being reported and SW_TABLET_MODE will by stuck at 1 or 0,
which I have tested by running evtest while flipping the device to and
from tablet mode. This is fixed after a reboot, or a suspend followed by
unloading and reloading the intel-vbtn module. It can also sometimes be
the case that upon resume, SW_TABLET_MODE does not reflect the actual
state of the device, which is fixed by physically flipping the screen
back and forth to update the state.
Because of these issues, I think this model should be removed from the
allow list, unless more investigation should be done.
Thanks,
Arnold
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bug Report] intel/vbtn: Dell Inspiron 7352 has unreliable tablet-mode switch
2023-10-18 0:53 [Bug Report] intel/vbtn: Dell Inspiron 7352 has unreliable tablet-mode switch Arnold Gozum
@ 2023-10-18 2:05 ` AceLan Kao
2023-10-29 19:52 ` Arnold Gozum
0 siblings, 1 reply; 7+ messages in thread
From: AceLan Kao @ 2023-10-18 2:05 UTC (permalink / raw)
To: Arnold Gozum; +Cc: platform-driver-x86
Arnold Gozum <arngozum@gmail.com> 於 2023年10月18日 週三 上午8:53寫道:
>
> Hi,
>
> In Linux 5.11, Dell Inspiron 7352 was added to the
> dmi_switches_allow_list as it is a 2-in-1 which reports a chassis type
> 10 (actually it was me who submitted the patch).
>
> However, the tablet mode switch can be unreliable. Randomly, switch
> events stop being reported and SW_TABLET_MODE will by stuck at 1 or 0,
> which I have tested by running evtest while flipping the device to and
> from tablet mode. This is fixed after a reboot, or a suspend followed by
> unloading and reloading the intel-vbtn module. It can also sometimes be
> the case that upon resume, SW_TABLET_MODE does not reflect the actual
> state of the device, which is fixed by physically flipping the screen
> back and forth to update the state.
>
> Because of these issues, I think this model should be removed from the
> allow list, unless more investigation should be done.
Hi Arnold,
It's been a long time since you submitted the patch. Did those issues
not occur during that time?
Have you tried updating the BIOS to see if it helps?
From your description, I think calling VBDL might reset the status.
You might want to try it below.
diff --git a/drivers/platform/x86/intel/vbtn.c
b/drivers/platform/x86/intel/vbtn.c
index 6fa1735ad7a49..681650f52ff22 100644
--- a/drivers/platform/x86/intel/vbtn.c
+++ b/drivers/platform/x86/intel/vbtn.c
@@ -198,6 +198,8 @@ static void notify_handler(acpi_handle handle, u32
event, void *context)
autorelease = val && (!ke_rel || ke_rel->type == KE_IGNORE);
sparse_keymap_report_event(input_dev, event, val, autorelease);
+
+ acpi_evaluate_object(handle, "VBDL", NULL, NULL);
}
/*
>
> Thanks,
> Arnold
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Bug Report] intel/vbtn: Dell Inspiron 7352 has unreliable tablet-mode switch
2023-10-18 2:05 ` AceLan Kao
@ 2023-10-29 19:52 ` Arnold Gozum
2023-11-20 14:18 ` Hans de Goede
0 siblings, 1 reply; 7+ messages in thread
From: Arnold Gozum @ 2023-10-29 19:52 UTC (permalink / raw)
To: AceLan Kao; +Cc: platform-driver-x86
Hi, sorry for the delayed reply. Your patch doesn't seem to work, I
still have the issue where the switch is in the wrong state after
suspend/resume.
And yes, it's been a while, and I believe the issues did exist during
that time however it was easy to ignore/forget since I'm on X11 where
libinput doesn't respond to tablet mode switches, so I neglected to
report the issue for a while. Also, about the BIOS, I'm a little
hesistant to update it since I don't have a battery. I have version A11
and the newest is A15, but Dell's update notes only mention security
fixes, so maybe it doesn't matter.
On 2023-10-17 22:05, AceLan Kao wrote:
> Arnold Gozum <arngozum@gmail.com> 於 2023年10月18日 週三 上午8:53寫道:
>>
>> Hi,
>>
>> In Linux 5.11, Dell Inspiron 7352 was added to the
>> dmi_switches_allow_list as it is a 2-in-1 which reports a chassis type
>> 10 (actually it was me who submitted the patch).
>>
>> However, the tablet mode switch can be unreliable. Randomly, switch
>> events stop being reported and SW_TABLET_MODE will by stuck at 1 or 0,
>> which I have tested by running evtest while flipping the device to and
>> from tablet mode. This is fixed after a reboot, or a suspend followed by
>> unloading and reloading the intel-vbtn module. It can also sometimes be
>> the case that upon resume, SW_TABLET_MODE does not reflect the actual
>> state of the device, which is fixed by physically flipping the screen
>> back and forth to update the state.
>>
>> Because of these issues, I think this model should be removed from the
>> allow list, unless more investigation should be done.
> Hi Arnold,
>
> It's been a long time since you submitted the patch. Did those issues
> not occur during that time?
> Have you tried updating the BIOS to see if it helps?
>
> From your description, I think calling VBDL might reset the status.
> You might want to try it below.
>
> diff --git a/drivers/platform/x86/intel/vbtn.c
> b/drivers/platform/x86/intel/vbtn.c
> index 6fa1735ad7a49..681650f52ff22 100644
> --- a/drivers/platform/x86/intel/vbtn.c
> +++ b/drivers/platform/x86/intel/vbtn.c
> @@ -198,6 +198,8 @@ static void notify_handler(acpi_handle handle, u32
> event, void *context)
> autorelease = val && (!ke_rel || ke_rel->type == KE_IGNORE);
>
> sparse_keymap_report_event(input_dev, event, val, autorelease);
> +
> + acpi_evaluate_object(handle, "VBDL", NULL, NULL);
> }
>
> /*
>
>>
>> Thanks,
>> Arnold
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bug Report] intel/vbtn: Dell Inspiron 7352 has unreliable tablet-mode switch
2023-10-29 19:52 ` Arnold Gozum
@ 2023-11-20 14:18 ` Hans de Goede
2023-12-03 15:41 ` Hans de Goede
0 siblings, 1 reply; 7+ messages in thread
From: Hans de Goede @ 2023-11-20 14:18 UTC (permalink / raw)
To: Arnold Gozum, AceLan Kao; +Cc: platform-driver-x86
[-- Attachment #1: Type: text/plain, Size: 3638 bytes --]
Hi Arnold,
Thank you for reporting this.
Unfortunately removing the Dell Inspiron 7352 from
the dmi_switches_allow_list will not help.
The intel-vbtn driver now a days also creates an input-device
with a tablet-switch upon receiving the first tablet-switch
related event, to avoid needing to maintain an ever growing
list of devices on the allow-list.
And since the Dell Inspiron 7352 does have a somewhat working
tablet-mode-switch it does send such events. So removing it
from the allow-list will only result in the creation of
an input-device for the tablet-mode-switch being delayed till
the first event.
Now we could add a dmi_switches_deny_list for this purpose,
but first lets see if we can fix things.
On 10/29/23 20:52, Arnold Gozum wrote:
> Hi, sorry for the delayed reply. Your patch doesn't seem to work, I
> still have the issue where the switch is in the wrong state after
> suspend/resume.
Ok, so this does sound like the issue where the switch completely
stops reporting state-changes is fixed with the addition of
the extra "VBDL" call ?
I think that the wrong mode after suspend/resume is just a matter
of manually checking the mode after a suspend/resume.
Can you give the attached patch a try and see if that fixes things ?
Regards,
Hans
> And yes, it's been a while, and I believe the issues did exist during
> that time however it was easy to ignore/forget since I'm on X11 where
> libinput doesn't respond to tablet mode switches, so I neglected to
> report the issue for a while. Also, about the BIOS, I'm a little
> hesistant to update it since I don't have a battery. I have version A11
> and the newest is A15, but Dell's update notes only mention security
> fixes, so maybe it doesn't matter.
>
> On 2023-10-17 22:05, AceLan Kao wrote:
>> Arnold Gozum <arngozum@gmail.com> 於 2023年10月18日 週三 上午8:53寫道:
>>>
>>> Hi,
>>>
>>> In Linux 5.11, Dell Inspiron 7352 was added to the
>>> dmi_switches_allow_list as it is a 2-in-1 which reports a chassis type
>>> 10 (actually it was me who submitted the patch).
>>>
>>> However, the tablet mode switch can be unreliable. Randomly, switch
>>> events stop being reported and SW_TABLET_MODE will by stuck at 1 or 0,
>>> which I have tested by running evtest while flipping the device to and
>>> from tablet mode. This is fixed after a reboot, or a suspend followed by
>>> unloading and reloading the intel-vbtn module. It can also sometimes be
>>> the case that upon resume, SW_TABLET_MODE does not reflect the actual
>>> state of the device, which is fixed by physically flipping the screen
>>> back and forth to update the state.
>>>
>>> Because of these issues, I think this model should be removed from the
>>> allow list, unless more investigation should be done.
>> Hi Arnold,
>>
>> It's been a long time since you submitted the patch. Did those issues
>> not occur during that time?
>> Have you tried updating the BIOS to see if it helps?
>>
>> From your description, I think calling VBDL might reset the status.
>> You might want to try it below.
>>
>> diff --git a/drivers/platform/x86/intel/vbtn.c
>> b/drivers/platform/x86/intel/vbtn.c
>> index 6fa1735ad7a49..681650f52ff22 100644
>> --- a/drivers/platform/x86/intel/vbtn.c
>> +++ b/drivers/platform/x86/intel/vbtn.c
>> @@ -198,6 +198,8 @@ static void notify_handler(acpi_handle handle, u32
>> event, void *context)
>> autorelease = val && (!ke_rel || ke_rel->type == KE_IGNORE);
>>
>> sparse_keymap_report_event(input_dev, event, val, autorelease);
>> +
>> + acpi_evaluate_object(handle, "VBDL", NULL, NULL);
>> }
>>
>> /*
>>
>>>
>>> Thanks,
>>> Arnold
>
[-- Attachment #2: 0001-platform-x86-intel-vbtn-Fix-missing-tablet-mode-swit.patch --]
[-- Type: text/x-patch, Size: 2764 bytes --]
From d3f88dc009af6b15d8130b917ed73f2aadbf66d6 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 20 Nov 2023 14:59:06 +0100
Subject: [PATCH] platform/x86: intel-vbtn: Fix missing tablet-mode-switch
events
2 issues have been reported on the Dell Inspiron 7352:
1. Sometimes the tablet-mode-switch stops reporting tablet-mode
change events.
Add a "VBDL" call to notify_handler() to work around this.
2. Sometimes the tablet-mode is incorrect after suspend/resume
Add a detect_tablet_mode() to resume() to fix this.
Reported-by: Arnold Gozum <arngozum@gmail.com>
Closes: https://lore.kernel.org/platform-driver-x86/87271a74-c831-4eec-b7a4-1371d0e42471@gmail.com/
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/platform/x86/intel/vbtn.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/intel/vbtn.c b/drivers/platform/x86/intel/vbtn.c
index 6fa1735ad7a4..210b0a81b7ec 100644
--- a/drivers/platform/x86/intel/vbtn.c
+++ b/drivers/platform/x86/intel/vbtn.c
@@ -73,10 +73,10 @@ struct intel_vbtn_priv {
bool wakeup_mode;
};
-static void detect_tablet_mode(struct platform_device *device)
+static void detect_tablet_mode(struct device *dev)
{
- struct intel_vbtn_priv *priv = dev_get_drvdata(&device->dev);
- acpi_handle handle = ACPI_HANDLE(&device->dev);
+ struct intel_vbtn_priv *priv = dev_get_drvdata(dev);
+ acpi_handle handle = ACPI_HANDLE(dev);
unsigned long long vgbs;
acpi_status status;
int m;
@@ -89,6 +89,8 @@ static void detect_tablet_mode(struct platform_device *device)
input_report_switch(priv->switches_dev, SW_TABLET_MODE, m);
m = (vgbs & VGBS_DOCK_MODE_FLAG) ? 1 : 0;
input_report_switch(priv->switches_dev, SW_DOCK, m);
+
+ input_sync(priv->switches_dev);
}
/*
@@ -134,7 +136,7 @@ static int intel_vbtn_input_setup(struct platform_device *device)
priv->switches_dev->id.bustype = BUS_HOST;
if (priv->has_switches) {
- detect_tablet_mode(device);
+ detect_tablet_mode(&device->dev);
ret = input_register_device(priv->switches_dev);
if (ret)
@@ -198,6 +200,9 @@ static void notify_handler(acpi_handle handle, u32 event, void *context)
autorelease = val && (!ke_rel || ke_rel->type == KE_IGNORE);
sparse_keymap_report_event(input_dev, event, val, autorelease);
+
+ /* Some devices need this to report further events */
+ acpi_evaluate_object(handle, "VBDL", NULL, NULL);
}
/*
@@ -352,7 +357,13 @@ static void intel_vbtn_pm_complete(struct device *dev)
static int intel_vbtn_pm_resume(struct device *dev)
{
+ struct intel_vbtn_priv *priv = dev_get_drvdata(dev);
+
intel_vbtn_pm_complete(dev);
+
+ if (priv->has_switches)
+ detect_tablet_mode(dev);
+
return 0;
}
--
2.41.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Bug Report] intel/vbtn: Dell Inspiron 7352 has unreliable tablet-mode switch
2023-11-20 14:18 ` Hans de Goede
@ 2023-12-03 15:41 ` Hans de Goede
2023-12-04 2:43 ` Arnold Gozum
0 siblings, 1 reply; 7+ messages in thread
From: Hans de Goede @ 2023-12-03 15:41 UTC (permalink / raw)
To: Arnold Gozum, AceLan Kao; +Cc: platform-driver-x86
Hi Arnold,
I was wondering what the status of this is.
Did you manage to find some time to test the patch
which I attached to my previous results ?
And if yes, what were the results?
Regards,
Hans
On 11/20/23 15:18, Hans de Goede wrote:
> Hi Arnold,
>
> Thank you for reporting this.
>
> Unfortunately removing the Dell Inspiron 7352 from
> the dmi_switches_allow_list will not help.
>
> The intel-vbtn driver now a days also creates an input-device
> with a tablet-switch upon receiving the first tablet-switch
> related event, to avoid needing to maintain an ever growing
> list of devices on the allow-list.
>
> And since the Dell Inspiron 7352 does have a somewhat working
> tablet-mode-switch it does send such events. So removing it
> from the allow-list will only result in the creation of
> an input-device for the tablet-mode-switch being delayed till
> the first event.
>
> Now we could add a dmi_switches_deny_list for this purpose,
> but first lets see if we can fix things.
>
> On 10/29/23 20:52, Arnold Gozum wrote:
>> Hi, sorry for the delayed reply. Your patch doesn't seem to work, I
>> still have the issue where the switch is in the wrong state after
>> suspend/resume.
>
> Ok, so this does sound like the issue where the switch completely
> stops reporting state-changes is fixed with the addition of
> the extra "VBDL" call ?
>
> I think that the wrong mode after suspend/resume is just a matter
> of manually checking the mode after a suspend/resume.
>
> Can you give the attached patch a try and see if that fixes things ?
>
> Regards,
>
> Hans
>
>
>
>
>> And yes, it's been a while, and I believe the issues did exist during
>> that time however it was easy to ignore/forget since I'm on X11 where
>> libinput doesn't respond to tablet mode switches, so I neglected to
>> report the issue for a while. Also, about the BIOS, I'm a little
>> hesistant to update it since I don't have a battery. I have version A11
>> and the newest is A15, but Dell's update notes only mention security
>> fixes, so maybe it doesn't matter.
>>
>> On 2023-10-17 22:05, AceLan Kao wrote:
>>> Arnold Gozum <arngozum@gmail.com> 於 2023年10月18日 週三 上午8:53寫道:
>>>>
>>>> Hi,
>>>>
>>>> In Linux 5.11, Dell Inspiron 7352 was added to the
>>>> dmi_switches_allow_list as it is a 2-in-1 which reports a chassis type
>>>> 10 (actually it was me who submitted the patch).
>>>>
>>>> However, the tablet mode switch can be unreliable. Randomly, switch
>>>> events stop being reported and SW_TABLET_MODE will by stuck at 1 or 0,
>>>> which I have tested by running evtest while flipping the device to and
>>>> from tablet mode. This is fixed after a reboot, or a suspend followed by
>>>> unloading and reloading the intel-vbtn module. It can also sometimes be
>>>> the case that upon resume, SW_TABLET_MODE does not reflect the actual
>>>> state of the device, which is fixed by physically flipping the screen
>>>> back and forth to update the state.
>>>>
>>>> Because of these issues, I think this model should be removed from the
>>>> allow list, unless more investigation should be done.
>>> Hi Arnold,
>>>
>>> It's been a long time since you submitted the patch. Did those issues
>>> not occur during that time?
>>> Have you tried updating the BIOS to see if it helps?
>>>
>>> From your description, I think calling VBDL might reset the status.
>>> You might want to try it below.
>>>
>>> diff --git a/drivers/platform/x86/intel/vbtn.c
>>> b/drivers/platform/x86/intel/vbtn.c
>>> index 6fa1735ad7a49..681650f52ff22 100644
>>> --- a/drivers/platform/x86/intel/vbtn.c
>>> +++ b/drivers/platform/x86/intel/vbtn.c
>>> @@ -198,6 +198,8 @@ static void notify_handler(acpi_handle handle, u32
>>> event, void *context)
>>> autorelease = val && (!ke_rel || ke_rel->type == KE_IGNORE);
>>>
>>> sparse_keymap_report_event(input_dev, event, val, autorelease);
>>> +
>>> + acpi_evaluate_object(handle, "VBDL", NULL, NULL);
>>> }
>>>
>>> /*
>>>
>>>>
>>>> Thanks,
>>>> Arnold
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bug Report] intel/vbtn: Dell Inspiron 7352 has unreliable tablet-mode switch
2023-12-03 15:41 ` Hans de Goede
@ 2023-12-04 2:43 ` Arnold Gozum
2023-12-04 15:07 ` Hans de Goede
0 siblings, 1 reply; 7+ messages in thread
From: Arnold Gozum @ 2023-12-04 2:43 UTC (permalink / raw)
To: Hans de Goede, AceLan Kao; +Cc: platform-driver-x86
Hi Hans,
Thanks for writing this patch, I've just tested it and the wrong state
issue is fixed. The switch is in the correct state after suspending no
matter the state before suspending. I've seen forums posts of people
experiencing the same issue on other models, so I'm sure it will help them
as well.
For the issue where the switch stops responding, it did happen once but
after rebooting I can't get it to happen again. It's hard to know for sure
since it happens randomly, or maybe I didn't have the patched module
actually loaded when it did occur. I'm guessing it probably should have
happened by now, but I can report back if it eventually happens again.
I really appreciate you taking the time to work on this.
Thanks,
Arnold
On 2023-12-03 10:41, Hans de Goede wrote:
> Hi Arnold,
>
> I was wondering what the status of this is.
>
> Did you manage to find some time to test the patch
> which I attached to my previous results ?
>
> And if yes, what were the results?
>
> Regards,
>
> Hans
>
>
> On 11/20/23 15:18, Hans de Goede wrote:
>> Hi Arnold,
>>
>> Thank you for reporting this.
>>
>> Unfortunately removing the Dell Inspiron 7352 from
>> the dmi_switches_allow_list will not help.
>>
>> The intel-vbtn driver now a days also creates an input-device
>> with a tablet-switch upon receiving the first tablet-switch
>> related event, to avoid needing to maintain an ever growing
>> list of devices on the allow-list.
>>
>> And since the Dell Inspiron 7352 does have a somewhat working
>> tablet-mode-switch it does send such events. So removing it
>> from the allow-list will only result in the creation of
>> an input-device for the tablet-mode-switch being delayed till
>> the first event.
>>
>> Now we could add a dmi_switches_deny_list for this purpose,
>> but first lets see if we can fix things.
>>
>> On 10/29/23 20:52, Arnold Gozum wrote:
>>> Hi, sorry for the delayed reply. Your patch doesn't seem to work, I
>>> still have the issue where the switch is in the wrong state after
>>> suspend/resume.
>>
>> Ok, so this does sound like the issue where the switch completely
>> stops reporting state-changes is fixed with the addition of
>> the extra "VBDL" call ?
>>
>> I think that the wrong mode after suspend/resume is just a matter
>> of manually checking the mode after a suspend/resume.
>>
>> Can you give the attached patch a try and see if that fixes things ?
>>
>> Regards,
>>
>> Hans
>>
>>
>>
>>
>>> And yes, it's been a while, and I believe the issues did exist during
>>> that time however it was easy to ignore/forget since I'm on X11 where
>>> libinput doesn't respond to tablet mode switches, so I neglected to
>>> report the issue for a while. Also, about the BIOS, I'm a little
>>> hesistant to update it since I don't have a battery. I have version A11
>>> and the newest is A15, but Dell's update notes only mention security
>>> fixes, so maybe it doesn't matter.
>>>
>>> On 2023-10-17 22:05, AceLan Kao wrote:
>>>> Arnold Gozum <arngozum@gmail.com> 於 2023年10月18日 週三 上午8:53寫道:
>>>>>
>>>>> Hi,
>>>>>
>>>>> In Linux 5.11, Dell Inspiron 7352 was added to the
>>>>> dmi_switches_allow_list as it is a 2-in-1 which reports a chassis type
>>>>> 10 (actually it was me who submitted the patch).
>>>>>
>>>>> However, the tablet mode switch can be unreliable. Randomly, switch
>>>>> events stop being reported and SW_TABLET_MODE will by stuck at 1 or 0,
>>>>> which I have tested by running evtest while flipping the device to and
>>>>> from tablet mode. This is fixed after a reboot, or a suspend followed by
>>>>> unloading and reloading the intel-vbtn module. It can also sometimes be
>>>>> the case that upon resume, SW_TABLET_MODE does not reflect the actual
>>>>> state of the device, which is fixed by physically flipping the screen
>>>>> back and forth to update the state.
>>>>>
>>>>> Because of these issues, I think this model should be removed from the
>>>>> allow list, unless more investigation should be done.
>>>> Hi Arnold,
>>>>
>>>> It's been a long time since you submitted the patch. Did those issues
>>>> not occur during that time?
>>>> Have you tried updating the BIOS to see if it helps?
>>>>
>>>> From your description, I think calling VBDL might reset the status.
>>>> You might want to try it below.
>>>>
>>>> diff --git a/drivers/platform/x86/intel/vbtn.c
>>>> b/drivers/platform/x86/intel/vbtn.c
>>>> index 6fa1735ad7a49..681650f52ff22 100644
>>>> --- a/drivers/platform/x86/intel/vbtn.c
>>>> +++ b/drivers/platform/x86/intel/vbtn.c
>>>> @@ -198,6 +198,8 @@ static void notify_handler(acpi_handle handle, u32
>>>> event, void *context)
>>>> autorelease = val && (!ke_rel || ke_rel->type == KE_IGNORE);
>>>>
>>>> sparse_keymap_report_event(input_dev, event, val, autorelease);
>>>> +
>>>> + acpi_evaluate_object(handle, "VBDL", NULL, NULL);
>>>> }
>>>>
>>>> /*
>>>>
>>>>>
>>>>> Thanks,
>>>>> Arnold
>>>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Bug Report] intel/vbtn: Dell Inspiron 7352 has unreliable tablet-mode switch
2023-12-04 2:43 ` Arnold Gozum
@ 2023-12-04 15:07 ` Hans de Goede
0 siblings, 0 replies; 7+ messages in thread
From: Hans de Goede @ 2023-12-04 15:07 UTC (permalink / raw)
To: Arnold Gozum, AceLan Kao; +Cc: platform-driver-x86
Hi,
On 12/4/23 03:43, Arnold Gozum wrote:
> Hi Hans,
>
> Thanks for writing this patch, I've just tested it and the wrong state
> issue is fixed. The switch is in the correct state after suspending no
> matter the state before suspending. I've seen forums posts of people
> experiencing the same issue on other models, so I'm sure it will help them
> as well.
>
> For the issue where the switch stops responding, it did happen once but
> after rebooting I can't get it to happen again. It's hard to know for sure
> since it happens randomly, or maybe I didn't have the patched module
> actually loaded when it did occur. I'm guessing it probably should have
> happened by now, but I can report back if it eventually happens again.
>
> I really appreciate you taking the time to work on this.
Thank you for reporting back the testing results.
I have now submitted the patch upstream so that it can
be merged as a fix soon(ish).
Regards,
Hans
> On 2023-12-03 10:41, Hans de Goede wrote:
>> Hi Arnold,
>>
>> I was wondering what the status of this is.
>>
>> Did you manage to find some time to test the patch
>> which I attached to my previous results ?
>>
>> And if yes, what were the results?
>>
>> Regards,
>>
>> Hans
>>
>>
>> On 11/20/23 15:18, Hans de Goede wrote:
>>> Hi Arnold,
>>>
>>> Thank you for reporting this.
>>>
>>> Unfortunately removing the Dell Inspiron 7352 from
>>> the dmi_switches_allow_list will not help.
>>>
>>> The intel-vbtn driver now a days also creates an input-device
>>> with a tablet-switch upon receiving the first tablet-switch
>>> related event, to avoid needing to maintain an ever growing
>>> list of devices on the allow-list.
>>>
>>> And since the Dell Inspiron 7352 does have a somewhat working
>>> tablet-mode-switch it does send such events. So removing it
>>> from the allow-list will only result in the creation of
>>> an input-device for the tablet-mode-switch being delayed till
>>> the first event.
>>>
>>> Now we could add a dmi_switches_deny_list for this purpose,
>>> but first lets see if we can fix things.
>>>
>>> On 10/29/23 20:52, Arnold Gozum wrote:
>>>> Hi, sorry for the delayed reply. Your patch doesn't seem to work, I
>>>> still have the issue where the switch is in the wrong state after
>>>> suspend/resume.
>>>
>>> Ok, so this does sound like the issue where the switch completely
>>> stops reporting state-changes is fixed with the addition of
>>> the extra "VBDL" call ?
>>>
>>> I think that the wrong mode after suspend/resume is just a matter
>>> of manually checking the mode after a suspend/resume.
>>>
>>> Can you give the attached patch a try and see if that fixes things ?
>>>
>>> Regards,
>>>
>>> Hans
>>>
>>>
>>>
>>>
>>>> And yes, it's been a while, and I believe the issues did exist during
>>>> that time however it was easy to ignore/forget since I'm on X11 where
>>>> libinput doesn't respond to tablet mode switches, so I neglected to
>>>> report the issue for a while. Also, about the BIOS, I'm a little
>>>> hesistant to update it since I don't have a battery. I have version A11
>>>> and the newest is A15, but Dell's update notes only mention security
>>>> fixes, so maybe it doesn't matter.
>>>>
>>>> On 2023-10-17 22:05, AceLan Kao wrote:
>>>>> Arnold Gozum <arngozum@gmail.com> 於 2023年10月18日 週三 上午8:53寫道:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> In Linux 5.11, Dell Inspiron 7352 was added to the
>>>>>> dmi_switches_allow_list as it is a 2-in-1 which reports a chassis type
>>>>>> 10 (actually it was me who submitted the patch).
>>>>>>
>>>>>> However, the tablet mode switch can be unreliable. Randomly, switch
>>>>>> events stop being reported and SW_TABLET_MODE will by stuck at 1 or 0,
>>>>>> which I have tested by running evtest while flipping the device to and
>>>>>> from tablet mode. This is fixed after a reboot, or a suspend followed by
>>>>>> unloading and reloading the intel-vbtn module. It can also sometimes be
>>>>>> the case that upon resume, SW_TABLET_MODE does not reflect the actual
>>>>>> state of the device, which is fixed by physically flipping the screen
>>>>>> back and forth to update the state.
>>>>>>
>>>>>> Because of these issues, I think this model should be removed from the
>>>>>> allow list, unless more investigation should be done.
>>>>> Hi Arnold,
>>>>>
>>>>> It's been a long time since you submitted the patch. Did those issues
>>>>> not occur during that time?
>>>>> Have you tried updating the BIOS to see if it helps?
>>>>>
>>>>> From your description, I think calling VBDL might reset the status.
>>>>> You might want to try it below.
>>>>>
>>>>> diff --git a/drivers/platform/x86/intel/vbtn.c
>>>>> b/drivers/platform/x86/intel/vbtn.c
>>>>> index 6fa1735ad7a49..681650f52ff22 100644
>>>>> --- a/drivers/platform/x86/intel/vbtn.c
>>>>> +++ b/drivers/platform/x86/intel/vbtn.c
>>>>> @@ -198,6 +198,8 @@ static void notify_handler(acpi_handle handle, u32
>>>>> event, void *context)
>>>>> autorelease = val && (!ke_rel || ke_rel->type == KE_IGNORE);
>>>>>
>>>>> sparse_keymap_report_event(input_dev, event, val, autorelease);
>>>>> +
>>>>> + acpi_evaluate_object(handle, "VBDL", NULL, NULL);
>>>>> }
>>>>>
>>>>> /*
>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> Arnold
>>>>
>>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-12-04 15:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-18 0:53 [Bug Report] intel/vbtn: Dell Inspiron 7352 has unreliable tablet-mode switch Arnold Gozum
2023-10-18 2:05 ` AceLan Kao
2023-10-29 19:52 ` Arnold Gozum
2023-11-20 14:18 ` Hans de Goede
2023-12-03 15:41 ` Hans de Goede
2023-12-04 2:43 ` Arnold Gozum
2023-12-04 15:07 ` Hans de Goede
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.