Skip to contentSkip to conversation

acpitool - /proc/acpi/wakeup

DISCUSSION Marc Burkhardt 3 participants 10 messages Oct 9, 2014

lore
Share & tools
lore
#0 lore raw

Hi there,
I noticed, that 'acpitool -e' doesn't work any longer sind I upgraded to 3.17. The tool stalls at

Device S-state Status Sysfs node
---------------------------------------

  1. LID          S3    *enabled   platform:PNP0C0D:00
  2. SLPB         S3    *enabled   platform:PNP0C0E:0

Before there were 11 entries shown.

Can I help investigate it?

Thanks,
Marc

Signature · 1 line
Marc Burkhardt
#1 lore raw

* Marc Burkhardt <[email protected]> [2014-10-09 21:04:06 +0200]:

Just another note: the process uses 100% CPU while 'waiting' for further data it seems...

strace shows nothing suspicious.

Thanks,
Marc

Quoted 18 lines

Hi there,
I noticed, that 'acpitool -e' doesn't work any longer sind I upgraded to 3.17. The tool stalls at

Device S-state Status Sysfs node
---------------------------------------

  1. LID          S3    *enabled   platform:PNP0C0D:00
  2. SLPB         S3    *enabled   platform:PNP0C0E:0

Before there were 11 entries shown.

Can I help investigate it?

Thanks,
Marc

Signature · 1 line
Marc Burkhardt
Signature · 1 line
Marc Burkhardt
#2 lore raw
In reply to Marc Burkhardt

Hi,

Quoted 8 lines · Marc Burkhardt

Hi there,
I noticed, that 'acpitool -e' doesn't work any longer sind I upgraded to 3.17. The tool stalls at

Device S-state Status Sysfs node
---------------------------------------

  1. LID          S3    *enabled   platform:PNP0C0D:00
  2. SLPB         S3    *enabled   platform:PNP0C0E:0

I see the same thing.

Frans

#3 lore raw
Quoted 7 lines · Frans Klaver

Hi,

Quoted 4 lines · Marc Burkhardt

Hi there,
I noticed, that 'acpitool -e' doesn't work any longer sind I upgraded to 3.17. The tool stalls at

Quoted 6 lines
Quoted 4 lines

Device S-state Status Sysfs node
---------------------------------------

  1. LID          S3    *enabled   platform:PNP0C0D:00
  2. SLPB         S3    *enabled   platform:PNP0C0E:0

I see the same thing.

With which kernel version did it last work properly for you?

#4 lore raw

I upgraded from 3.10 on that machine. 3.12 didn't work for me due to a hibernation bug. The rest was left out... :/

Thanks,
Marc

Am 9. Oktober 2014 21:31:52 MESZ, schrieb Frans Klaver <[email protected]>:

Quoted 19 lines
Quoted 3 lines · Frans Klaver

Hi,

On Thu, Oct 9, 2014 at 9:04 PM, Marc Burkhardt <[email protected]>

Quoted 2 lines · wrote:
Quoted 2 lines

Hi there,
I noticed, that 'acpitool -e' doesn't work any longer sind I

upgraded to 3.17.

Quoted 8 lines
Quoted 6 lines

The tool stalls at

Device S-state Status Sysfs node
---------------------------------------

  1. LID          S3    *enabled   platform:PNP0C0D:00
  2. SLPB         S3    *enabled   platform:PNP0C0E:0

I see the same thing.

With which kernel version did it last work properly for you?

#5 lore raw

Hi,

Please put your replies below the relevant quote.

Quoted 1 line · Marc Burkhardt

I upgraded from 3.10 on that machine. 3.12 didn't work for me due to a hibernation bug. The rest was left out... :/

If you still have the 3.12 kernel around, could you test if acpitool -e worked there?

#6 lore raw
Quoted 9 lines
Quoted 1 line · Marc Burkhardt

I upgraded from 3.10 on that machine. 3.12 didn't work for me due to

a hibernation bug. The rest was left out... :/

If you still have the 3.12 kernel around, could you test if acpitool -e worked there?

Let me ask you a question: does it make sense to test 3.12 again because you know there's something changed regarding /proc/acpi/... or because it's the kernel I broke up on upgrading?

I could compile one, sure. But I have no time to actually 'bisect' this... unfortunately.

Thanks for your support,
Marc

