Pagina 1 di 1

Niente sospensione a chiusura schermo

Inviato: martedì 24 ottobre 2017, 12:28
da checcoraggio
Buongiorno, credo di aver cercato ovunque ma non trovo risposta al mio dilemma. Ho acquistato da poco un hp 14-ax014nl e installato ubuntu 16.04 al posto di Windows 10 (non avevo modo di fare dual boot a causa dei soli 32gb di hd).
Ho impostato nel pannello alimentazione la sospensione quando si chiude lo schermo ma sono abbastanza convinto che questo non accada e infatti quando il notebook è chiuso si scarica molto rapidamente. Inoltre quando lo riapro non mi chiede la password, come invece dovrebbe fare, e fa, se sospendo dal menù nell'angolo in alto a destra.
Spero di esser stato chiaro, grazie per ora

Re: Niente sospensione a chiusura schermo

Inviato: martedì 24 ottobre 2017, 19:41
da steff
Forse non nota o non funziona il sensore al coperchio.
Posta

Codice: Seleziona tutto

cat /proc/acpi/wakeup
ls /proc/acpi

Re: Niente sospensione a chiusura schermo

Inviato: mercoledì 25 ottobre 2017, 8:37
da checcoraggio
francesco@francesco-HP-Stream:~$ cat /proc/acpi/wakeup
Device S-state Status Sysfs node
XHC1 S3 *enabled pci:0000:00:14.0
BRCM S0 *disabled
BRC1 S0 *disabled
HDEF S4 *disabled pci:0000:00:1b.0
RP01 S4 *disabled pci:0000:00:1c.0
PXSX S4 *disabled pci:0000:01:00.0
*disabled platform:rtsx_pci_sdmmc.0
*disabled platform:rtsx_pci_ms.0
RP02 S4 *disabled
PXSX S4 *disabled
RP03 S4 *disabled
PXSX S4 *disabled
RLAN S5 *disabled
RP04 S4 *disabled pci:0000:00:1c.3
PXSX S4 *disabled pci:0000:02:00.0
francesco@francesco-HP-Stream:~$ ls /proc/acpi
button wakeup

Ho qualche dubbio che non funzioni il sensore perché mentre lo chiudo vedo che il monitor si spenge...secondo me spenge semplicemente il monitor senza fare altro

Re: Niente sospensione a chiusura schermo

Inviato: mercoledì 25 ottobre 2017, 9:07
da steff
Cerca in /proc/acpi/button per lid o Lid0 e riporta cosa c'è.
PS: usa sempre il tag codice nel editor avanzato per postare i listati da terminale, grazie.

Re: Niente sospensione a chiusura schermo

Inviato: mercoledì 25 ottobre 2017, 23:01
da checcoraggio
mi dispiace ma non credo di aver capito cosa devo fare...

Re: Niente sospensione a chiusura schermo

Inviato: giovedì 26 ottobre 2017, 8:40
da steff
Aprire il gestore file, sistema, sfogliare proc/acpi/button o posta almeno

Codice: Seleziona tutto

ls /proc/acpi/button

Re: Niente sospensione a chiusura schermo

Inviato: giovedì 26 ottobre 2017, 9:35
da checcoraggio

Codice: Seleziona tutto

francesco@francesco-HP-Stream:~$ ls /proc/acpi/button
lid
francesco@francesco-HP-Stream:~$ 
dentro button c'è una carlella lid che contiene lid0 che contiene un file chiamato state che dentro ha una riga "state: open"

confermo comunque che non fa sospensione chiudendo lo schermo ma spegne solo lo schermo. L'ho messo in sospensione manualmente e la batteria si è scaricata del 5% in 10 ore circa mentre se chiudo lo schermo e basta in 10 ore va praticamente giù tutta

Re: Niente sospensione a chiusura schermo

Inviato: venerdì 27 ottobre 2017, 14:50
da checcoraggio
Nessuno mi può aiutare?

Re: Niente sospensione a chiusura schermo

