Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Gnome 3 command used to hibernate
Gnome 3 command used to hibernate
Hello,
I'm using Gnome 3 on Debian Testing in my laptop and I have a problem with hibernation, if in terminal I use one of the following commands:
systemctl hibernate
pm-hibernate
The system hibernates and resumes with no problem, however when I use the power button while having this configuration:
org.gnome.settings-daemon.plugins.power.power-button-action='hibernate'
The system hibernates but the resume freezes. Therefore, I was wondering what it's the command that Gnome uses when 'hibernate' is set and if I could change this to use one of the others that work.
I'm using Gnome 3 on Debian Testing in my laptop and I have a problem with hibernation, if in terminal I use one of the following commands:
systemctl hibernate
pm-hibernate
The system hibernates and resumes with no problem, however when I use the power button while having this configuration:
org.gnome.settings-daemon.plugins.power.power-button-action='hibernate'
The system hibernates but the resume freezes. Therefore, I was wondering what it's the command that Gnome uses when 'hibernate' is set and if I could change this to use one of the others that work.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Gnome 3 command used to hibernate
Good questionrond14 wrote:I was wondering what it's the command that Gnome uses when 'hibernate' is set and if I could change this to use one of the others that work.
I don't know the answer but you could check the systemd journal to see if that records the method employed:
Code: Select all
# journalctl -xe
Code: Select all
empty@Xanadu:~ $ systemd-inhibit
Who: gdm (UID 120/gdm, PID 483/gsd-media-keys)
What: handle-power-key:handle-suspend-key:handle-hibernate-key
Why: GNOME handling keypresses
Mode: block
Who: empty (UID 1000/empty, PID 750/gsd-power)
What: sleep
Why: GNOME needs to lock the screen
Mode: delay
Who: empty (UID 1000/empty, PID 747/gsd-media-keys)
What: handle-power-key:handle-suspend-key:handle-hibernate-key
Why: GNOME handling keypresses
Mode: block
Who: UPower (UID 0/root, PID 404/upowerd)
What: sleep
Why: Pause device polling
Mode: delay
Who: Telepathy (UID 1000/empty, PID 710/mission-control)
What: shutdown:sleep
Why: Disconnecting IM accounts before suspend/shutdown...
Mode: delay
Who: gdm (UID 120/gdm, PID 487/gsd-power)
What: sleep
Why: GNOME needs to lock the screen
Mode: delay
6 inhibitors listed.
empty@Xanadu:~ $
If `systemctl suspend` works then perhaps that will do the trick.
deadbang
Re: Gnome 3 command used to hibernate
Thank you for your answer, I used journalctl -xe command but has not related information, probably because once I hibernate the laptop by using the power button the resume doesn't work (stays in black screen) and I have to make a hard reset.
Also, I tried disabling the power button handling (and configure systemd as the handler) however systemd-inhibit still shows GNOME as the handler, that's the reason I thought about changing the command used by GNOME
Also, I tried disabling the power button handling (and configure systemd as the handler) however systemd-inhibit still shows GNOME as the handler, that's the reason I thought about changing the command used by GNOME
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Gnome 3 command used to hibernate
Good point.rond14 wrote:I used journalctl -xe command but has not related information, probably because once I hibernate the laptop by using the power button the resume doesn't work (stays in black screen) and I have to make a hard reset.
You can enable persistent storage for the journal so that it "remembers" what happened before you have to reset it; do this either by editing /etc/systemd/journald.conf and changing the "Storage=" line to "persistent" or alternatively leave that file alone and create the necessary folder manually with:
Code: Select all
# mkdir -p /var/log/journal
Please show us exactly how you tried to do this, perhaps you have made a mistake somewhere.I tried disabling the power button handling (and configure systemd as the handler)
I must admit though that I do not actually know how to do that
Have you considered switching to a less "helpful" desktop environment?
For example, openbox doesn't manage these sort of things unless you force it to.
deadbang
Re: Gnome 3 command used to hibernate
I configured my journal to be persistent but there's no evidence of any command that GNOME uses.
On the other hand, what I do with systemd is the following:
1. Disable GNOME power button handling by setting to Action=Nothing in the Energy section of Gnome Tweak Tool.
2. Edit /etc/systemd/logind.conf to have this:
But, doesn't work and I think it's because in the logind.conf manual you can find this:
So, GNOME still has the control. Right now my walkaround for this is to do nothing when power button is pressed and configure a combination of keys to trigger the hibernation. Anyway, It would be nice to know about this GNOME power button handling, and yes probably changing to other DE will make things easier
On the other hand, what I do with systemd is the following:
1. Disable GNOME power button handling by setting to Action=Nothing in the Energy section of Gnome Tweak Tool.
2. Edit /etc/systemd/logind.conf to have this:
Code: Select all
HandlePowerKey=hibernate
PowerKeyIgnoreInhibited=yes
Code: Select all
PowerKeyIgnoreInhibited=, SuspendKeyIgnoreInhibited=, HibernateKeyIgnoreInhibited=, LidSwitchIgnoreInhibited=
Controls whether actions that systemd-logind takes when the power and sleep keys and the lid switch are triggered are subject to high-level inhibitor locks ("shutdown", "sleep", "idle"). Low level inhibitor locks ("handle-power-key", "handle-suspend-key", "handle-hibernate-key", "handle-lid-switch"), are always honored, irrespective of this setting.
Re: Gnome 3 command used to hibernate
Have you tried opening Tweak Tool in Gnome and changing the settings under power?
When power button is pressed action setting
and
When laptop lid is closed setting
When power button is pressed action setting
and
When laptop lid is closed setting
Re: Gnome 3 command used to hibernate
Yes, I tried that, when I use the Hibernate option there, doesn't resume.
Re: Gnome 3 command used to hibernate
Just shooting in the dark here...
What size is your swap partition and RAM?
What size is your swap partition and RAM?
Re: Gnome 3 command used to hibernate
Swap: 8.5 GB
RAM: 5.7 GB
As far as I saw there is a problem with the video (Intel integrated) when resuming the laptop, but this only happens when GNOME is in charge of the hibernation, if I hibernate using command lines it's ok.
RAM: 5.7 GB
As far as I saw there is a problem with the video (Intel integrated) when resuming the laptop, but this only happens when GNOME is in charge of the hibernation, if I hibernate using command lines it's ok.
-
- Posts: 2
- Joined: 2008-01-27 01:10
Re: Gnome 3 command used to hibernate
Hi,
I had exactly the same problem. pm-hibernate works but the Gnome hibernate function doesn't.
There is a visual difference between the two. When using the pm-hibernate from the command line, the screen briefly flicks off and then back on again before "freezing" and becoming unresponsive while the computer goes to sleep. The Gnome command on the other hand blanks the the screen immediately and remains off until the computer is finished powering down. But when it turns back on, the screen never comes back. I know it's turned back on and back at the desktop environment because the volume level can be heard if I adjust it with the keyboard keys. I normally can't access the tty's either (Although once I could but then gdm and gnome remained inactive and could not be restarted. Don't know how to replicate that behaviour)
After hours of searching the interned I found a solution. I was able to fix it by Setting Gnome to ignore the power button and adding the following to the beginning of my /etc/acpi/powerbutton-acpi-support.sh
Probably not a great solution if anyone knows a better one please let me know.
Happy to file a bug report if someone can tell me what logs, etc. to include
I had exactly the same problem. pm-hibernate works but the Gnome hibernate function doesn't.
There is a visual difference between the two. When using the pm-hibernate from the command line, the screen briefly flicks off and then back on again before "freezing" and becoming unresponsive while the computer goes to sleep. The Gnome command on the other hand blanks the the screen immediately and remains off until the computer is finished powering down. But when it turns back on, the screen never comes back. I know it's turned back on and back at the desktop environment because the volume level can be heard if I adjust it with the keyboard keys. I normally can't access the tty's either (Although once I could but then gdm and gnome remained inactive and could not be restarted. Don't know how to replicate that behaviour)
After hours of searching the interned I found a solution. I was able to fix it by Setting Gnome to ignore the power button and adding the following to the beginning of my /etc/acpi/powerbutton-acpi-support.sh
Code: Select all
#! /bin/bash
/usr/sbin/pm-hibernate
exit 0
Happy to file a bug report if someone can tell me what logs, etc. to include
Re: Gnome 3 command used to hibernate
Hi, you have described exactly what happens to me
I think it deserves a bug report, although your description is detailed I'm not really sure if it's enough for the maintainers. Anyway, in my case I deactivated the power button and create a shortcut to call the hibernate command (Alt + Something) by going to Parameters > Peripherals > Keyboard.
Thank you for your response
I think it deserves a bug report, although your description is detailed I'm not really sure if it's enough for the maintainers. Anyway, in my case I deactivated the power button and create a shortcut to call the hibernate command (Alt + Something) by going to Parameters > Peripherals > Keyboard.
Thank you for your response
mln_falcon wrote:Hi,
I had exactly the same problem. pm-hibernate works but the Gnome hibernate function doesn't.
There is a visual difference between the two. When using the pm-hibernate from the command line, the screen briefly flicks off and then back on again before "freezing" and becoming unresponsive while the computer goes to sleep. The Gnome command on the other hand blanks the the screen immediately and remains off until the computer is finished powering down. But when it turns back on, the screen never comes back. I know it's turned back on and back at the desktop environment because the volume level can be heard if I adjust it with the keyboard keys. I normally can't access the tty's either (Although once I could but then gdm and gnome remained inactive and could not be restarted. Don't know how to replicate that behaviour)
After hours of searching the interned I found a solution. I was able to fix it by Setting Gnome to ignore the power button and adding the following to the beginning of my /etc/acpi/powerbutton-acpi-support.sh
Probably not a great solution if anyone knows a better one please let me know.Code: Select all
#! /bin/bash /usr/sbin/pm-hibernate exit 0
Happy to file a bug report if someone can tell me what logs, etc. to include