#7 lore raw
Quoted 11 lines · Marc Burkhardt
Quoted 9 lines
Quoted 1 line · Marc Burkhardt

I upgraded from 3.10 on that machine. 3.12 didn't work for me due to

a hibernation bug. The rest was left out... :/

If you still have the 3.12 kernel around, could you test if acpitool -e worked there?

Let me ask you a question: does it make sense to test 3.12 again because you know there's something changed regarding /proc/acpi/... or because it's the kernel I broke up on upgrading?

Never mind. It broke after 3.14. I'll bisect.

Frans

#8 lore raw
Quoted 6 lines · On Thu, 9 Oct 2014 22:16:11 +0200 Frans Klaver <[email protected]> wrote:
Quoted 5 lines · Marc Burkhardt
Quoted 5 lines
Quoted 1 line · Marc Burkhardt

I upgraded from 3.10 on that machine. 3.12 didn't work for me due to

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines

a hibernation bug. The rest was left out... :/

If you still have the 3.12 kernel around, could you test if acpitool -e worked there?

Let me ask you a question: does it make sense to test 3.12 again because you know there's something changed regarding /proc/acpi/... or because it's the kernel I broke up on upgrading?

Never mind. It broke after 3.14. I'll bisect.

The below patch fixes it for me. Looks like the line sizes changed and some are now exactly the right length to make it loop forever reading /proc/acpi/wakeup:

src/acpitool.cpp +3 -3
@@ -417,7 +417,7 @@ int Do_Fan_Info(int verbose)
 int Show_WakeUp_Devices(int verbose)
 {
     ifstream file_in;
-    char *filename, str[40];
+    char *filename, str[80];
     
     filename = "/proc/acpi/wakeup";
     
@@ -438,13 +438,13 @@ int Show_WakeUp_Devices(int verbose)
     }
     else
     {
-	file_in.getline(str, 40);           // first line are just headers //
+	file_in.getline(str, 80);           // first line are just headers //
 	cout<<"   "<<str<<endl;
 	cout<<"  ---------------------------------------"<<endl;
         int t = 1;
 	while(!file_in.eof())
 	{
-	    file_in.getline(str, 40);
+	    file_in.getline(str, 80);
 	    if (strlen(str)!=0)                     // avoid printing last empty line //
 	    {
 		cout<<"  "<<t<<". "<<str<<endl;
#9 lore raw
Quoted 41 lines · Chuck Ebbert
Quoted 6 lines · On Thu, 9 Oct 2014 22:16:11 +0200 Frans Klaver <[email protected]> wrote:
Quoted 5 lines · Marc Burkhardt
Quoted 5 lines
Quoted 1 line · Marc Burkhardt

I upgraded from 3.10 on that machine. 3.12 didn't work for me due to

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines

a hibernation bug. The rest was left out... :/

If you still have the 3.12 kernel around, could you test if acpitool -e worked there?

Let me ask you a question: does it make sense to test 3.12 again because you know there's something changed regarding /proc/acpi/... or because it's the kernel I broke up on upgrading?

Never mind. It broke after 3.14. I'll bisect.

The below patch fixes it for me. Looks like the line sizes changed and some are now exactly the right length to make it loop forever reading /proc/acpi/wakeup:

src/acpitool.cpp +2 -2
@@ -417,7 +417,7 @@ int Do_Fan_Info(int verbose)
 int Show_WakeUp_Devices(int verbose)
 {
     ifstream file_in;
-    char *filename, str[40];
+    char *filename, str[80];
 
     filename = "/proc/acpi/wakeup";
 
@@ -438,13 +438,13 @@ int Show_WakeUp_Devices(int verbose)
     }
     else
     {
-       file_in.getline(str, 40);           // first line are just headers //
+       file_in.getline(str, 80);           // first line are just headers //

src/acpitool.cpp int Show_WakeUp_Devices(int verbose) · line 450

Quoted 10 lines
src/acpitool.cpp +1 -1
        cout<<"   "<<str<<endl;
        cout<<"  ---------------------------------------"<<endl;
         int t = 1;
        while(!file_in.eof())
        {
-           file_in.getline(str, 40);
+           file_in.getline(str, 80);
            if (strlen(str)!=0)                     // avoid printing last empty line //
            {
                cout<<"  "<<t<<". "<<str<<endl;

Oh my. Why not use the std::string version of getline?

I doubt we should count this as "breaking userspace"..