You are not logged in.
Finally I managed to get hibernation working with the swapfile, but now I have another problem: after resuming from hibernation I can start none of GUI applications (eg. web browsers, VLC), they claim, for example:
VLC
qt4 interface error: Could not connect to X server
No protocol specified
Firefox
No protocol specified
Unable to init server: Could not connect: Connection refused
Error: cannot open display: :0
Opera Legacy
No protocol specified
opera: cannot connect to X server :0. Error: Resource temporarily unavailable
SMPlayer
No protocol specified
QXcbConnection: Could not connect to display :0
Aborted (core dumped)
Google Chrome (stable)
No protocol specified
[1968:1968:0512/005733:ERROR:browser_main_loop.cc(253)] Gtk: cannot open display: :0
However GUI applications opened before the hibernation process keeps working.
I am using XFCE. Additional info: when I try to logout and then login again, to make X work, I can't logout properly, because all I see is a nearly black screen with the upper part of the corrupted XFCE backround image (I set earlier) on the top of the screen.
What can I do to make the other apps work after resuming from hibernation too?
Last edited by anselm (2016-05-12 01:59:04)
Offline
This usually happens when one has forgotten to set a static hostname. If that wasn't it, you might want to check ~/.xsession-errors and/or the xorg log
Offline
Yes, you are right, static hostname wasn't set, only so called "transient hostname". Now I set a static hostname with "hostnamectl set-hostname", and the transient hostname disappeared.
Offline
And did the problem disappear? Did you also define the /etc/hosts file correctly? For some applications setting the hostname with hostnamectl without actually adding it to /etc/hosts can lead to problems as well. If the problem is resolved, don't forget to prepend [SOLVED] to title of the topic by editing your initial post.
Offline
Yes, now I managed to check it, and hibernation to disk seems to be working now after I set the static hostname with hostnamectl. Before even the hibernation process freezed, I got not a black screen, but a freezed desktop, and two blinking led on the keyboard (Caps Lock and right side). And sometimes I got a black screen with kernel error messages: "Read error on swap-device". I got the same error messages when using either swap partition or swapfile.
Last edited by anselm (2016-05-14 19:13:02)
Offline
Not really, hibernation worked last time, but thawing the system resulted a new GUI screen, not the saved one.
journalctl --no-pager|grep -i image
gives:
May 15 18:41:28 Arch-Linux kernel: Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux-lts root=UUID=c7e2c928-1839-4c39-b5cc-836a3cea6167 rw resume=/dev/disk/by-uuid/c7e2c928-1839-4c39-b5cc-836a3cea6167 resume_offset=4474880 quiet resume=/dev/disk/by-uuid/c7e2c928-1839-4c39-b5cc-836a3cea6167 resume_offset=4474880
May 15 18:41:28 Arch-Linux kernel: PM: Checking hibernation image partition /dev/disk/by-uuid/c7e2c928-1839-4c39-b5cc-836a3cea6167
May 15 18:41:28 Arch-Linux kernel: PM: Hibernation image not present or could not be loaded.
May 15 18:41:28 Arch-Linux kernel: PM: Hibernation image partition 8:1 present
May 15 18:41:28 Arch-Linux kernel: PM: Looking for hibernation image.
May 15 18:41:28 Arch-Linux kernel: PM: Image not found (code -22)
May 15 18:41:28 Arch-Linux kernel: PM: Hibernation image not present or could not be loaded.
Offline
After I change the hostname, no GUI apps can connect to X. Should I reboot always when changing hostname, or is there a command to invoke and enable them to connect again to the display specified by the new hostname?
For example:
> xgamma
No protocol specified
xgamma: unable to open display ':0'
After:
export DISPLAY="Arch-Linux:0.0"
The result is:
> xgamma
xgamma: unable to open display 'Arch-Linux:0.0'
One error line disappeared. I tried to run "xhost +" but didn't worked.
Offline