Hi, The test results are very useful for us to understand this issue. :-) (In reply to Andrea Fagiani from comment #227) > > B. We want to see some proofs that Samsung EC firmware acts exactly as what > > we've inferred from the reversion requirements. So could you: > > 1. using linux-pm/linux-next with patches from Comment 219. > > 2. Uncomment the following line in the drivers/acpi/ec.c: > > /* #define DEBUG */ > > 3. build/boot the kernel > > 4. do some LID state changes and make sure they are captured by > acpi_listen. > > 5. upload the dmesg output here. > > Opened/closed 5 times, all of them showed up in acpi_listen. > Attaching dmesg. Yes. I also found the 0x5E (5 times) and 0x5F (4 times) in the dmesg. TBH, I didn't find proofs for comment 210 in it. So the issue isn't as what I imagined before. > > C. We want to confirm if the timely polling support is really required by > > Samsung EC firmware: > > 1. using linux-pm/linux-next > > 3. git am gpe-handle21.patch (attachment 156591 [details]) > > 4. git am ec-flush1.patch (attachment 155351 [details]) > > 5. git am ec-flush2.patch (attachment 155371 [details]) > > 6. git am ec-flush3.patch (attachment 155381 [details]) > > 7. git am ec-flush4.patch (attachment 155391 [details]) > > 8. git am ec-flush5.patch (attachment 155411 [details]) > > 9. git am ec-flush6.patch (attachment 155421 [details]) > > Do not apply the ec-flush7.patch, can power plug and LID switch still work, > > and can still work even after resuming? > > Both work fine, even after a suspend/resume. Thus, in order to fix Samsung issue. Either we need timely polling quirk (since test A works) Or we need old CLEAR_ON_RESUME quirk (since test C works). > Note that the ec-flush patches depend on the reverts, so I applied them even > if they weren't explicitly listed. I can test without them later today if > required. Not necessary :-). I only want the kernel test results __wih__ the reverts (as they conflict with the patches posted here) so I don't need to post another set of rebased patches for current linux-pm/linux-next. > > D. We want to confirm if this is really a regression and current fix can: > > 1. Using linux-pm/linux-next > > 2. git revert 79149001 > > 3. git revert df9ff918 > > Do not apply any of the posted patches, can power plug and LID switch still > > work? And > > Upon boot, it works correctly. After a suspend/resume, power plug detection > does not work anymore (it is greatly delayed) and neither does the LID > switch (doesn't trigger at all). Thus the regression seems to be: "the 2 commits have broken the CLEAR_ON_RESUME quirk". I guess SCI_EVT is set after resuming but GPE doesn't fire. If this is the case, this isn't a silicon/firmware bug but a driver bug. As EC GPE is edge triggered and GPE might have already been fired before suspending. If so, we need to improve the driver and shouldn't fix the driver bug using any kind of quirk. So I want to check if the SCI_EVT is set after resuming. Let me think about a way to confirm this. I'll add another test later. > > 1. Using linux-pm/linux-next > > Do not revert the "regression fix" commits and do not apply any of the > > posted patches, can power plug and LID switch still work? > > I wasn't able to do this last test due to time constraints, I'll try and do > that later today. According to your previous test results. The result might be "both can work". Though we might still need to improve the driver, we'll also be glad to see this regression has been prevented in the mainline. So it's better to confirm if the upstreamed regression fixes can also work. Best regards -Lv