[Kernel-packages] [Bug 1745646] Re: [Regression] PCI / PM: Simplify device wakeup settings code

2018-05-07 Thread Joseph Salisbury
On 05/04/2018 07:14 AM, Rafael J. Wysocki wrote:
> On Thursday, May 3, 2018 11:29:18 PM CEST Rafael J. Wysocki wrote:
>> On Thu, May 3, 2018 at 9:11 PM, Bjorn Helgaas  wrote:
>>> On Thu, May 03, 2018 at 02:29:02PM -0400, Joseph Salisbury wrote:
 On 05/02/2018 06:41 AM, Rafael J. Wysocki wrote:
> On Tue, May 1, 2018 at 9:55 PM, Bjorn Helgaas  wrote:
>> On Tue, May 01, 2018 at 10:34:29AM +0200, Rafael J. Wysocki wrote:
>>> On Mon, Apr 30, 2018 at 4:22 PM, Joseph Salisbury
>>>  wrote:
 On 04/16/2018 11:58 AM, Rafael J. Wysocki wrote:
> On Mon, Apr 16, 2018 at 5:31 PM, Joseph Salisbury
>  wrote:
>> On 04/13/2018 05:34 PM, Rafael J. Wysocki wrote:
>>> On Fri, Apr 13, 2018 at 7:56 PM, Joseph Salisbury
>>>  wrote:
 Hi Rafael,

 A kernel bug report was opened against Ubuntu [0].  After a kernel
 bisect, it was found that reverting the following two commits 
 resolved
 this bug:

 0ce3fcaff929 ("PCI / PM: Restore PME Enable after config space 
 restoration")
 0847684cfc5f("PCI / PM: Simplify device wakeup settings code")

 This is a regression introduced in v4.13-rc1 and still exists in
 mainline.  The bug causes the battery to drain when the system is
 powered down and unplugged, which does not happed prior to these 
 two
 commits.
>>> What system and what do you mean by "powered down"?  How much time
>>> does it take for the battery to drain now?
>> By powered down, the bug reporter is saying physically powered off 
>> and
>> unplugged.  The system is a HP laptop:
>>
>> dmi.chassis.vendor: HP
>> dmi.product.family: 103C_5335KV HP Notebook
>> dmi.product.name: HP Notebook
>> vendor_id: GenuineIntel
>> cpu family: 6
>>
>>
 The bisect actually pointed to commit de3ef1e, but reverting
 these two commits fixes the issue.

 I was hoping to get your feedback, since you are the patch author. 
  Do
 you think gathering any additional data will help diagnose this 
 issue,
 or would it be best to submit a revert request?
>>> First, reverting these is not an option or you will break systems
>>> relying on them now.  4.13 is three releases back at this point.
>>>
>>> Second, your issue appears to be related to the suspend/shutdown 
>>> path
>>> whereas commit 0ce3fcaff929 is mostly about resume, so presumably 
>>> the
>>> change in pci_enable_wake() causes the problem to happen.  Can you 
>>> try
>>> to revert this one alone and see if that helps?
>> A test kernel with commits 0ce3fcaff929 and de3ef1eb1cd0 reverted was
>> tested.  However, the test kernel still exhibited the bug.
> So essentially the bisection result cannot be trusted.
 We performed some more testing and confirmed just a revert of the
 following commit resolves the bug:

 0847684cfc5f0 ("PCI / PM: Simplify device wakeup settings code")
>>> Thanks for confirming this!
>>>
 Can you think of any suggestions to help debug further?
>>> The root cause of the regression is likely the change in
>>> pci_enable_wake() removing the device_may_wakeup() check from it.
>>>
>>> Probably, one of the drivers in the platform calls pci_enable_wake()
>>> directly from its ->shutdown() callback and that causes the device to
>>> be set up for system wakeup which in turn causes the power draw while
>>> the system is off to increase.
>>>
>>> I would look at the PCI drivers used on that platform to find which of
>>> them call pci_enable_wake() directly from ->shutdown() and I would
>>> make these calls conditional on device_may_wakeup().
>> I took a quick look with
>>
>>   git grep -E "pci_enable_wake\(.*[^0]\);|device_may_wakeup"
>>
>> and didn't notice any pci_enable_wake() callers that called
>> device_may_wakeup() first.
> I've just look at a bunch of network drivers doing that.
>
> It looks like I may need to restore __pci_enable_wake() with an extra
> "runtime" argument for internal use.
>
> Joseph, can you ask the reporter to test the Bjorn's patch, please?
 The bug reporter has testing Bjorn's patch.  It did in fact resolve the
 bug.  Thanks for the quick help, Rafael and Bjorn!
>>> Just as a word of caution, I think Rafael said my patch was not the
>>> right fix because it would break something else.  So I would wait for
>>> a better 

[Kernel-packages] [Bug 1745646] Re: [Regression] PCI / PM: Simplify device wakeup settings code

2018-05-03 Thread Rafael J. Wysocki
On Thu, May 3, 2018 at 9:11 PM, Bjorn Helgaas  wrote:
> On Thu, May 03, 2018 at 02:29:02PM -0400, Joseph Salisbury wrote:
>> On 05/02/2018 06:41 AM, Rafael J. Wysocki wrote:
>> > On Tue, May 1, 2018 at 9:55 PM, Bjorn Helgaas  wrote:
>> >> On Tue, May 01, 2018 at 10:34:29AM +0200, Rafael J. Wysocki wrote:
>> >>> On Mon, Apr 30, 2018 at 4:22 PM, Joseph Salisbury
>> >>>  wrote:
>>  On 04/16/2018 11:58 AM, Rafael J. Wysocki wrote:
>> > On Mon, Apr 16, 2018 at 5:31 PM, Joseph Salisbury
>> >  wrote:
>> >> On 04/13/2018 05:34 PM, Rafael J. Wysocki wrote:
>> >>> On Fri, Apr 13, 2018 at 7:56 PM, Joseph Salisbury
>> >>>  wrote:
>>  Hi Rafael,
>> 
>>  A kernel bug report was opened against Ubuntu [0].  After a kernel
>>  bisect, it was found that reverting the following two commits 
>>  resolved
>>  this bug:
>> 
>>  0ce3fcaff929 ("PCI / PM: Restore PME Enable after config space 
>>  restoration")
>>  0847684cfc5f("PCI / PM: Simplify device wakeup settings code")
>> 
>>  This is a regression introduced in v4.13-rc1 and still exists in
>>  mainline.  The bug causes the battery to drain when the system is
>>  powered down and unplugged, which does not happed prior to these two
>>  commits.
>> >>> What system and what do you mean by "powered down"?  How much time
>> >>> does it take for the battery to drain now?
>> >> By powered down, the bug reporter is saying physically powered off and
>> >> unplugged.  The system is a HP laptop:
>> >>
>> >> dmi.chassis.vendor: HP
>> >> dmi.product.family: 103C_5335KV HP Notebook
>> >> dmi.product.name: HP Notebook
>> >> vendor_id: GenuineIntel
>> >> cpu family: 6
>> >>
>> >>
>>  The bisect actually pointed to commit de3ef1e, but reverting
>>  these two commits fixes the issue.
>> 
>>  I was hoping to get your feedback, since you are the patch author.  
>>  Do
>>  you think gathering any additional data will help diagnose this 
>>  issue,
>>  or would it be best to submit a revert request?
>> >>> First, reverting these is not an option or you will break systems
>> >>> relying on them now.  4.13 is three releases back at this point.
>> >>>
>> >>> Second, your issue appears to be related to the suspend/shutdown path
>> >>> whereas commit 0ce3fcaff929 is mostly about resume, so presumably the
>> >>> change in pci_enable_wake() causes the problem to happen.  Can you 
>> >>> try
>> >>> to revert this one alone and see if that helps?
>> >> A test kernel with commits 0ce3fcaff929 and de3ef1eb1cd0 reverted was
>> >> tested.  However, the test kernel still exhibited the bug.
>> > So essentially the bisection result cannot be trusted.
>>  We performed some more testing and confirmed just a revert of the
>>  following commit resolves the bug:
>> 
>>  0847684cfc5f0 ("PCI / PM: Simplify device wakeup settings code")
>> >>> Thanks for confirming this!
>> >>>
>>  Can you think of any suggestions to help debug further?
>> >>> The root cause of the regression is likely the change in
>> >>> pci_enable_wake() removing the device_may_wakeup() check from it.
>> >>>
>> >>> Probably, one of the drivers in the platform calls pci_enable_wake()
>> >>> directly from its ->shutdown() callback and that causes the device to
>> >>> be set up for system wakeup which in turn causes the power draw while
>> >>> the system is off to increase.
>> >>>
>> >>> I would look at the PCI drivers used on that platform to find which of
>> >>> them call pci_enable_wake() directly from ->shutdown() and I would
>> >>> make these calls conditional on device_may_wakeup().
>> >> I took a quick look with
>> >>
>> >>   git grep -E "pci_enable_wake\(.*[^0]\);|device_may_wakeup"
>> >>
>> >> and didn't notice any pci_enable_wake() callers that called
>> >> device_may_wakeup() first.
>> > I've just look at a bunch of network drivers doing that.
>> >
>> > It looks like I may need to restore __pci_enable_wake() with an extra
>> > "runtime" argument for internal use.
>> >
>> > Joseph, can you ask the reporter to test the Bjorn's patch, please?
>>
>> The bug reporter has testing Bjorn's patch.  It did in fact resolve the
>> bug.  Thanks for the quick help, Rafael and Bjorn!
>
> Just as a word of caution, I think Rafael said my patch was not the
> right fix because it would break something else.  So I would wait for
> a better patch from Rafael before actually resolving this issue.

I'll do my best to provide one in the next couple of days.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.

[Kernel-packages] [Bug 1745646] Re: [Regression] PCI / PM: Simplify device wakeup settings code

2018-05-03 Thread Joseph Salisbury
On 05/02/2018 06:41 AM, Rafael J. Wysocki wrote:
> On Tue, May 1, 2018 at 9:55 PM, Bjorn Helgaas  wrote:
>> On Tue, May 01, 2018 at 10:34:29AM +0200, Rafael J. Wysocki wrote:
>>> On Mon, Apr 30, 2018 at 4:22 PM, Joseph Salisbury
>>>  wrote:
 On 04/16/2018 11:58 AM, Rafael J. Wysocki wrote:
> On Mon, Apr 16, 2018 at 5:31 PM, Joseph Salisbury
>  wrote:
>> On 04/13/2018 05:34 PM, Rafael J. Wysocki wrote:
>>> On Fri, Apr 13, 2018 at 7:56 PM, Joseph Salisbury
>>>  wrote:
 Hi Rafael,

 A kernel bug report was opened against Ubuntu [0].  After a kernel
 bisect, it was found that reverting the following two commits resolved
 this bug:

 0ce3fcaff929 ("PCI / PM: Restore PME Enable after config space 
 restoration")
 0847684cfc5f("PCI / PM: Simplify device wakeup settings code")

 This is a regression introduced in v4.13-rc1 and still exists in
 mainline.  The bug causes the battery to drain when the system is
 powered down and unplugged, which does not happed prior to these two
 commits.
>>> What system and what do you mean by "powered down"?  How much time
>>> does it take for the battery to drain now?
>> By powered down, the bug reporter is saying physically powered off and
>> unplugged.  The system is a HP laptop:
>>
>> dmi.chassis.vendor: HP
>> dmi.product.family: 103C_5335KV HP Notebook
>> dmi.product.name: HP Notebook
>> vendor_id: GenuineIntel
>> cpu family: 6
>>
>>
 The bisect actually pointed to commit de3ef1e, but reverting
 these two commits fixes the issue.

 I was hoping to get your feedback, since you are the patch author.  Do
 you think gathering any additional data will help diagnose this issue,
 or would it be best to submit a revert request?
>>> First, reverting these is not an option or you will break systems
>>> relying on them now.  4.13 is three releases back at this point.
>>>
>>> Second, your issue appears to be related to the suspend/shutdown path
>>> whereas commit 0ce3fcaff929 is mostly about resume, so presumably the
>>> change in pci_enable_wake() causes the problem to happen.  Can you try
>>> to revert this one alone and see if that helps?
>> A test kernel with commits 0ce3fcaff929 and de3ef1eb1cd0 reverted was
>> tested.  However, the test kernel still exhibited the bug.
> So essentially the bisection result cannot be trusted.
 We performed some more testing and confirmed just a revert of the
 following commit resolves the bug:

 0847684cfc5f0 ("PCI / PM: Simplify device wakeup settings code")
>>> Thanks for confirming this!
>>>
 Can you think of any suggestions to help debug further?
>>> The root cause of the regression is likely the change in
>>> pci_enable_wake() removing the device_may_wakeup() check from it.
>>>
>>> Probably, one of the drivers in the platform calls pci_enable_wake()
>>> directly from its ->shutdown() callback and that causes the device to
>>> be set up for system wakeup which in turn causes the power draw while
>>> the system is off to increase.
>>>
>>> I would look at the PCI drivers used on that platform to find which of
>>> them call pci_enable_wake() directly from ->shutdown() and I would
>>> make these calls conditional on device_may_wakeup().
>> I took a quick look with
>>
>>   git grep -E "pci_enable_wake\(.*[^0]\);|device_may_wakeup"
>>
>> and didn't notice any pci_enable_wake() callers that called
>> device_may_wakeup() first.
> I've just look at a bunch of network drivers doing that.
>
> It looks like I may need to restore __pci_enable_wake() with an extra
> "runtime" argument for internal use.
>
> Joseph, can you ask the reporter to test the Bjorn's patch, please?

The bug reporter has testing Bjorn's patch.  It did in fact resolve the
bug.  Thanks for the quick help, Rafael and Bjorn!

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1745646

Title:
  Battery drains when laptop is off  (shutdown)

Status in Linux:
  Unknown
Status in acpi package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  In Progress
Status in acpi source package in Artful:
  New
Status in linux source package in Artful:
  In Progress
Status in acpi source package in Bionic:
  Confirmed
Status in linux source package in Bionic:
  In Progress

Bug description:
  I am using hp AY008tx laptop , and many other laptop users (HP) are also 
facing the same issue . The problem don't occur when i install windows 10 . 
Now, only ubuntu is installed.
  i am using latest bios insyde20 rev 5.(latest)
  WOL disabled and no usb device connected
  checked my battery .
 

[Kernel-packages] [Bug 1745646] Re: [Regression] PCI / PM: Simplify device wakeup settings code

2018-05-02 Thread Joseph Salisbury
On 05/02/2018 06:41 AM, Rafael J. Wysocki wrote:
> On Tue, May 1, 2018 at 9:55 PM, Bjorn Helgaas  wrote:
>> On Tue, May 01, 2018 at 10:34:29AM +0200, Rafael J. Wysocki wrote:
>>> On Mon, Apr 30, 2018 at 4:22 PM, Joseph Salisbury
>>>  wrote:
 On 04/16/2018 11:58 AM, Rafael J. Wysocki wrote:
> On Mon, Apr 16, 2018 at 5:31 PM, Joseph Salisbury
>  wrote:
>> On 04/13/2018 05:34 PM, Rafael J. Wysocki wrote:
>>> On Fri, Apr 13, 2018 at 7:56 PM, Joseph Salisbury
>>>  wrote:
 Hi Rafael,

 A kernel bug report was opened against Ubuntu [0].  After a kernel
 bisect, it was found that reverting the following two commits resolved
 this bug:

 0ce3fcaff929 ("PCI / PM: Restore PME Enable after config space 
 restoration")
 0847684cfc5f("PCI / PM: Simplify device wakeup settings code")

 This is a regression introduced in v4.13-rc1 and still exists in
 mainline.  The bug causes the battery to drain when the system is
 powered down and unplugged, which does not happed prior to these two
 commits.
>>> What system and what do you mean by "powered down"?  How much time
>>> does it take for the battery to drain now?
>> By powered down, the bug reporter is saying physically powered off and
>> unplugged.  The system is a HP laptop:
>>
>> dmi.chassis.vendor: HP
>> dmi.product.family: 103C_5335KV HP Notebook
>> dmi.product.name: HP Notebook
>> vendor_id: GenuineIntel
>> cpu family: 6
>>
>>
 The bisect actually pointed to commit de3ef1e, but reverting
 these two commits fixes the issue.

 I was hoping to get your feedback, since you are the patch author.  Do
 you think gathering any additional data will help diagnose this issue,
 or would it be best to submit a revert request?
>>> First, reverting these is not an option or you will break systems
>>> relying on them now.  4.13 is three releases back at this point.
>>>
>>> Second, your issue appears to be related to the suspend/shutdown path
>>> whereas commit 0ce3fcaff929 is mostly about resume, so presumably the
>>> change in pci_enable_wake() causes the problem to happen.  Can you try
>>> to revert this one alone and see if that helps?
>> A test kernel with commits 0ce3fcaff929 and de3ef1eb1cd0 reverted was
>> tested.  However, the test kernel still exhibited the bug.
> So essentially the bisection result cannot be trusted.
 We performed some more testing and confirmed just a revert of the
 following commit resolves the bug:

 0847684cfc5f0 ("PCI / PM: Simplify device wakeup settings code")
>>> Thanks for confirming this!
>>>
 Can you think of any suggestions to help debug further?
>>> The root cause of the regression is likely the change in
>>> pci_enable_wake() removing the device_may_wakeup() check from it.
>>>
>>> Probably, one of the drivers in the platform calls pci_enable_wake()
>>> directly from its ->shutdown() callback and that causes the device to
>>> be set up for system wakeup which in turn causes the power draw while
>>> the system is off to increase.
>>>
>>> I would look at the PCI drivers used on that platform to find which of
>>> them call pci_enable_wake() directly from ->shutdown() and I would
>>> make these calls conditional on device_may_wakeup().
>> I took a quick look with
>>
>>   git grep -E "pci_enable_wake\(.*[^0]\);|device_may_wakeup"
>>
>> and didn't notice any pci_enable_wake() callers that called
>> device_may_wakeup() first.
> I've just look at a bunch of network drivers doing that.
>
> It looks like I may need to restore __pci_enable_wake() with an extra
> "runtime" argument for internal use.
>
> Joseph, can you ask the reporter to test the Bjorn's patch, please?

Yes, I'll get him a test kernel and respond with the results.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1745646

Title:
  Battery drains when laptop is off  (shutdown)

Status in Linux:
  Unknown
Status in acpi package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  In Progress
Status in acpi source package in Artful:
  New
Status in linux source package in Artful:
  In Progress
Status in acpi source package in Bionic:
  Confirmed
Status in linux source package in Bionic:
  In Progress

Bug description:
  I am using hp AY008tx laptop , and many other laptop users (HP) are also 
facing the same issue . The problem don't occur when i install windows 10 . 
Now, only ubuntu is installed.
  i am using latest bios insyde20 rev 5.(latest)
  WOL disabled and no usb device connected
  checked my battery .
  it don't happen when i remove battery and plug it again 

[Kernel-packages] [Bug 1745646] Re: [Regression] PCI / PM: Simplify device wakeup settings code

2018-05-02 Thread Rafael J. Wysocki
On Tue, May 1, 2018 at 9:55 PM, Bjorn Helgaas  wrote:
> On Tue, May 01, 2018 at 10:34:29AM +0200, Rafael J. Wysocki wrote:
>> On Mon, Apr 30, 2018 at 4:22 PM, Joseph Salisbury
>>  wrote:
>> > On 04/16/2018 11:58 AM, Rafael J. Wysocki wrote:
>> >> On Mon, Apr 16, 2018 at 5:31 PM, Joseph Salisbury
>> >>  wrote:
>> >>> On 04/13/2018 05:34 PM, Rafael J. Wysocki wrote:
>>  On Fri, Apr 13, 2018 at 7:56 PM, Joseph Salisbury
>>   wrote:
>> > Hi Rafael,
>> >
>> > A kernel bug report was opened against Ubuntu [0].  After a kernel
>> > bisect, it was found that reverting the following two commits resolved
>> > this bug:
>> >
>> > 0ce3fcaff929 ("PCI / PM: Restore PME Enable after config space 
>> > restoration")
>> > 0847684cfc5f("PCI / PM: Simplify device wakeup settings code")
>> >
>> > This is a regression introduced in v4.13-rc1 and still exists in
>> > mainline.  The bug causes the battery to drain when the system is
>> > powered down and unplugged, which does not happed prior to these two
>> > commits.
>>  What system and what do you mean by "powered down"?  How much time
>>  does it take for the battery to drain now?
>> >>> By powered down, the bug reporter is saying physically powered off and
>> >>> unplugged.  The system is a HP laptop:
>> >>>
>> >>> dmi.chassis.vendor: HP
>> >>> dmi.product.family: 103C_5335KV HP Notebook
>> >>> dmi.product.name: HP Notebook
>> >>> vendor_id: GenuineIntel
>> >>> cpu family: 6
>> >>>
>> >>>
>> > The bisect actually pointed to commit de3ef1e, but reverting
>> > these two commits fixes the issue.
>> >
>> > I was hoping to get your feedback, since you are the patch author.  Do
>> > you think gathering any additional data will help diagnose this issue,
>> > or would it be best to submit a revert request?
>>  First, reverting these is not an option or you will break systems
>>  relying on them now.  4.13 is three releases back at this point.
>> 
>>  Second, your issue appears to be related to the suspend/shutdown path
>>  whereas commit 0ce3fcaff929 is mostly about resume, so presumably the
>>  change in pci_enable_wake() causes the problem to happen.  Can you try
>>  to revert this one alone and see if that helps?
>> >>> A test kernel with commits 0ce3fcaff929 and de3ef1eb1cd0 reverted was
>> >>> tested.  However, the test kernel still exhibited the bug.
>> >> So essentially the bisection result cannot be trusted.
>> >
>> > We performed some more testing and confirmed just a revert of the
>> > following commit resolves the bug:
>> >
>> > 0847684cfc5f0 ("PCI / PM: Simplify device wakeup settings code")
>>
>> Thanks for confirming this!
>>
>> > Can you think of any suggestions to help debug further?
>>
>> The root cause of the regression is likely the change in
>> pci_enable_wake() removing the device_may_wakeup() check from it.
>>
>> Probably, one of the drivers in the platform calls pci_enable_wake()
>> directly from its ->shutdown() callback and that causes the device to
>> be set up for system wakeup which in turn causes the power draw while
>> the system is off to increase.
>>
>> I would look at the PCI drivers used on that platform to find which of
>> them call pci_enable_wake() directly from ->shutdown() and I would
>> make these calls conditional on device_may_wakeup().
>
> I took a quick look with
>
>   git grep -E "pci_enable_wake\(.*[^0]\);|device_may_wakeup"
>
> and didn't notice any pci_enable_wake() callers that called
> device_may_wakeup() first.

I've just look at a bunch of network drivers doing that.

It looks like I may need to restore __pci_enable_wake() with an extra
"runtime" argument for internal use.

Joseph, can you ask the reporter to test the Bjorn's patch, please?

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1745646

Title:
  Battery drains when laptop is off  (shutdown)

Status in Linux:
  Unknown
Status in acpi package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  In Progress
Status in acpi source package in Artful:
  New
Status in linux source package in Artful:
  In Progress
Status in acpi source package in Bionic:
  Confirmed
Status in linux source package in Bionic:
  In Progress

Bug description:
  I am using hp AY008tx laptop , and many other laptop users (HP) are also 
facing the same issue . The problem don't occur when i install windows 10 . 
Now, only ubuntu is installed.
  i am using latest bios insyde20 rev 5.(latest)
  WOL disabled and no usb device connected
  checked my battery .
  it don't happen when i remove battery and plug it again after shutdown.
  tried laptop_mode_tools and tpl too

  
  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: 

[Kernel-packages] [Bug 1745646] Re: [Regression] PCI / PM: Simplify device wakeup settings code

2018-05-02 Thread Rafael J. Wysocki
On Tue, May 1, 2018 at 9:55 PM, Bjorn Helgaas  wrote:
> On Tue, May 01, 2018 at 10:34:29AM +0200, Rafael J. Wysocki wrote:
>> On Mon, Apr 30, 2018 at 4:22 PM, Joseph Salisbury
>>  wrote:
>> > On 04/16/2018 11:58 AM, Rafael J. Wysocki wrote:
>> >> On Mon, Apr 16, 2018 at 5:31 PM, Joseph Salisbury
>> >>  wrote:
>> >>> On 04/13/2018 05:34 PM, Rafael J. Wysocki wrote:
>>  On Fri, Apr 13, 2018 at 7:56 PM, Joseph Salisbury
>>   wrote:
>> > Hi Rafael,
>> >
>> > A kernel bug report was opened against Ubuntu [0].  After a kernel
>> > bisect, it was found that reverting the following two commits resolved
>> > this bug:
>> >
>> > 0ce3fcaff929 ("PCI / PM: Restore PME Enable after config space 
>> > restoration")
>> > 0847684cfc5f("PCI / PM: Simplify device wakeup settings code")
>> >
>> > This is a regression introduced in v4.13-rc1 and still exists in
>> > mainline.  The bug causes the battery to drain when the system is
>> > powered down and unplugged, which does not happed prior to these two
>> > commits.
>>  What system and what do you mean by "powered down"?  How much time
>>  does it take for the battery to drain now?
>> >>> By powered down, the bug reporter is saying physically powered off and
>> >>> unplugged.  The system is a HP laptop:
>> >>>
>> >>> dmi.chassis.vendor: HP
>> >>> dmi.product.family: 103C_5335KV HP Notebook
>> >>> dmi.product.name: HP Notebook
>> >>> vendor_id: GenuineIntel
>> >>> cpu family: 6
>> >>>
>> >>>
>> > The bisect actually pointed to commit de3ef1e, but reverting
>> > these two commits fixes the issue.
>> >
>> > I was hoping to get your feedback, since you are the patch author.  Do
>> > you think gathering any additional data will help diagnose this issue,
>> > or would it be best to submit a revert request?
>>  First, reverting these is not an option or you will break systems
>>  relying on them now.  4.13 is three releases back at this point.
>> 
>>  Second, your issue appears to be related to the suspend/shutdown path
>>  whereas commit 0ce3fcaff929 is mostly about resume, so presumably the
>>  change in pci_enable_wake() causes the problem to happen.  Can you try
>>  to revert this one alone and see if that helps?
>> >>> A test kernel with commits 0ce3fcaff929 and de3ef1eb1cd0 reverted was
>> >>> tested.  However, the test kernel still exhibited the bug.
>> >> So essentially the bisection result cannot be trusted.
>> >
>> > We performed some more testing and confirmed just a revert of the
>> > following commit resolves the bug:
>> >
>> > 0847684cfc5f0 ("PCI / PM: Simplify device wakeup settings code")
>>
>> Thanks for confirming this!
>>
>> > Can you think of any suggestions to help debug further?
>>
>> The root cause of the regression is likely the change in
>> pci_enable_wake() removing the device_may_wakeup() check from it.
>>
>> Probably, one of the drivers in the platform calls pci_enable_wake()
>> directly from its ->shutdown() callback and that causes the device to
>> be set up for system wakeup which in turn causes the power draw while
>> the system is off to increase.
>>
>> I would look at the PCI drivers used on that platform to find which of
>> them call pci_enable_wake() directly from ->shutdown() and I would
>> make these calls conditional on device_may_wakeup().
>
> I took a quick look with
>
>   git grep -E "pci_enable_wake\(.*[^0]\);|device_may_wakeup"
>
> and didn't notice any pci_enable_wake() callers that called
> device_may_wakeup() first.
>
> Probably a dumb question, but would it make sense to restore the
> device_may_wakeup() check in pci_enable_wake(), e.g.,

At least as a matter of test, yes, it would, but not this way:

> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index e597655a5643..9fa64c175f92 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -1932,6 +1932,9 @@ int pci_enable_wake(struct pci_dev *dev, pci_power_t 
> state, bool enable)
>  {
> int ret = 0;
>
> +   if (enable && !device_may_wakeup(>dev))
> +   return -EINVAL;
> +
> /*
>  * Bridges can only signal wakeup on behalf of subordinate devices,
>  * but that is set up elsewhere, so skip them.

because that would break runtime PM wakeup for devices that aren't
allowed to wake up the system from sleep.

Anyway, if the patch above makes the problem go away, it will mean we
are on the right track.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1745646

Title:
  Battery drains when laptop is off  (shutdown)

Status in Linux:
  Unknown
Status in acpi package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  In Progress
Status in acpi source package in Artful:
  New

[Kernel-packages] [Bug 1745646] Re: [Regression] PCI / PM: Simplify device wakeup settings code

2018-05-01 Thread Rafael J. Wysocki
On Mon, Apr 30, 2018 at 4:22 PM, Joseph Salisbury
 wrote:
> On 04/16/2018 11:58 AM, Rafael J. Wysocki wrote:
>> On Mon, Apr 16, 2018 at 5:31 PM, Joseph Salisbury
>>  wrote:
>>> On 04/13/2018 05:34 PM, Rafael J. Wysocki wrote:
 On Fri, Apr 13, 2018 at 7:56 PM, Joseph Salisbury
  wrote:
> Hi Rafael,
>
> A kernel bug report was opened against Ubuntu [0].  After a kernel
> bisect, it was found that reverting the following two commits resolved
> this bug:
>
> 0ce3fcaff929 ("PCI / PM: Restore PME Enable after config space 
> restoration")
> 0847684cfc5f("PCI / PM: Simplify device wakeup settings code")
>
> This is a regression introduced in v4.13-rc1 and still exists in
> mainline.  The bug causes the battery to drain when the system is
> powered down and unplugged, which does not happed prior to these two
> commits.
 What system and what do you mean by "powered down"?  How much time
 does it take for the battery to drain now?
>>> By powered down, the bug reporter is saying physically powered off and
>>> unplugged.  The system is a HP laptop:
>>>
>>> dmi.chassis.vendor: HP
>>> dmi.product.family: 103C_5335KV HP Notebook
>>> dmi.product.name: HP Notebook
>>> vendor_id: GenuineIntel
>>> cpu family: 6
>>>
>>>
> The bisect actually pointed to commit de3ef1e, but reverting
> these two commits fixes the issue.
>
> I was hoping to get your feedback, since you are the patch author.  Do
> you think gathering any additional data will help diagnose this issue,
> or would it be best to submit a revert request?
 First, reverting these is not an option or you will break systems
 relying on them now.  4.13 is three releases back at this point.

 Second, your issue appears to be related to the suspend/shutdown path
 whereas commit 0ce3fcaff929 is mostly about resume, so presumably the
 change in pci_enable_wake() causes the problem to happen.  Can you try
 to revert this one alone and see if that helps?
>>> A test kernel with commits 0ce3fcaff929 and de3ef1eb1cd0 reverted was
>>> tested.  However, the test kernel still exhibited the bug.
>> So essentially the bisection result cannot be trusted.
>
> We performed some more testing and confirmed just a revert of the
> following commit resolves the bug:
>
> 0847684cfc5f0 ("PCI / PM: Simplify device wakeup settings code")

Thanks for confirming this!

> Can you think of any suggestions to help debug further?

The root cause of the regression is likely the change in
pci_enable_wake() removing the device_may_wakeup() check from it.

Probably, one of the drivers in the platform calls pci_enable_wake()
directly from its ->shutdown() callback and that causes the device to
be set up for system wakeup which in turn causes the power draw while
the system is off to increase.

I would look at the PCI drivers used on that platform to find which of
them call pci_enable_wake() directly from ->shutdown() and I would
make these calls conditional on device_may_wakeup().

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1745646

Title:
  Battery drains when laptop is off  (shutdown)

Status in Linux:
  Unknown
Status in acpi package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  In Progress
Status in acpi source package in Artful:
  New
Status in linux source package in Artful:
  In Progress
Status in acpi source package in Bionic:
  Confirmed
Status in linux source package in Bionic:
  In Progress

Bug description:
  I am using hp AY008tx laptop , and many other laptop users (HP) are also 
facing the same issue . The problem don't occur when i install windows 10 . 
Now, only ubuntu is installed.
  i am using latest bios insyde20 rev 5.(latest)
  WOL disabled and no usb device connected
  checked my battery .
  it don't happen when i remove battery and plug it again after shutdown.
  tried laptop_mode_tools and tpl too

  
  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: linux-image-4.13.0-31-generic 4.13.0-31.34~16.04.1
  ProcVersionSignature: Ubuntu 4.13.0-31.34~16.04.1-generic 4.13.13
  Uname: Linux 4.13.0-31-generic x86_64
  NonfreeKernelModules: wl
  ApportVersion: 2.20.1-0ubuntu2.15
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Fri Jan 26 22:50:53 2018
  InstallationDate: Installed on 2018-01-25 (1 days ago)
  InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 
(20170801)
  SourcePackage: linux-hwe
  UpgradeStatus: No upgrade log present (probably fresh install)
  ---
  ApportVersion: 2.20.1-0ubuntu2.15
  Architecture: amd64
  AudioDevicesInUse:
   USERPID ACCESS COMMAND
   /dev/snd/controlC0:  gopal  2391 F pulseaudio
  DistroRelease: Ubuntu 16.04
  HibernationDevice: 

[Kernel-packages] [Bug 1745646] Re: [Regression] PCI / PM: Simplify device wakeup settings code

2018-04-30 Thread Joseph Salisbury
On 04/16/2018 11:58 AM, Rafael J. Wysocki wrote:
> On Mon, Apr 16, 2018 at 5:31 PM, Joseph Salisbury
>  wrote:
>> On 04/13/2018 05:34 PM, Rafael J. Wysocki wrote:
>>> On Fri, Apr 13, 2018 at 7:56 PM, Joseph Salisbury
>>>  wrote:
 Hi Rafael,

 A kernel bug report was opened against Ubuntu [0].  After a kernel
 bisect, it was found that reverting the following two commits resolved
 this bug:

 0ce3fcaff929 ("PCI / PM: Restore PME Enable after config space 
 restoration")
 0847684cfc5f("PCI / PM: Simplify device wakeup settings code")

 This is a regression introduced in v4.13-rc1 and still exists in
 mainline.  The bug causes the battery to drain when the system is
 powered down and unplugged, which does not happed prior to these two
 commits.
>>> What system and what do you mean by "powered down"?  How much time
>>> does it take for the battery to drain now?
>> By powered down, the bug reporter is saying physically powered off and
>> unplugged.  The system is a HP laptop:
>>
>> dmi.chassis.vendor: HP
>> dmi.product.family: 103C_5335KV HP Notebook
>> dmi.product.name: HP Notebook
>> vendor_id: GenuineIntel
>> cpu family: 6
>>
>>
 The bisect actually pointed to commit de3ef1e, but reverting
 these two commits fixes the issue.

 I was hoping to get your feedback, since you are the patch author.  Do
 you think gathering any additional data will help diagnose this issue,
 or would it be best to submit a revert request?
>>> First, reverting these is not an option or you will break systems
>>> relying on them now.  4.13 is three releases back at this point.
>>>
>>> Second, your issue appears to be related to the suspend/shutdown path
>>> whereas commit 0ce3fcaff929 is mostly about resume, so presumably the
>>> change in pci_enable_wake() causes the problem to happen.  Can you try
>>> to revert this one alone and see if that helps?
>> A test kernel with commits 0ce3fcaff929 and de3ef1eb1cd0 reverted was
>> tested.  However, the test kernel still exhibited the bug.
> So essentially the bisection result cannot be trusted.

We performed some more testing and confirmed just a revert of the
following commit resolves the bug:

0847684cfc5f0 ("PCI / PM: Simplify device wakeup settings code")

Can you think of any suggestions to help debug further?

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1745646

Title:
  Battery drains when laptop is off  (shutdown)

Status in Linux:
  Unknown
Status in acpi package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  In Progress
Status in acpi source package in Artful:
  New
Status in linux source package in Artful:
  In Progress
Status in acpi source package in Bionic:
  Confirmed
Status in linux source package in Bionic:
  In Progress

Bug description:
  I am using hp AY008tx laptop , and many other laptop users (HP) are also 
facing the same issue . The problem don't occur when i install windows 10 . 
Now, only ubuntu is installed.
  i am using latest bios insyde20 rev 5.(latest)
  WOL disabled and no usb device connected
  checked my battery .
  it don't happen when i remove battery and plug it again after shutdown.
  tried laptop_mode_tools and tpl too

  
  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: linux-image-4.13.0-31-generic 4.13.0-31.34~16.04.1
  ProcVersionSignature: Ubuntu 4.13.0-31.34~16.04.1-generic 4.13.13
  Uname: Linux 4.13.0-31-generic x86_64
  NonfreeKernelModules: wl
  ApportVersion: 2.20.1-0ubuntu2.15
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Fri Jan 26 22:50:53 2018
  InstallationDate: Installed on 2018-01-25 (1 days ago)
  InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 
(20170801)
  SourcePackage: linux-hwe
  UpgradeStatus: No upgrade log present (probably fresh install)
  ---
  ApportVersion: 2.20.1-0ubuntu2.15
  Architecture: amd64
  AudioDevicesInUse:
   USERPID ACCESS COMMAND
   /dev/snd/controlC0:  gopal  2391 F pulseaudio
  DistroRelease: Ubuntu 16.04
  HibernationDevice: RESUME=UUID=0bf03973-049c-480e-9e14-7596bf68d994
  InstallationDate: Installed on 2018-01-25 (1 days ago)
  InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 
(20170801)
  Lsusb:
   Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
   Bus 001 Device 003: ID 04f2:b56c Chicony Electronics Co., Ltd
   Bus 001 Device 002: ID 0a5c:216d Broadcom Corp.
   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  MachineType: HP HP Notebook
  NonfreeKernelModules: wl
  Package: linux (not installed)
  ProcEnviron:
   LANGUAGE=en_IN:en
   TERM=xterm-256color
   PATH=(custom, no user)
   LANG=en_IN
   SHELL=/bin/bash
  ProcFB: 0 inteldrmfb
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-31-generic.efi.signed 

[Kernel-packages] [Bug 1745646] Re: [Regression] PCI / PM: Simplify device wakeup settings code

2018-04-16 Thread Rafael J. Wysocki
On Mon, Apr 16, 2018 at 5:31 PM, Joseph Salisbury
 wrote:
> On 04/13/2018 05:34 PM, Rafael J. Wysocki wrote:
>> On Fri, Apr 13, 2018 at 7:56 PM, Joseph Salisbury
>>  wrote:
>>> Hi Rafael,
>>>
>>> A kernel bug report was opened against Ubuntu [0].  After a kernel
>>> bisect, it was found that reverting the following two commits resolved
>>> this bug:
>>>
>>> 0ce3fcaff929 ("PCI / PM: Restore PME Enable after config space restoration")
>>> 0847684cfc5f("PCI / PM: Simplify device wakeup settings code")
>>>
>>> This is a regression introduced in v4.13-rc1 and still exists in
>>> mainline.  The bug causes the battery to drain when the system is
>>> powered down and unplugged, which does not happed prior to these two
>>> commits.
>> What system and what do you mean by "powered down"?  How much time
>> does it take for the battery to drain now?
> By powered down, the bug reporter is saying physically powered off and
> unplugged.  The system is a HP laptop:
>
> dmi.chassis.vendor: HP
> dmi.product.family: 103C_5335KV HP Notebook
> dmi.product.name: HP Notebook
> vendor_id: GenuineIntel
> cpu family: 6
>
>
>>
>>> The bisect actually pointed to commit de3ef1e, but reverting
>>> these two commits fixes the issue.
>>>
>>> I was hoping to get your feedback, since you are the patch author.  Do
>>> you think gathering any additional data will help diagnose this issue,
>>> or would it be best to submit a revert request?
>> First, reverting these is not an option or you will break systems
>> relying on them now.  4.13 is three releases back at this point.
>>
>> Second, your issue appears to be related to the suspend/shutdown path
>> whereas commit 0ce3fcaff929 is mostly about resume, so presumably the
>> change in pci_enable_wake() causes the problem to happen.  Can you try
>> to revert this one alone and see if that helps?
> A test kernel with commits 0ce3fcaff929 and de3ef1eb1cd0 reverted was
> tested.  However, the test kernel still exhibited the bug.

So essentially the bisection result cannot be trusted.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1745646

Title:
  Battery drains when laptop is off  (shutdown)

Status in Linux:
  Unknown
Status in acpi package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  In Progress
Status in acpi source package in Artful:
  New
Status in linux source package in Artful:
  In Progress

Bug description:
  I am using hp AY008tx laptop , and many other laptop users (HP) are also 
facing the same issue . The problem don't occur when i install windows 10 . 
Now, only ubuntu is installed.
  i am using latest bios insyde20 rev 5.(latest)
  WOL disabled and no usb device connected
  checked my battery .
  it don't happen when i remove battery and plug it again after shutdown.
  tried laptop_mode_tools and tpl too

  
  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: linux-image-4.13.0-31-generic 4.13.0-31.34~16.04.1
  ProcVersionSignature: Ubuntu 4.13.0-31.34~16.04.1-generic 4.13.13
  Uname: Linux 4.13.0-31-generic x86_64
  NonfreeKernelModules: wl
  ApportVersion: 2.20.1-0ubuntu2.15
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Fri Jan 26 22:50:53 2018
  InstallationDate: Installed on 2018-01-25 (1 days ago)
  InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 
(20170801)
  SourcePackage: linux-hwe
  UpgradeStatus: No upgrade log present (probably fresh install)
  ---
  ApportVersion: 2.20.1-0ubuntu2.15
  Architecture: amd64
  AudioDevicesInUse:
   USERPID ACCESS COMMAND
   /dev/snd/controlC0:  gopal  2391 F pulseaudio
  DistroRelease: Ubuntu 16.04
  HibernationDevice: RESUME=UUID=0bf03973-049c-480e-9e14-7596bf68d994
  InstallationDate: Installed on 2018-01-25 (1 days ago)
  InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 
(20170801)
  Lsusb:
   Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
   Bus 001 Device 003: ID 04f2:b56c Chicony Electronics Co., Ltd
   Bus 001 Device 002: ID 0a5c:216d Broadcom Corp.
   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  MachineType: HP HP Notebook
  NonfreeKernelModules: wl
  Package: linux (not installed)
  ProcEnviron:
   LANGUAGE=en_IN:en
   TERM=xterm-256color
   PATH=(custom, no user)
   LANG=en_IN
   SHELL=/bin/bash
  ProcFB: 0 inteldrmfb
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-31-generic.efi.signed 
root=UUID=3a4ef59e-130a-4ce0-92d3-2fc42f5c9f59 ro quiet splash vt.handoff=7
  ProcVersionSignature: Ubuntu 4.13.0-31.34~16.04.1-generic 4.13.13
  PulseList:
   Error: command ['pacmd', 'list'] failed with exit code 1: Home directory not 
accessible: Permission denied
   No PulseAudio daemon running, or not running as session daemon.
  RelatedPackageVersions:
   linux-restricted-modules-4.13.0-31-generic N/A
   

[Kernel-packages] [Bug 1745646] Re: [Regression] PCI / PM: Simplify device wakeup settings code

2018-04-16 Thread Joseph Salisbury
On 04/16/2018 11:58 AM, Rafael J. Wysocki wrote:
> On Mon, Apr 16, 2018 at 5:31 PM, Joseph Salisbury
>  wrote:
>> On 04/13/2018 05:34 PM, Rafael J. Wysocki wrote:
>>> On Fri, Apr 13, 2018 at 7:56 PM, Joseph Salisbury
>>>  wrote:
 Hi Rafael,

 A kernel bug report was opened against Ubuntu [0].  After a kernel
 bisect, it was found that reverting the following two commits resolved
 this bug:

 0ce3fcaff929 ("PCI / PM: Restore PME Enable after config space 
 restoration")
 0847684cfc5f("PCI / PM: Simplify device wakeup settings code")

 This is a regression introduced in v4.13-rc1 and still exists in
 mainline.  The bug causes the battery to drain when the system is
 powered down and unplugged, which does not happed prior to these two
 commits.
>>> What system and what do you mean by "powered down"?  How much time
>>> does it take for the battery to drain now?
>> By powered down, the bug reporter is saying physically powered off and
>> unplugged.  The system is a HP laptop:
>>
>> dmi.chassis.vendor: HP
>> dmi.product.family: 103C_5335KV HP Notebook
>> dmi.product.name: HP Notebook
>> vendor_id: GenuineIntel
>> cpu family: 6
>>
>>
 The bisect actually pointed to commit de3ef1e, but reverting
 these two commits fixes the issue.

 I was hoping to get your feedback, since you are the patch author.  Do
 you think gathering any additional data will help diagnose this issue,
 or would it be best to submit a revert request?
>>> First, reverting these is not an option or you will break systems
>>> relying on them now.  4.13 is three releases back at this point.
>>>
>>> Second, your issue appears to be related to the suspend/shutdown path
>>> whereas commit 0ce3fcaff929 is mostly about resume, so presumably the
>>> change in pci_enable_wake() causes the problem to happen.  Can you try
>>> to revert this one alone and see if that helps?
>> A test kernel with commits 0ce3fcaff929 and de3ef1eb1cd0 reverted was
>> tested.  However, the test kernel still exhibited the bug.
> So essentially the bisection result cannot be trusted.
Yes, the bisect results were different than usual.  The bisect reported
commit de3ef1eb1cd0 as the first bad commit.  I could not revet commit
de3ef1eb1cd0 without either back porting  the revert of that commit or
reverting 0ce3fcaff929 first.  However, the bug still happened with
these two reverted.  I needed to revert 0847684cfc5f and 0ce3fcaff929
for the bug to go away.  I reverted 0ce3fcaff929 in this case to also
avoid having to back port the revert of 0847684cfc5f.  I was unsure if
these unexpected results were due to the interaction/dependency between
the commits or due to inaccurate testing by the end user.

I'll build some more test kernels and have the user perform some more
testing to see if the bug can be specifically narrowed down to 0847684cfc5f.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1745646

Title:
  Battery drains when laptop is off  (shutdown)

Status in Linux:
  Unknown
Status in acpi package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  In Progress
Status in acpi source package in Artful:
  New
Status in linux source package in Artful:
  In Progress

Bug description:
  I am using hp AY008tx laptop , and many other laptop users (HP) are also 
facing the same issue . The problem don't occur when i install windows 10 . 
Now, only ubuntu is installed.
  i am using latest bios insyde20 rev 5.(latest)
  WOL disabled and no usb device connected
  checked my battery .
  it don't happen when i remove battery and plug it again after shutdown.
  tried laptop_mode_tools and tpl too

  
  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: linux-image-4.13.0-31-generic 4.13.0-31.34~16.04.1
  ProcVersionSignature: Ubuntu 4.13.0-31.34~16.04.1-generic 4.13.13
  Uname: Linux 4.13.0-31-generic x86_64
  NonfreeKernelModules: wl
  ApportVersion: 2.20.1-0ubuntu2.15
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Fri Jan 26 22:50:53 2018
  InstallationDate: Installed on 2018-01-25 (1 days ago)
  InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 
(20170801)
  SourcePackage: linux-hwe
  UpgradeStatus: No upgrade log present (probably fresh install)
  ---
  ApportVersion: 2.20.1-0ubuntu2.15
  Architecture: amd64
  AudioDevicesInUse:
   USERPID ACCESS COMMAND
   /dev/snd/controlC0:  gopal  2391 F pulseaudio
  DistroRelease: Ubuntu 16.04
  HibernationDevice: RESUME=UUID=0bf03973-049c-480e-9e14-7596bf68d994
  InstallationDate: Installed on 2018-01-25 (1 days ago)
  InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 
(20170801)
  Lsusb:
   Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
   Bus 001 Device 003: ID 04f2:b56c Chicony Electronics Co., Ltd

[Kernel-packages] [Bug 1745646] Re: [Regression] PCI / PM: Simplify device wakeup settings code

2018-04-16 Thread Joseph Salisbury
On 04/13/2018 05:34 PM, Rafael J. Wysocki wrote:
> On Fri, Apr 13, 2018 at 7:56 PM, Joseph Salisbury
>  wrote:
>> Hi Rafael,
>>
>> A kernel bug report was opened against Ubuntu [0].  After a kernel
>> bisect, it was found that reverting the following two commits resolved
>> this bug:
>>
>> 0ce3fcaff929 ("PCI / PM: Restore PME Enable after config space restoration")
>> 0847684cfc5f("PCI / PM: Simplify device wakeup settings code")
>>
>> This is a regression introduced in v4.13-rc1 and still exists in
>> mainline.  The bug causes the battery to drain when the system is
>> powered down and unplugged, which does not happed prior to these two
>> commits.
> What system and what do you mean by "powered down"?  How much time
> does it take for the battery to drain now?
By powered down, the bug reporter is saying physically powered off and
unplugged.  The system is a HP laptop:

dmi.chassis.vendor: HP
dmi.product.family: 103C_5335KV HP Notebook
dmi.product.name: HP Notebook
vendor_id    : GenuineIntel
cpu family    : 6


>
>> The bisect actually pointed to commit de3ef1e, but reverting
>> these two commits fixes the issue.
>>
>> I was hoping to get your feedback, since you are the patch author.  Do
>> you think gathering any additional data will help diagnose this issue,
>> or would it be best to submit a revert request?
> First, reverting these is not an option or you will break systems
> relying on them now.  4.13 is three releases back at this point.
>
> Second, your issue appears to be related to the suspend/shutdown path
> whereas commit 0ce3fcaff929 is mostly about resume, so presumably the
> change in pci_enable_wake() causes the problem to happen.  Can you try
> to revert this one alone and see if that helps?
A test kernel with commits 0ce3fcaff929 and de3ef1eb1cd0 reverted was
tested.  However, the test kernel still exhibited the bug.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1745646

Title:
  Battery drains when laptop is off  (shutdown)

Status in Linux:
  Unknown
Status in acpi package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  In Progress
Status in acpi source package in Artful:
  New
Status in linux source package in Artful:
  In Progress

Bug description:
  I am using hp AY008tx laptop , and many other laptop users (HP) are also 
facing the same issue . The problem don't occur when i install windows 10 . 
Now, only ubuntu is installed.
  i am using latest bios insyde20 rev 5.(latest)
  WOL disabled and no usb device connected
  checked my battery .
  it don't happen when i remove battery and plug it again after shutdown.
  tried laptop_mode_tools and tpl too

  
  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: linux-image-4.13.0-31-generic 4.13.0-31.34~16.04.1
  ProcVersionSignature: Ubuntu 4.13.0-31.34~16.04.1-generic 4.13.13
  Uname: Linux 4.13.0-31-generic x86_64
  NonfreeKernelModules: wl
  ApportVersion: 2.20.1-0ubuntu2.15
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Fri Jan 26 22:50:53 2018
  InstallationDate: Installed on 2018-01-25 (1 days ago)
  InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 
(20170801)
  SourcePackage: linux-hwe
  UpgradeStatus: No upgrade log present (probably fresh install)
  ---
  ApportVersion: 2.20.1-0ubuntu2.15
  Architecture: amd64
  AudioDevicesInUse:
   USERPID ACCESS COMMAND
   /dev/snd/controlC0:  gopal  2391 F pulseaudio
  DistroRelease: Ubuntu 16.04
  HibernationDevice: RESUME=UUID=0bf03973-049c-480e-9e14-7596bf68d994
  InstallationDate: Installed on 2018-01-25 (1 days ago)
  InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 
(20170801)
  Lsusb:
   Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
   Bus 001 Device 003: ID 04f2:b56c Chicony Electronics Co., Ltd
   Bus 001 Device 002: ID 0a5c:216d Broadcom Corp.
   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  MachineType: HP HP Notebook
  NonfreeKernelModules: wl
  Package: linux (not installed)
  ProcEnviron:
   LANGUAGE=en_IN:en
   TERM=xterm-256color
   PATH=(custom, no user)
   LANG=en_IN
   SHELL=/bin/bash
  ProcFB: 0 inteldrmfb
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-31-generic.efi.signed 
root=UUID=3a4ef59e-130a-4ce0-92d3-2fc42f5c9f59 ro quiet splash vt.handoff=7
  ProcVersionSignature: Ubuntu 4.13.0-31.34~16.04.1-generic 4.13.13
  PulseList:
   Error: command ['pacmd', 'list'] failed with exit code 1: Home directory not 
accessible: Permission denied
   No PulseAudio daemon running, or not running as session daemon.
  RelatedPackageVersions:
   linux-restricted-modules-4.13.0-31-generic N/A
   linux-backports-modules-4.13.0-31-generic  N/A
   linux-firmware 1.157.15
  Tags:  xenial
  Uname: Linux 4.13.0-31-generic x86_64
  UpgradeStatus: No upgrade log present (probably fresh install)
  

[Kernel-packages] [Bug 1745646] Re: [Regression] PCI / PM: Simplify device wakeup settings code

2018-04-13 Thread Rafael J. Wysocki
On Fri, Apr 13, 2018 at 7:56 PM, Joseph Salisbury
 wrote:
> Hi Rafael,
>
> A kernel bug report was opened against Ubuntu [0].  After a kernel
> bisect, it was found that reverting the following two commits resolved
> this bug:
>
> 0ce3fcaff929 ("PCI / PM: Restore PME Enable after config space restoration")
> 0847684cfc5f("PCI / PM: Simplify device wakeup settings code")
>
> This is a regression introduced in v4.13-rc1 and still exists in
> mainline.  The bug causes the battery to drain when the system is
> powered down and unplugged, which does not happed prior to these two
> commits.

What system and what do you mean by "powered down"?  How much time
does it take for the battery to drain now?

> The bisect actually pointed to commit de3ef1e, but reverting
> these two commits fixes the issue.
>
> I was hoping to get your feedback, since you are the patch author.  Do
> you think gathering any additional data will help diagnose this issue,
> or would it be best to submit a revert request?

First, reverting these is not an option or you will break systems
relying on them now.  4.13 is three releases back at this point.

Second, your issue appears to be related to the suspend/shutdown path
whereas commit 0ce3fcaff929 is mostly about resume, so presumably the
change in pci_enable_wake() causes the problem to happen.  Can you try
to revert this one alone and see if that helps?

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1745646

Title:
  Battery drains when laptop is off  (shutdown)

Status in Linux:
  Unknown
Status in acpi package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  In Progress
Status in acpi source package in Artful:
  New
Status in linux source package in Artful:
  In Progress

Bug description:
  I am using hp AY008tx laptop , and many other laptop users (HP) are also 
facing the same issue . The problem don't occur when i install windows 10 . 
Now, only ubuntu is installed.
  i am using latest bios insyde20 rev 5.(latest)
  WOL disabled and no usb device connected
  checked my battery .
  it don't happen when i remove battery and plug it again after shutdown.
  tried laptop_mode_tools and tpl too

  
  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: linux-image-4.13.0-31-generic 4.13.0-31.34~16.04.1
  ProcVersionSignature: Ubuntu 4.13.0-31.34~16.04.1-generic 4.13.13
  Uname: Linux 4.13.0-31-generic x86_64
  NonfreeKernelModules: wl
  ApportVersion: 2.20.1-0ubuntu2.15
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Fri Jan 26 22:50:53 2018
  InstallationDate: Installed on 2018-01-25 (1 days ago)
  InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 
(20170801)
  SourcePackage: linux-hwe
  UpgradeStatus: No upgrade log present (probably fresh install)
  ---
  ApportVersion: 2.20.1-0ubuntu2.15
  Architecture: amd64
  AudioDevicesInUse:
   USERPID ACCESS COMMAND
   /dev/snd/controlC0:  gopal  2391 F pulseaudio
  DistroRelease: Ubuntu 16.04
  HibernationDevice: RESUME=UUID=0bf03973-049c-480e-9e14-7596bf68d994
  InstallationDate: Installed on 2018-01-25 (1 days ago)
  InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 
(20170801)
  Lsusb:
   Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
   Bus 001 Device 003: ID 04f2:b56c Chicony Electronics Co., Ltd
   Bus 001 Device 002: ID 0a5c:216d Broadcom Corp.
   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  MachineType: HP HP Notebook
  NonfreeKernelModules: wl
  Package: linux (not installed)
  ProcEnviron:
   LANGUAGE=en_IN:en
   TERM=xterm-256color
   PATH=(custom, no user)
   LANG=en_IN
   SHELL=/bin/bash
  ProcFB: 0 inteldrmfb
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-31-generic.efi.signed 
root=UUID=3a4ef59e-130a-4ce0-92d3-2fc42f5c9f59 ro quiet splash vt.handoff=7
  ProcVersionSignature: Ubuntu 4.13.0-31.34~16.04.1-generic 4.13.13
  PulseList:
   Error: command ['pacmd', 'list'] failed with exit code 1: Home directory not 
accessible: Permission denied
   No PulseAudio daemon running, or not running as session daemon.
  RelatedPackageVersions:
   linux-restricted-modules-4.13.0-31-generic N/A
   linux-backports-modules-4.13.0-31-generic  N/A
   linux-firmware 1.157.15
  Tags:  xenial
  Uname: Linux 4.13.0-31-generic x86_64
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups:

  _MarkForUpload: True
  dmi.bios.date: 11/01/2017
  dmi.bios.vendor: Insyde
  dmi.bios.version: F.40
  dmi.board.asset.tag: Type2 - Board Asset Tag
  dmi.board.name: 81EC
  dmi.board.vendor: HP
  dmi.board.version: 61.58
  dmi.chassis.type: 10
  dmi.chassis.vendor: HP
  dmi.chassis.version: Chassis Version
  dmi.modalias: 
dmi:bvnInsyde:bvrF.40:bd11/01/2017:svnHP:pnHPNotebook:pvrType1ProductConfigId:rvnHP:rn81EC:rvr61.58:cvnHP:ct10:cvrChassisVersion: