Puppy Unexpected Sleep Mode

Booting, installing, newbie
Post Reply
Message
Author
johnmichaelreed
Posts: 11
Joined: Thu 04 Jul 2013, 02:09

Puppy Unexpected Sleep Mode

#1 Post by johnmichaelreed »

Dear Puppy Linux Users,

I noticed something funny with my HP Pavilion dv4. First note that the new Slacko puppy 5.5 is my only OS right now and it's been recently installed via CD-ROM, so everything is at its defaults. Normally, my laptop NEVER goes into sleep mode with Slacko 5.5. If I leave it alone for 30 minutes or close the lid, the screen goes black, but the fan keeps going. Now, I thought that there was no way, without downloading any additional software, to make my laptop go into full sleep mode, with no audible sound coming from the fan. Then the funny thing happened.

I tried adjusting the screen brightness after I had opened the lid, and lo and behold the laptop went into full sleep mode. I pressed the space bar and then I could hear the fan rev again. Then I tried pressing fn + f7, the combination of keys that decreases the screen brightness. No sleep mode. I closed the lid, saw the screen go black, and then opened the lid again. The screen lit up again. I tried pressing fn + f7 after opening the lid. Like magic, the computer went into sleep mode. Move the mouse, sleep mode ends. Close laptop, open laptop, dim display, then sleep mode starts. How unexpected. The key with the picture of a crescent moon on it, the one that I would expect to be associated with sleep, is the f5 key, but that key doesn't appear to do anything. Odd.

Is Slacko Puppy 5.5 supposed to do that? Did I discover some sort of a bug or Easter egg? Does the close lid, open lid, fn + f7 sleep trick only work on my HP Pavilion dv4 2170us with the i5 processor? Does it work on your laptop too? I'm so curious.

johnmichaelreed
Posts: 11
Joined: Thu 04 Jul 2013, 02:09

More info: F8, increase brightness also activates sleep

#2 Post by johnmichaelreed »

Also, the button that increases brightness, f8, also triggers sleep mode just as the button that decreases brightness, f7, did before. I tried the close lid, open lid thing with a few other buttons like f9 and f6, but for now it appears to only be f7 and f8 that unexpectedly activate sleep mode.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#3 Post by Karl Godt »

Just rough : All keyboard keys have values somewhere .

It is very likely that there aren't standards in the different keyboard language layouts .

I guess it is in /etc/acpi folder or /etc/acpi.conf written what the acpid should do if it receives a key press of some kind .

I would killall acpid , run xev from the terminal and try to find out the values xev shows when pressing a key and look for matching entries in the /etc/acpi/* scripts .

This for example is the /etc/acpi/keys file from LighthousePup-503 ( which I could not get to boot so far for Puppy.sfs file not found ) :

Code: Select all

#to find out hotkeys for your machine
#run acpid -d -l
#to see acpi debugging output
# Karl Godt 2013-07-29 : 
# mkdir /etc/acpi_empty
# touch /etc/acpi_empty/acpid.conf
# acpid -d -l -c /etc/acpi_empty
  
rfkill='0000001[01]'
brightness='0000002?'
vgaswitch='0000003[012]'
backlightoff='00000016'
screenrez='00000038'
powermode='00000039'
taskman='00000012'
mute='00000013'
voldown='00000014'
volup='00000015'
touchpad='00000037'
acoff='00000051'
acon='00000050'
cmd1='0000001a'
cmd2='0000001b'
cmd3='0000001c'
cmd4='0000001d'
Since they are fixed it is likely that your keyboard layout is non-standard en_US .

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#4 Post by Karl Godt »

I have played around a little with the evtest binary found on the regular acpid (2) sourceforge.net page .
It is quite useful to find out some info about the /dev/input/DEVICES :

Code: Select all

for i in /dev/input/* ; do  echo $i; [ -c $i ] || continue; ./evtest $i &  sleep 1 ; killall evtest ;done
/dev/input/event4
[4] 13455
Input driver version is 1.0.0
Input device ID: bus 0x3 vendor 0x413c product 0x2010 version 0x110
Input device name: "Dell Dell USB Keyboard"
Supported events:
Event type 0 (Sync)
Event type 1 (Key)
Event code 113 (Mute)
Event code 114 (VolumeDown)
Event code 115 (VolumeUp)
Event code 128 (Stop)
Event code 140 (Calc)
Event code 142 (Sleep)
Event code 144 (File)
Event code 155 (Mail)
Event code 158 (Back)
Event code 159 (Forward)
Event code 163 (NextSong)
Event code 164 (PlayPause)
Event code 165 (PreviousSong)
Event code 166 (StopCD)
Event code 171 (Config)
Event code 172 (HomePage)
Event code 173 (Refresh)
Event type 3 (Absolute)
Event code 32 (Volume)
Value 0
Min -24
Max 24
Event type 4 (Misc)
Event code 4 (ScanCode)
Testing ... (interrupt to exit)
[3] Terminated ./evtest $i
/dev/input/event5
[5] 13533
Input driver version is 1.0.0
Input device ID: bus 0x3 vendor 0x4fc product 0x538 version 0x110
Input device name: "MLK Trust Mouse 16536"
and to determine which event device to poll for input .

Here is some interesting codeby SFR for polling /dev/input/* : http://murga-linux.com/puppy/viewtopic. ... 491#702491
Attachments
evtest.bz2
(6.17 KiB) Downloaded 141 times

johnmichaelreed
Posts: 11
Joined: Thu 04 Jul 2013, 02:09

Why does it only work after closing and opening the screen?

#5 Post by johnmichaelreed »

So let's just say that (fn + f7) or (fn + f8) sends some numerical signal that tells the computer to go into sleep mode. Why does sleep mode only happen after closing and opening the lid (after making the screen go black)? If I type or click something and then press (fn + f7), all the computer does is reduces the brightness - no sleep mode.

Post Reply