CPUstress image: Power button behavior (opinions please)

Discussion/announcements about test/beta releases of UBCD will be posted here.

Moderators: Icecube, StopSpazzing

Post Reply
Message
Author
Explorer09
Posts: 178
Joined: Fri Jun 17, 2011 11:23 pm

CPUstress image: Power button behavior (opinions please)

#1 Post by Explorer09 » Thu Dec 18, 2014 10:14 pm

Hello everyone who uses CPUstress image in UBCD for stress testing.

I'm planning to build a next version of this image, with an updated Linux kernel and stress programs. For now, I face a small question about the power button behavior in it. Currently, pressing power button in CPUstress does nothing. It won't do software shutdown or hard shutdown either. I would like to fix it in the next version, but I'm not sure which behavior is better. So I would like to see people who does use these stress tools to give me some opinions.

Do you prefer software shutdown or hard shutdown when you press the power button in CPUstress?

Hard shutdown:
- Kernel is slightly smaller. No need to compile ACPI power button driver or acpid.
- Same behavior as in original, CPUstress image from Icecube.
- Con: I'm not sure if pressing power button during middle of mprime test is good for CPU... (There won't be hard disk damage, though.)

Software shutdown:
- Will need ACPI power button driver, acpid, and configuration.
- Will be same as typing poweroff in the shell.
- If a PC has a reset button, it will still be a hard reset, though.

Or, keep the current behavior (do nothing).

Opinions, please.

Victor Chew
Posts: 1368
Joined: Mon Feb 21, 2005 10:59 pm
Contact:

Re: CPUstress image: Power button behavior (opinions please)

#2 Post by Victor Chew » Fri Dec 19, 2014 5:05 pm

I am not a "heavy" user of CPUStress. I have only used it a handful of times helping friends burn-in their newly acquired desktops.

I actually prefer the current no-action behaviour. Reason is because it is very easy to accidentally press the power button, especially if you have kids in the house. I feel the reset button or the switch on the PSU are good enough options if something gets stuck.

That's just my opinion.

Explorer09
Posts: 178
Joined: Fri Jun 17, 2011 11:23 pm

Re: CPUstress image: Power button behavior (opinions please)

#3 Post by Explorer09 » Fri Dec 19, 2014 6:35 pm

Victor Chew wrote:I actually prefer the current no-action behaviour. Reason is because it is very easy to accidentally press the power button, especially if you have kids in the house. I feel the reset button or the switch on the PSU are good enough options if something gets stuck.

That's just my opinion.
I actually thinks the current no-action behavior is a bug. It's because I have the power button driver compiled in the kernel, but don't have any ACPI event handling for it. (I need ACPI support simply because the multiprocessing of my laptop wouldn't work without it.)

For now I am thinking about a case when someone leaves his computer on stress-testing while he's away, then his mother wants the computer off so she presses the power button which does nothing. I guess after that she'll unplug the power cord directly.

I simply believe the power button have to do something; there's no reason to keep a PC on when someone presses it. Ideally most operating systems will do a soft shutdown, suspend, or "wait for N seconds for user to cancel before soft shutdown". It should be one of the three. I didn't think of any use case of kids accidentally pressing it that can matter. Kid can accidentally press Reset (which is always a hard reset) the same way, or accidentally unplug the power cord.

I'm waiting for more opinions before I make the decision here.

The Piney
Posts: 370
Joined: Mon Apr 30, 2007 11:06 am
Location: FL

Re: CPUstress image: Power button behavior (opinions please)

#4 Post by The Piney » Sat Dec 20, 2014 3:10 pm

If your going to enable it, either way works for me but I do usually shut down after doing burn-in testing. Could you enable a popup that offered both options and a cancel? To be honest, I haven't used CPUstress in quite a while.

Explorer09
Posts: 178
Joined: Fri Jun 17, 2011 11:23 pm

Re: CPUstress image: Power button behavior (opinions please)

#5 Post by Explorer09 » Sat Dec 20, 2014 7:44 pm

The Piney wrote:If your going to enable it, either way works for me but I do usually shut down after doing burn-in testing. Could you enable a popup that offered both options and a cancel? To be honest, I haven't used CPUstress in quite a while.
Providing options and a way for users to cancel will be an overkill. The user can stop any test at any time with a Ctrl+C, and it won't take her seconds to turn on the monitor, type 'poweroff' and press Enter. I would prefer simplicity here. Either soft poweroff, hard poweroff, or do nothing at all.

And I don't believe popping up a message during middle of a test is a good thing. Imagine when you run CPU Burn-in:

Code: Select all

100000 iterations complete.
105000 iterations complete.
105000 iterations complete.
110000 iterations complete.
110000 iterations complete.
Power button pressed. Press <ENTER> for a soft poweroff, or <ESC> to cancel.
115000 iterations complete.
115000 iterations complete.
120000 iterations complete.
120000 iterations complete.
125000 iterations complete.
125000 iterations complete.
130000 iterations complete.
130000 iterations complete.
135000 iterations complete.
135000 iterations complete.
140000 iterations complete.
140000 iterations complete.
145000 iterations complete.
145000 iterations complete.
150000 iterations complete.
150000 iterations complete.
155000 iterations complete.
155000 iterations complete.
_
The message can get ignored easily.

Victor Chew
Posts: 1368
Joined: Mon Feb 21, 2005 10:59 pm
Contact:

Re: CPUstress image: Power button behavior (opinions please)

#6 Post by Victor Chew » Sat Dec 20, 2014 9:21 pm

Like I said, it's just me. I actually set the power button on my laptop to no-op. :D No choice. Three little monsters around the house.

But if you feel it absolutely has to do something, I think a proper power-down is the correct thing to do, since that's what a normal user would expect.

Explorer09
Posts: 178
Joined: Fri Jun 17, 2011 11:23 pm

Re: CPUstress image: Power button behavior (opinions please)

#7 Post by Explorer09 » Sat Dec 20, 2014 11:36 pm

Just for your information, the FDUBCD doesn't support ACPI power button, and on my laptop, pressing the button in FDUBCD will go hard poweroff.

It seems that most BIOSes allows you to configure the power button behavior to either go suspend or instant-off (look at the screenshots I google'd). Too bad my laptop doesn't have this option. :( And interestingly there's no "do nothing" choice that I previously expect.

Post Reply