Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1403738

Re: [RFC PATCH 1/2] ACPI / button: Send "open" state after boot/resume

From "Rafael J. Wysocki" <rafael@kernel.org>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 1/2] ACPI / button: Send "open" state after boot/resume
Date 2016-05-19 15:30 +0200
Message-ID <rAwbw-kQ-19@gated-at.bofh.it> (permalink)
References <rzIy6-28V-11@gated-at.bofh.it> <rzWKK-2DG-11@gated-at.bofh.it> <rzYtc-3J2-13@gated-at.bofh.it> <rAiBA-8gC-31@gated-at.bofh.it> <rAlpM-1Ad-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, May 19, 2016 at 3:50 AM, Zheng, Lv <lv.zheng@intel.com> wrote:
> Hi,
>
>> From: rjwysocki@gmail.com [mailto:rjwysocki@gmail.com] On Behalf Of
>> Rafael J. Wysocki
>> Subject: Re: [RFC PATCH 1/2] ACPI / button: Send "open" state after
>> boot/resume

[cut]

>> > That's because of systemd implementation.
>> > It contains code logic that:
>> > When the lid state is closed, a re-checking mechanism is installed.
>> > So if we do not send any notification after boot/resume and the old lid state
>> is "closed".
>> > systemd determines to suspend in the re-checking mechanism.
>>
>> If that really is the case, it is plain silly and I don't think we can
>> do anything in the kernel to help here.
>
> [Lv Zheng]
> The problem is:
> If we just removed the 2 lines sending wrong lid state after boot/resume.
> Problem couldn't be solved.
> It could only be solved by changing both the systemd and the kernel (deleting the 2 lines).

There are two things here, there's a kernel issue (sending the fake
input events) and there's a user-visible problem.  Yes, it may not be
possible to fix the user-visible problem by fixing the kernel issue
alone, but pretty much by definition we can only fix the kernel issue
in the kernel.

However, it looks like it may not be possible to fix the user-visible
problem without fixing the kernel issue in the first place, so maybe
we should do that and attach the additional user space patch to the
bug entries in question?

[cut]

>> > I intentionally kept the _LID evaluation right after boot/resume.
>> > Because I validated Windows behavior.
>> > It seems Windows evaluates _LID right after boot.
>> > So I kept _LID evaluated right after boot to prevent compliance issues.
>>
>> I don't quite see what compliance issues could result from skipping
>> the _LID evaluation after boot.
>
> [Lv Zheng]
> I'm not sure if there is a platform putting named object initialization code in _LID.
> If you don't like it, we can stop evaluating _LID in the next version.

Well, unless there is a well-documented reason for doing this, I'd at
least try to see what happens if we don't.

Doing things for unspecified reasons is not a very good idea overall IMO.

[cut]

>> > [Lv Zheng]
>> > If we did this right now, many other userspace could be broken.
>> > So we prepared the options to allow users to choose.
>>
>> Do we have any evidence that any other user space stacks are affected?
>
> [Lv Zheng]
> I didn't know any of such affections except the systemd.

So let's focus on this one until we actually find another example.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH 1/2] ACPI / button: Send "open" state after boot/resume Lv Zheng <lv.zheng@intel.com> - 2016-05-17 10:30 +0200
  Re: [RFC PATCH 1/2] ACPI / button: Send "open" state after boot/resume "Rafael J. Wysocki" <rafael@kernel.org> - 2016-05-18 01:40 +0200
    RE: [RFC PATCH 1/2] ACPI / button: Send "open" state after  boot/resume "Zheng, Lv" <lv.zheng@intel.com> - 2016-05-18 03:30 +0200
      Re: [RFC PATCH 1/2] ACPI / button: Send "open" state after boot/resume "Rafael J. Wysocki" <rafael@kernel.org> - 2016-05-19 01:00 +0200
        RE: [RFC PATCH 1/2] ACPI / button: Send "open" state after  boot/resume "Zheng, Lv" <lv.zheng@intel.com> - 2016-05-19 04:00 +0200
          Re: [RFC PATCH 1/2] ACPI / button: Send "open" state after boot/resume "Rafael J. Wysocki" <rafael@kernel.org> - 2016-05-19 15:30 +0200
            Re: [RFC PATCH 1/2] ACPI / button: Send "open" state after  boot/resume Benjamin Tissoires <benjamin.tissoires@gmail.com> - 2016-05-26 15:40 +0200
              RE: [RFC PATCH 1/2] ACPI / button: Send "open" state after  boot/resume "Zheng, Lv" <lv.zheng@intel.com> - 2016-05-30 03:50 +0200
  Re: [RFC PATCH 1/2] ACPI / button: Send "open" state after  boot/resume Bastien Nocera <hadess@hadess.net> - 2016-05-18 15:00 +0200
    Re: [RFC PATCH 1/2] ACPI / button: Send "open" state after boot/resume "Rafael J. Wysocki" <rafael@kernel.org> - 2016-05-18 23:50 +0200
    RE: [RFC PATCH 1/2] ACPI / button: Send "open" state after  boot/resume "Zheng, Lv" <lv.zheng@intel.com> - 2016-05-19 04:00 +0200
  [PATCH v2 2/3] ACPI / button: Refactor functions to eliminate redundant code Lv Zheng <lv.zheng@intel.com> - 2016-05-27 09:20 +0200
  [PATCH v2 1/3] ACPI / button: Remove initial lid state notification Lv Zheng <lv.zheng@intel.com> - 2016-05-27 09:20 +0200
  [PATCH v2 3/3] ACPI / button: Send "open" state after boot/resume Lv Zheng <lv.zheng@intel.com> - 2016-05-27 09:20 +0200
    Re: [PATCH v2 3/3] ACPI / button: Send "open" state after boot/resume Benjamin Tissoires <benjamin.tissoires@gmail.com> - 2016-05-30 10:20 +0200
      RE: [PATCH v2 3/3] ACPI / button: Send "open" state after  boot/resume "Zheng, Lv" <lv.zheng@intel.com> - 2016-05-31 05:00 +0200
  [PATCH v2 0/3] ACPI / button: Clarify initial lid state Lv Zheng <lv.zheng@intel.com> - 2016-05-27 09:20 +0200
    Re: [PATCH v2 0/3] ACPI / button: Clarify initial lid state Valdis.Kletnieks@vt.edu - 2016-05-28 00:20 +0200

csiph-web