OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> What Does The On/off Button Do, can I do it from command line
Chero
post Oct 6 2007, 07:12 AM
Post #1





Group: Members
Posts: 1,141
Joined: 22-April 04
From: Belgium
Member No.: 2,962



As the title says,

Can I do the same from command line as if I'd press the power button ?

I have a C1000 with a power button that lets me down every now and then, causing the Z to freeze. It's not debian related, it happens in pdaXrom, Angstrom, debian eabi and titchy. I haven't tried the sharp-rom, but I suppose it would be the same.

I see the screen dropping to a "console" on my C3100, then I see it "stopping tasks" before power turns off. When I use apm --suspend it doesn't do that.
Does anybody know what command/script I have to look for ?

Thanks,
Chero.
Go to the top of the page
 
+Quote Post
jfv
post Oct 6 2007, 07:52 AM
Post #2





Group: Members
Posts: 438
Joined: 24-June 03
Member No.: 202



What works on desktops is:
shutdown -h now
You can try that and see what happens.
Go to the top of the page
 
+Quote Post
Chero
post Oct 6 2007, 08:11 AM
Post #3





Group: Members
Posts: 1,141
Joined: 22-April 04
From: Belgium
Member No.: 2,962



QUOTE(jfv @ Oct 6 2007, 05:52 PM) *
What works on desktops is:
shutdown -h now
You can try that and see what happens.


That also works on my zaurus, but I don't want to shutdown, I want to suspend.

Thanks for the effort anyway,
Chero.
Go to the top of the page
 
+Quote Post
jpmatrix
post Oct 6 2007, 10:33 AM
Post #4





Group: Members
Posts: 1,019
Joined: 15-February 05
From: France
Member No.: 6,477



apparently

apm --suspend

seems to do the job.

apparently there's apm --standby too, i haven't tried.
Go to the top of the page
 
+Quote Post
ZDevil
post Oct 6 2007, 01:23 PM
Post #5





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



So do you mean it is a hardware failure?

It's very straightforward to map the suspend command to a shortcut key to make up for the misbahaving power key. Perhaps modifying the kernel keymap and xmodmap will fix it once and for all?
Go to the top of the page
 
+Quote Post
dlj0
post Oct 6 2007, 06:11 PM
Post #6





Group: Members
Posts: 219
Joined: 3-March 06
Member No.: 9,282



QUOTE(jpmatrix @ Oct 6 2007, 02:33 PM) *
apparently

apm --suspend

seems to do the job.

apparently there's apm --standby too, i haven't tried.


apm --suspend works as advertised. -- standby gives me "invalid argument". apm --help lists it as an option, though.
Go to the top of the page
 
+Quote Post
Chero
post Oct 6 2007, 11:40 PM
Post #7





Group: Members
Posts: 1,141
Joined: 22-April 04
From: Belgium
Member No.: 2,962



QUOTE(ZDevil @ Oct 6 2007, 11:23 PM) *
So do you mean it is a hardware failure?

It's very straightforward to map the suspend command to a shortcut key to make up for the misbahaving power key. Perhaps modifying the kernel keymap and xmodmap will fix it once and for all?


Ok, but first I have to know what the suspend command is.

Check this :
Use the on/off button to suspend, then resume using it again or using the home button. Check dmesg :
stopping tasks...done
restarting tasks...done

Then use apm -s to suspend and resume using the on/off or the home button. Check dmesg :
restarting tasks ... done.

But there is no stopping tasks.
This brings me to my initial question : what does the on/off button do and how can I do it from command line ?

Chero.
Go to the top of the page
 
+Quote Post
ZDevil
post Oct 7 2007, 12:18 AM
Post #8





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



Just a wild guess: What does the /etc/sysconfig/keyboard/kernel.map in your pdaXii setup say about the Power AND the Home buttons?
Go to the top of the page
 
+Quote Post
Chero
post Oct 7 2007, 10:18 PM
Post #9





Group: Members
Posts: 1,141
Joined: 22-April 04
From: Belgium
Member No.: 2,962





I've done a few tests and it seems that apm --suspend does add "stopping tasks ... done" to dmesg, so I guess I'll have to do some more testing and see where it leads me ... .

Thanks for all the answers.
Chero.
Go to the top of the page
 
+Quote Post
ZDevil
post Oct 7 2007, 10:52 PM
Post #10





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



QUOTE(Chero @ Oct 7 2007, 09:40 AM) *
QUOTE(ZDevil @ Oct 6 2007, 11:23 PM) *
So do you mean it is a hardware failure?

It's very straightforward to map the suspend command to a shortcut key to make up for the misbahaving power key. Perhaps modifying the kernel keymap and xmodmap will fix it once and for all?


Ok, but first I have to know what the suspend command is.
...
Chero.

I just wonder if it is possible to remap the Power/Home key to something else, without even knowing the exact command, so as to make the new key function in the same way as Power/Home key.
Go to the top of the page
 
+Quote Post
jpmatrix
post Oct 12 2007, 07:04 AM
Post #11





Group: Members
Posts: 1,019
Joined: 15-February 05
From: France
Member No.: 6,477



i don't know if it is related to this thread, but i notice some battery draining while the zaurus is suspended.
am i the only one ? perhaps my zaurus battery is beginning to be a little old, i've never changed it since i've bought my C3000 smile.gif
Go to the top of the page
 
+Quote Post
ZDevil
post Oct 12 2007, 01:40 PM
Post #12





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



Can't tell yet.
The day before yesterday my 3200 was busy compiling things busily without any external power source. I checked after three hours of compilation and the bettery went down from 9x% to 50%.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th November 2014 - 02:58 PM