Inviato: venerdì 27 ottobre 2017, 16:36
da steff
E' lid0 o LID0 la cartella? Cmq mi sembra che funziona visto che spegne lo schermo, altrimenti si potrebbe controllare se cambia in in state:closed ma come detto credo lo fa. Si potrebbero usare dei script tipo quelli https://askubuntu.com/questions/395428/ ... -is-closed ma con systemctl suspend. Ma prima posta

Codice: Seleziona tutto

cat /etc/default/acpi-support

Re: Niente sospensione a chiusura schermo

Inviato: venerdì 27 ottobre 2017, 18:34
da checcoraggio

Codice: Seleziona tutto

francesco@francesco-HP-Stream:~$ cat /etc/default/acpi-support
#
# Configuration file for the acpi-support package
#
#
# The acpi-support package is intended as "glue" to make special functions of
# laptops work. Specifically, it translates special function keys for some
# laptop models into actions or generic function key presses.
#


#
# Suspend/hibernate method
# ------------------------
#
# When gnome-power-manager or klaptopdaemon are running, acpi-support will
# translate the suspend and hibernate keys of laptops into special "suspend"
# and "hibernate" keys that these daemons handle.
#
# Only in situations where there is no gnome-power-manager or klaptopdaemon
# running, acpi-support needs to perform suspend/hibernate in some other way.
# There are several options for this. The options are:
#
# dbus-pm:
#    Perform suspend and hibernate actions via a DBUS request to the power
#    management daemon. This works for power management daemons that we don't
#    know of. (For gnome-power-manager and klaptopdaemon this will do nothing,
#    since those will be detected when they are running, and triggered using
#    a virtual keypress.)
#
# dbus-hal:
#    Perform suspend and hibernate actions via a DBUS request directly to HAL,
#    bypassing any running power management daemons.
#
# pm-utils:
#    Use pm-suspend and pm-hibernate to suspend and hibernate. (The dbus method
#    normally results in this as well, but calls through dbus. Use this option
#    only if you don't have dbus installed.)
#
# hibernate:
#    Use the hibernate package to suspend and hibernate.
#
# acpi-support:
#    Use the legacy built-in suspend/hibernate support. (DEPRECATED)
# 
# none:
#    Do not attempt to suspend/hibernate. Set SUSPEND_METHODS="none" to
#    disable suspend/hibernate handling in acpi-support.
#
# If you specify dbus or pm-utils, the result will normally be the same as when
# you suspend from your desktop environment. If you specify "hibernate" or
# "acpi-support", be aware that this probably does not match what your desktop
# environment would do (unless you have managed to configure something so that
# the DBUS power management interfaces call the hibernate package).
#
#
# Please specify a space separated list of options. The recommended value is
# "dbus pm-utils"
#
SUSPEND_METHODS="dbus-pm dbus-hal pm-utils"



#
# LEGACY BUILT IN SUSPEND SUPPORT (DEPRECATED)
# --------------------------------------------
#
# These options only work for the "acpi-support" suspend method. This is NOT
# recommended, but is retained for backward compatibility reasons.
#

# Comment the next line to disable ACPI suspend to RAM
ACPI_SLEEP=true

# Comment the next line to disable suspend to disk
ACPI_HIBERNATE=true

# Change the following to "standby" to use ACPI S1 sleep, rather than S3.
# This will save less power, but may work on more machines
ACPI_SLEEP_MODE=mem

# Add modules to this list to have them removed before suspend and reloaded
# on resume. An example would be MODULES="em8300 yenta_socket"
#
# Note that network cards and USB controllers will automatically be unloaded 
# unless they're listed in MODULES_WHITELIST
MODULES=""

# Add modules to this list to leave them in the kernel over suspend/resume
MODULES_WHITELIST=""

# Should we save and restore state using the VESA BIOS Extensions?
SAVE_VBE_STATE=true

# The file that we use to save the vbestate
VBESTATE=/var/lib/acpi-support/vbestate

# Should we attempt to warm-boot the video hardware on resume?
POST_VIDEO=true

# Save and restore video state?
# SAVE_VIDEO_PCI_STATE=true

# Should we switch the screen off with DPMS on suspend?
USE_DPMS=true

# Use Radeontool to switch the screen off? Seems to be needed on some machines
# RADEON_LIGHT=true

