Bom...estava tudo as mil maravilhas com o ubuntu ate a atualização de algum pacote ou o proprio kernel e a suspensao nao funciona como deveria....as vezes suspende.....e fica suspenso e as vezes suspende e trava e fica tela preta** e as vezes suspende mas volta logo em seguida! Cabuloso isso!!
As vezes eu quero ficar deitado escutando alguma musica,documentario e deixo o computador ligado e agendo para que fique 2 horas por exemplo e depois suspenda;
sudo su
sleep 6600 ; /usr/sbin/pm-suspend
e ok, estava funcionando como descrito nesse topico, suspendia com o comando adicionado la no grub....agora depois da atualização do kernel voltou o problema novamente!!! resolvi olhar mais a fundo!!!
Pesquisei alguns sites e treads
https://wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernateolha que interessante;
Instantaneous wakeups from suspend
For some Intel Haswell systems with the LynxPoint and LynxPoint-LP chipset, instantaneous wakeups after suspend are reported. They are linked to erroneous BIOS ACPI implementations and how the xhci_hcd module interprets it during boot. As a work-around reported affected systems are added to a blacklist (named XHCI_SPURIOUS_WAKEUP) by the kernel case-by-case.[1]
Instantaneous resume may happen, for example, if a USB device is plugged during suspend and ACPI wakeup triggers are enabled. A viable work-around for such a system, if it is not on the blacklist yet, is to disable the wakeup triggers. An example to disable wakeup through USB is described as follows.[2]
To view the current configuration:
$ cat /proc/acpi/wakeup
Device S-state Status Sysfs node
...
EHC1 S3 *enabled pci:0000:00:1d.0
EHC2 S3 *enabled pci:0000:00:1a.0
XHC S3 *enabled pci:0000:00:14.0
...
The relevant devices are EHC1, EHC1 and XHC (for USB 3.0). To toggle their state you have to echo the device name to the file as root.
# echo EHC1 > /proc/acpi/wakeup
# echo EHC2 > /proc/acpi/wakeup
# echo XHC > /proc/acpi/wakeup
This should result in suspension working again. However, this settings are only temporary and would have to be set at every reboot. To automate this take a look at systemd#Writing unit files. See BBS thread for a possible solution and more information.
Ao que parece e que o gerenciamento de energia nao deixa o sistema entrar em suspensao, olhando nos logs do sistema o kernel esta fazendo tudo certo**
Nov 8 00:41:09 H97N-WIFI kernel: [ 761.746652] PM: Syncing filesystems ... done.
Nov 8 00:41:09 H97N-WIFI kernel: [ 761.749235] PM: Preparing system for sleep (mem)
Nov 8 00:41:09 H97N-WIFI kernel: [ 761.749661] Freezing user space processes ... (elapsed 0.001 seconds) done.
Nov 8 00:41:09 H97N-WIFI kernel: [ 761.751579] Double checking all user space processes after OOM killer disable... (elapsed 0.000 seconds)
Nov 8 00:41:09 H97N-WIFI kernel: [ 761.751674] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Nov 8 00:41:09 H97N-WIFI kernel: [ 761.752907] PM: Suspending system (mem)
Nov 8 00:41:09 H97N-WIFI kernel: [ 761.752934] Suspending console(s) (use no_console_suspend to debug)
Nov 8 00:41:09 H97N-WIFI kernel: [ 761.753068] wlp4s0: deauthenticating from 48:83:c7:97:93:32 by local choice (Reason: 3=DEAUTH_LEAVING)
Nov 8 00:41:09 H97N-WIFI kernel: [ 761.753247] sd 1:0:0:0: [sdb] Synchronizing SCSI cache
Nov 8 00:41:09 H97N-WIFI kernel: [ 761.753357] sd 1:0:0:0: [sdb] Stopping disk
Nov 8 00:41:09 H97N-WIFI kernel: [ 761.753450] serial 00:05: disabled
Nov 8 00:41:09 H97N-WIFI kernel: [ 761.753605] sd 0:0:0:0: [sda] Synchronizing SCSI cache
Nov 8 00:41:09 H97N-WIFI kernel: [ 761.753909] e1000e: EEE TX LPI TIMER: 00000011
Nov 8 00:41:09 H97N-WIFI kernel: [ 761.756062] sd 0:0:0:0: [sda] Stopping disk
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.248981] PM: suspend of devices complete after 495.855 msecs
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.249240] PM: late suspend of devices complete after 0.256 msecs
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.249753] e1000e 0000:00:19.0: System wakeup enabled by ACPI
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.261340] PM: noirq suspend of devices complete after 12.096 msecs
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.261509] ACPI: Preparing to enter system sleep state S3
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.261794] PM: Saving platform NVS memory
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.261804] Disabling non-boot CPUs ...
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.271121] Broke affinity for irq 30
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.272144] smpboot: CPU 1 is now offline
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.288088] Broke affinity for irq 23
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.288091] Broke affinity for irq 28
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.288093] Broke affinity for irq 30
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.288094] Broke affinity for irq 33
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.289284] smpboot: CPU 2 is now offline
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.300066] Broke affinity for irq 16
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.300069] Broke affinity for irq 23
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.300072] Broke affinity for irq 28
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.300073] Broke affinity for irq 30
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.300074] Broke affinity for irq 33
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.300074] Broke affinity for irq 34
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.301087] smpboot: CPU 3 is now offline
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.310036] ACPI: Low-level resume complete
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.310078] PM: Restoring platform NVS memory
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.311975] Enabling non-boot CPUs ...
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.321266] x86: Booting SMP configuration:
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.321267] smpboot: Booting Node 0 Processor 1 APIC 0x2
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.324564] cache: parent cpu1 should not be sleeping
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.324718] CPU1 is up
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.335287] smpboot: Booting Node 0 Processor 2 APIC 0x1
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.337629] cache: parent cpu2 should not be sleeping
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.337762] CPU2 is up
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.347259] smpboot: Booting Node 0 Processor 3 APIC 0x3
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.349676] cache: parent cpu3 should not be sleeping
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.349819] CPU3 is up
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.352124] ACPI: Waking up from system sleep state S3
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.365279] PM: noirq resume of devices complete after 12.567 msecs
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.365821] PM: early resume of devices complete after 0.517 msecs
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.365955] e1000e 0000:00:19.0: System wakeup disabled by ACPI
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.366029] rtc_cmos 00:02: System wakeup disabled by ACPI
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.366920] serial 00:05: activated
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.369244] sd 0:0:0:0: [sda] Starting disk
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.370247] sd 1:0:0:0: [sdb] Starting disk
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.371274] iwlwifi 0000:04:00.0: L1 Disabled - LTR Enabled
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.371501] iwlwifi 0000:04:00.0: L1 Disabled - LTR Enabled
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.568480] iwlwifi 0000:04:00.0: L1 Disabled - LTR Enabled
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.568712] iwlwifi 0000:04:00.0: L1 Disabled - LTR Enabled
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.673260] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.703732] ata1.00: configured for UDMA/133
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.732512] PM: resume of devices complete after 366.637 msecs
Nov 8 00:41:09 H97N-WIFI kernel: [ 762.732720] PM: Finishing wakeup.
**kernel 4.8 e kernel padrao ubuntu mais antigo, mesmo problema
mas olhando na acpi;
cat /proc/acpi/wakeup
GLAN S4 *enabled pci:0000:00:19.0
EHC1 S4 *enabled pci:0000:00:1d.0
EHC2 S4 *enabled pci:0000:00:1a.0
XHC S4 *enabled pci:0000:00:14.0
PWRB S3 *enabled
esses dispositivos nao deixam entrar em suspensao pelo que entendi, tentei entao desligando todos e funciona bem a suspensao.......
echo EHC1 > /proc/acpi/wakeup
Entao encontrei esse script em
https://bbs.archlinux.org/viewtopic.php?pid=1575617#p1575617 mensagem do usiario Bernie99;
--------------------------------------------------------------------------------------------------------------------------------------------------
Of course, the triggers can be explicitly enabled or disabled by first checking the current status.
An example script to do this would be e.g.:
---- disable_acpi_wakeup.sh
#! /usr/bin/sh
# Add your candidates below but make sure that no pattern matches more than one device in /proc/acpi/wakeup
CANDIDATES="EHC1 EHC2 XHC"
for ACPIDEV in $CANDIDATES; do
ACTIVE=$(grep enabled /proc/acpi/wakeup | cut -f 1 | grep "$ACPIDEV")
if [ -n "$ACTIVE" ]; then
echo "$ACTIVE" > /proc/acpi/wakeup
echo "DEBUG: disabled -$ACTIVE-" >&2
else
echo "DEBUG: no active -$ACPIDEV- found." >&2
fi
done
I have similar issues with a Lenovo ThinkPad Yoga S1, on which only the XHC trigger exists, and causes wakeup issues. I have no EHC1/2.
I know UNIX but am a newbie to Arch (actually the Manjaro spinoff; I hope the forum tolerates).
Therefore I am not sure where the script above would be best placed to run with each startup.
Any idea?
--------------------------------------------------------------------------------------------------------------------
Fiz uma modificação para adicionar o PWRB e GLAN tbm, coloquei o script esta em /etc/cron/hourly(nao sei se e mais adequado, mas fica por enquanto) -
disable_acpi_wakeup.sh
#!/bin/sh
# Add your candidates below but make sure that no pattern matches more than one device in /proc/acpi/wakeup
CANDIDATES="EHC1 EHC2 XHC GLAN PWRB"
for ACPIDEV in $CANDIDATES; do
ACTIVE=$(grep enabled /proc/acpi/wakeup | cut -f 1 | grep "$ACPIDEV")
if [ -n "$ACTIVE" ]; then
echo "$ACTIVE" > /proc/acpi/wakeup
echo "DEBUG: disabled -$ACTIVE-" >&2
else
echo "DEBUG: no active -$ACPIDEV- found." >&2
fi
doneEsta colocado para ser executado no /etc/rc.local.
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/etc/cron.hourly/disable_acpi_wakeup.sh
exit 0
aparentemente funcionou nao sei as consequencias disso no sistema!!!!
platao@H97N-WIFI:~$ cat /proc/acpi/wakeup
Device S-state Status Sysfs node
PEG0 S4 *disabled pci:0000:00:01.0
PEGP S4 *disabled pci:0000:01:00.0
PEG1 S4 *disabled
PEGP S4 *disabled
PEG2 S4 *disabled
PEGP S4 *disabled
PS2K S3 *disabled
PS2M S3 *disabled
RP01 S4 *disabled pci:0000:00:1c.0
PXSX S4 *disabled
RP02 S4 *disabled
PXSX S4 *disabled
RP03 S4 *disabled
PXSX S4 *disabled
RP04 S4 *disabled pci:0000:00:1c.3
PXSX S4 *disabled pci:0000:03:00.0
RP05 S4 *disabled pci:0000:00:1c.4
PXSX S4 *disabled pci:0000:04:00.0
RP06 S4 *disabled
PXSX S4 *disabled
RP07 S4 *disabled
PXSX S4 *disabled
RP08 S4 *disabled
PXSX S4 *disabled
GLAN S4 *enabled pci:0000:00:19.0
EHC1 S4 *disabled pci:0000:00:1d.0
EHC2 S4 *disabled pci:0000:00:1a.0
XHC S4 *disabled pci:0000:00:14.0TPD4 S4 *disabled
TPD7 S0 *disabled
TPD8 S0 *disabled
HDEF S4 *disabled pci:0000:00:1b.0
PWRB S3 *disabled platform:PNP0C0C:00
platao@H97N-WIFI:~$
Por enquanto esta tudo ok!!!quem quiser testar!!!!
http://i.imgur.com/ZvHKpar.pnghttp://i.imgur.com/uOsUJ7r.pngPlatao