Chromebook Power Button Warning Script? (Solved)

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
vtpup
Posts: 707
Joined: Sat Aug 15, 2020 2:34 pm
Location: Republic of Vermont
Has thanked: 178 times
Been thanked: 152 times
Contact:

Chromebook Power Button Warning Script? (Solved)

Post by vtpup »

My daughter has permission to run an Acer C720 Chromebook stripped of ChromeOS and running Bionic64 in High School as an experiment. Everyone else is running ChromeOS.

It's working extremely well except for one idiosyncracy of the Acer C720 keyboard layout. Unfortunately the Power button is identical to the function keys in the top row of the keyboard and located just above the Backspace key on the far right side. It isn't recessed. It is very easy to accidentally hit this button and shut down the computer. This has happened when taking remote Zoom classes, and causes big interruptions and missed instruction.

On my laptop in Tahr32, if I hit the power button, I get a warning message that the computer will shut down in X seconds, and asks do I want to continue, or cancel shutdown?

Is this warning script possible for me to add to her Bionic64 Acer C720? Where would I look to make the change?

Or, as an alternative, can the power button be ignored, unless pressed for 30 seconds for an emergency reboot? That actually seems preferable, as otherwise she (and we all normally) shut down through the normal Puppy process.

Thanks!
Last edited by vtpup on Tue Sep 29, 2020 3:36 am, edited 1 time in total.

HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64

My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg

User avatar
bigpup
Moderator
Posts: 6468
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 778 times
Been thanked: 1337 times

Re: Chromebook Power Button Warning Script?

Post by bigpup »

Chromebooks are in their own world of computers.
So they are a little strange in how they work.

I have Bionicpup64 8.0 installed on a HP Chromebook.
I have it fully updated by using Quickpet->Info->Bionicpup updates

if I hit the power button, I get a warning message that the computer will shut down in X seconds, and asks do I want to continue, or cancel shutdown?

So, the needed stuff is in Bionicpup64 8.0.

Have you done Quickpet->Info->Bionicpup updates?
Saved and rebooted so the new changes are now being used?
There are a couple of fixes that may affect getting this power button warning.

Also some good info here about using Puppy on Chromebooks:
viewtopic.php?f=85&t=431

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

williams2
Posts: 1028
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 293 times

Re: Chromebook Power Button Warning Script?

Post by williams2 »

That seems to be /etc/acpi/actions/powerbtn.sh

You could try editing that file and add the line "exit" near the top of the file.

That is, change this:

Code: Select all

#20140621 shinobar: skip shutdownconfig when power button pressed before quicksetup done, avoid multiple run

TIMELIMIT=30	# sec, no dialog if 0(zero).
to this:

Code: Select all

#20140621 shinobar: skip shutdownconfig when power button pressed before quicksetup done, avoid multiple run

exit 
TIMELIMIT=30	# sec, no dialog if 0(zero).
User avatar
vtpup
Posts: 707
Joined: Sat Aug 15, 2020 2:34 pm
Location: Republic of Vermont
Has thanked: 178 times
Been thanked: 152 times
Contact:

Re: Chromebook Power Button Warning Script?

Post by vtpup »

Yup, Bigpup, I contributed a large part of the information in that thread on the old forum, now no longer visible. Particularly the audio and Acer R11 and C720 work. Yes, I have naturally updated those installs, and the fact that your HP Chromebook which isn't a C720 doesn't have the problem is understandable, but doesn't solve this particular problem.


l
bigpup wrote: Mon Sep 28, 2020 6:18 pm Chromebooks are in their own world of computers.
So they are a little strange in how they work.

I have Bionicpup64 8.0 installed on a HP Chromebook.
I have it fully updated by using Quickpet->Info->Bionicpup updates

if I hit the power button, I get a warning message that the computer will shut down in X seconds, and asks do I want to continue, or cancel shutdown?

So, the needed stuff is in Bionicpup64 8.0.

Have you done Quickpet->Info->Bionicpup updates?
Saved and rebooted so the new changes are now being used?
There are a couple of fixes that may affect getting this power button warning.

Also some good info here about using Puppy on Chromebooks:
viewtopic.php?f=85&t=431

HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64

My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg

User avatar
vtpup
Posts: 707
Joined: Sat Aug 15, 2020 2:34 pm
Location: Republic of Vermont
Has thanked: 178 times
Been thanked: 152 times
Contact:

Re: Chromebook Power Button Warning Script?

Post by vtpup »

Thanks williams2. I'll try it.
williams2 wrote: Mon Sep 28, 2020 11:19 pm That seems to be /etc/acpi/actions/powerbtn.sh

You could try editing that file and add the line "exit" near the top of the file.

That is, change this:

Code: Select all

#20140621 shinobar: skip shutdownconfig when power button pressed before quicksetup done, avoid multiple run

TIMELIMIT=30	# sec, no dialog if 0(zero).
to this:

Code: Select all

#20140621 shinobar: skip shutdownconfig when power button pressed before quicksetup done, avoid multiple run

exit 
TIMELIMIT=30	# sec, no dialog if 0(zero).

HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64

My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg

User avatar
vtpup
Posts: 707
Joined: Sat Aug 15, 2020 2:34 pm
Location: Republic of Vermont
Has thanked: 178 times
Been thanked: 152 times
Contact:

Re: Chromebook Power Button Warning Script?

Post by vtpup »

Thanks again williams2, that works perfectly.

If I hit the power button for a short press nothing happens. If I hold it down for 30 seconds the computer shuts down (emergency use only). Problem solved!