# Uncomment the next line to switch away from X and back again after resume.
# This is needed for some hardware, but should be unnecessary on most.
# DOUBLE_CONSOLE_SWITCH=true

# Set the following to "platform" if you want to use ACPI to shut down
# your machine on hibernation
HIBERNATE_MODE=shutdown

# Comment this out to disable screen locking on resume
LOCK_SCREEN=true

# Uncomment this line to have DMA disabled before suspend and reenabled
# afterwards
# DISABLE_DMA=true

# Uncomment this line to attempt to reset the drive on resume. This seems
# to be needed for some Sonys
# RESET_DRIVE=true

# Add services to this list to stop them before suspend and restart them in 
# the resume process.
STOP_SERVICES=""

# Restart Infra Red services on resume - off by default as it crashes some
# machines
RESTART_IRDA=false

# Add to this list network interfaces that you don't want to be stopped
# during suspend (in fact any network interface whose name starts with
# a prefix given in this list is skipped)
SKIP_INTERFACES="dummy qemu"

# Note: to enable "laptop mode" (to spin down your hard drive for longer
# periods of time), install the laptop-mode-tools package and configure
# it in /etc/laptop-mode/laptop-mode.conf. 
francesco@francesco-HP-Stream:~$ 
la cartella è LID0

grazie!

Re: Niente sospensione a chiusura schermo

Inviato: venerdì 27 ottobre 2017, 19:04
da steff
Prova

Codice: Seleziona tutto

sudo nano /etc/default/acpi-support
inserisci in fondo

Codice: Seleziona tutto

LID_SLEEP=true
cltr+o poi cltr+x riavvia. Si va per tentativi... se non funziona ancora poi provare questo:

Codice: Seleziona tutto

sudo nano /etc/systemd/logind.conf
togli il cancelletto inizio riga di questi due

Codice: Seleziona tutto

#HandleLidSwitch=suspend
#LidSwitchIgnoreInhibited=yes
poi dai

Codice: Seleziona tutto

sudo systemctl restart systemd-logind.service 
e prova, non dovrebbe funzionare con un gestore energia attivo ma non si sa mai ;)

Re: Niente sospensione a chiusura schermo

Inviato: sabato 28 ottobre 2017, 11:10
da checcoraggio
niente, grazie comunque. Altre idee? Leggendo in giro ho visto che potrebbe essere un problema di area di swap troppo piccola. La mia è di 1,5 gb. Potrebbe entrarci qualcosa?

Re: Niente sospensione a chiusura schermo

Inviato: sabato 28 ottobre 2017, 19:22
da steff
La swap non c'entra niente con la sospensione in ram ma con l'ibernazione (su disco), che su *ubuntu è disattivata di default.
Potresti provare installare LXQt o XFCE(-core), dovrebbero essere pochi pacchetti e testare la sessione e la sospensione con chiusura coperchio, anche per verificare se è un problema del DE o del sistema.
In alternativa sarebbero da provare questi script che propongono nel link, ma non ho trovato conferme chiare per uno...

Re: Niente sospensione a chiusura schermo

Inviato: domenica 29 ottobre 2017, 10:50
da checcoraggio
Cercando ancora ho trovato questo:
https://www.lffl.org/2012/05/spegnere-r ... ere-o.html
Adesso ho suspend nella dash. Pensavo, posso creare una scorciatoia di tastiera per sospendere?

Re: Niente sospensione a chiusura schermo

Inviato: domenica 29 ottobre 2017, 18:08
da steff
Veramente sui laptop ci dovrebbe essere fn+uno dei tasti f1-f9 quella col simbolo della ram.
Non conosco bene su ubuntu le possibilità per le scorciatoie.

Re: Niente sospensione a chiusura schermo

Inviato: mercoledì 1 novembre 2017, 1:41
da checcoraggio
non ce l'ho...

Re: Niente sospensione a chiusura schermo

Inviato: mercoledì 1 novembre 2017, 8:01
da steff

Re: Niente sospensione a chiusura schermo

Inviato: mercoledì 1 novembre 2017, 12:08
da checcoraggio
grazie mille steff, non credo di poter mettere risolto perche non era proprio questo che richiedevo ma sono soddisfatto così. Grazie!!!