One other question: when I open the screen of the c720, it automatically starts up the OS.

If the computer top is accidentally jostled the OS can start up even while screen remains closed and eventually run the battery down, and exiting uncleanly. Likewise if you open the case for some other reason and don't want a start, you have to enter password and wait for the full startup to finish, then go through the shutdown process, a pain in the neck.

I think the power button should be the only way to start the computer. It works fine for that, even though we modified its power-off function above. Is there a simple way to defeat the open-case start-up? Or is that something controlled by bios.

HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64

My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg

williams2
Posts: 1028
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 293 times

Re: SOLVED: Chromebook Power Button Warning Script?

Post by williams2 »

If the computer is truly, completely shut down, the operating system not running, not suspended, then yes, that would probably be in the bios.

You can disable suspend when the lid is closed.
Edit /etc/acpi/acpi.conf and unccomment the DISABLE_SUSPEND line,
that is, change this:
#DISABLE_SUSPEND='yes'
to this:
DISABLE_SUSPEND='yes'

Then if you close the lid, nothing would happen, Puppy would keep running and ignore the lid.

Probably not something you would want to do.
User avatar
bigpup
Moderator
Posts: 6468
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 778 times
Been thanked: 1337 times

Re: SOLVED: Chromebook Power Button Warning Script?

Post by bigpup »

vtpup wrote:Yup, Bigpup, I contributed a large part of the information in that thread on the old forum, now no longer visible. Particularly the audio and Acer R11 and C720 work.
well, I just carried over the final info posts from the old forum.
Please, if you know something I missed, ,make a post in the topic.
viewtopic.php?f=85&t=431

I am trying to get stuff posted in this forum and not have to only be able to provide links to the old forum, that may go away soon.

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
vtpup
Posts: 707
Joined: Sat Aug 15, 2020 2:34 pm
Location: Republic of Vermont
Has thanked: 178 times
Been thanked: 152 times
Contact:

Re: SOLVED: Chromebook Power Button Warning Script?

Post by vtpup »

Thanks williams2 and Bigpup. Bigpup, I'll check. Willams, no, suspend on close is a good thing. But thanks for the suggestion!

Out of curiosity, I wrote to Mr Chromebox (the provider of firmware mods for Chromebooks to allow booting alternate OS's) about the lid closing question, in case he knew of a Bios feature. To my surprise he wrote back that it would have to be a change in firmware source, but that he would do a build specifically for my c720 that defeated the lid opening start-up behavior.

HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64

My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg

User avatar
bigpup
Moderator
Posts: 6468
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 778 times
Been thanked: 1337 times

Re: SOLVED: Chromebook Power Button Warning Script?

Post by bigpup »

My Chromebook does the same thing with the lid switch.

On it, when the lid switch starts the power on. I can click the power button and it instantly powers off.
So that stops it, before it actually starts to boot.

That would be great if Mrchromebox.tech could put some setting options in it's bios firmware replacement.
I looked in mine and all it now offers is settings for the boot loader.
If the computer top is accidentally jostled the OS can start up even while screen remains closed
That should not happen.
For the lid switch to activate the lid should have to be opened at minimum 1/4 of the way.

This is a magnetic switch.
Maybe the switch is loose in it's mount or slightly stuck or misaligned.
Well, it could be going bad.

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
vtpup
Posts: 707
Joined: Sat Aug 15, 2020 2:34 pm
Location: Republic of Vermont
Has thanked: 178 times
Been thanked: 152 times
Contact:

Re: SOLVED: Chromebook Power Button Warning Script?

Post by vtpup »

I don't know how far the lid was opened -- "jostled" was shorthand for posting purposes, but we have had occasions at home here with two separate c720s where the computer started inadvertently and ran the battery out without noticing it.

I like to set any timed startup delay to minimal -- that's a time saving convenience I appreciate every day when working. But it allows scant time to abort an unwanted lid-switch start. A lid-switch itself saves me no appreciable time. Having to set a startup delay to accommodate that is counterproductive.

Pushing a normally functioning power button is not a dreaded task for me, and allows my choice, instead of forcing me to react quickly to abort something. Cleaning keys, cleaning screen, there are plenty of reasons to open a laptop without having to start it.

re MrChromebox: he only mentioned disabling the feature permanently, and only for a build for my c720, since I'm probably the only backwards thinking curmudgeon who dislikes the lid-power action. :evil:

HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64

My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg

User avatar
bigpup
Moderator
Posts: 6468
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 778 times
Been thanked: 1337 times

Re: Chromebook Power Button Warning Script? (Solved)

Post by bigpup »

I have a feeling what MrChromebox comes up with will probably also work on my HP Chromebook.

Wonder what just unhooking the wires to the switch would do :idea:

I have one laptop that only boots by pressing the power button.
One laptop that boots by just opening the lid. But it never just starts unless the lid is opened 1/4 or more.
Ii is kind of a hard thing as to which I like better.

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

proebler
Posts: 83
Joined: Sun Aug 23, 2020 6:48 am
Location: AU-TAS
Been thanked: 21 times

Re: SOLVED: Chromebook Power Button Warning Script?

Post by proebler »

I don't know how far the lid was opened -- "jostled" was shorthand for posting purposes, but we have had occasions at home here with two separate c720s where the computer started inadvertently and ran the battery out without noticing it.
I have had the same experience with the c720 and now handle it accordingly.
Probably it is how Acer designed it. Also to watch, is that it boots up when the power adapter is connected and turned on.
Post Reply

Return to “Users”