You are not logged in.

#1 2016-03-16 18:00:51

Iyyel
Member
From: Australia in the US of A
Registered: 2015-12-20
Posts: 36
Website

Hibernation questions - Macbook Pro 15" 2015

Greetings Arch forums.

Currently I'm on a pretty fresh install with Arch and i3, everything working so far without any problems. Learned a lot of new things during this new installation. (It's my third install on here.)

I have been thinking about fixing hibernation on the machine, since it's gonna be quite important for me when I start school again. (September.)
I have read a lot about it, and it seems like what I want to do, is to suspend into swap space. I made a 16GB swap partition at the initial install, because I had this in mind.
16GB is the amount of RAM I have as well.

https://wiki.archlinux.org/index.php/Po … _hibernate

This is what I have been reading, but I would love to have some inputs on which type of hibernation that is recommended. To me it looks like suspend to disk is the best one, but I do not know.

I see that the article says that systemd provides these features out of the box, it does however not work when I close the lid, which obviously is to be expected. I am looking for help on how I would accomplish hibernation features like how you would expect it to work on OS X etc. As in, closing the lid, hibernates, wakes up when its opened etc. Stuff like that. I use ext4 btw, and not btrfs.

If anyone has any idea where I could possibly start on how to accomplish this, I would really appreciate it. Thanks a lot.

Offline

#2 2016-03-16 19:29:42

elkoraco
Member
Registered: 2013-02-18
Posts: 140

Re: Hibernation questions - Macbook Pro 15" 2015

Offline

#3 2016-03-16 21:23:02

Iyyel
Member
From: Australia in the US of A
Registered: 2015-12-20
Posts: 36
Website

Re: Hibernation questions - Macbook Pro 15" 2015

Thanks for the link.

I have read this, however it is not really working out for me. Here I am specifically talking about systemctl hibernate, since I thought it would be fine to use the built in systemd services for hibernation.

I believe my kernel parameters should be fine. They are listed here.

/boot/loader/entries/arch.conf
title	Arch Linux
linux	/vmlinuz-linux
initrd	/intel-ucode.img
initrd	/initramfs-linux.img
options	root=PARTUUID=466ef9dd-97a2-4067-b315-f582e9beb43a rw elevator=deadline quiet splash resume=PARTUUID=56bc7a24-7ff5-4678-bf40-0e69ce509677 nmi_watchdog=0

When I do systemctl hibernate, all I get is a black screen, fans still running and the computer is unable to wake again.

If I missed something, I apologize. Thanks for the link. smile

Offline

#4 2016-03-17 15:53:44

elkoraco
Member
Registered: 2013-02-18
Posts: 140

Re: Hibernation questions - Macbook Pro 15" 2015

https://wiki.archlinux.org/index.php/Mkinitcpio#HOOKS

You can do one of two things (familiarize yourself with mkinitcpio, of course):

  • Replace the base and udev hooks with the systemd hook, because systemd has its own hibernation hook built in. If you do this, I would first use one a custom preset to test the initramfs, and only then use it as my go-to initramfs

  • Add the resume hook to your mkinitcpio config and rebuild the initramfs.

One or the other should work. Mind you, if this is a 2015 Macbook, I'm guessing it has an SSD, and I'm 99 percent sure that there is no difference in speed between hibernating and regular booting. I think suspending should be enough. But your call.

this is also a good reference, linked from the mkinitcpio article: https://wiki.archlinux.org/index.php/Po … ibernation

Last edited by elkoraco (2016-03-17 15:55:31)

Offline

#5 2016-03-17 15:55:38

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,794
Website

Re: Hibernation questions - Macbook Pro 15" 2015

Did they fix hibernation with systemd hook? I remember some time ago it didn't work

Edit: Still doesn't work for me... But I don't have a Macbook

Last edited by ugjka (2016-03-17 16:27:11)


https://ugjka.net
paru > yay | webcord > discord
pacman -S spotify-launcher
mount /dev/disk/by-...

Offline

#6 2016-03-17 16:10:54

elkoraco
Member
Registered: 2013-02-18
Posts: 140

Re: Hibernation questions - Macbook Pro 15" 2015

works for me ™

Offline

#7 2016-03-17 16:35:44

Iyyel
Member
From: Australia in the US of A
Registered: 2015-12-20
Posts: 36
Website

Re: Hibernation questions - Macbook Pro 15" 2015

ugjka wrote:

Did they fix hibernation with systemd hook? I remember some time ago it didn't work

Edit: Still doesn't work for me... But I don't have a Macbook

What happens exactly, if I may ask? Because mine does not work either. It just stays black screen like I said in the earlier comment.

I haven't gotten any further than this.

Offline

#8 2016-03-17 16:45:04

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,794
Website

Re: Hibernation questions - Macbook Pro 15" 2015

Iyyel wrote:
ugjka wrote:

Did they fix hibernation with systemd hook? I remember some time ago it didn't work

Edit: Still doesn't work for me... But I don't have a Macbook

What happens exactly, if I may ask? Because mine does not work either. It just stays black screen like I said in the earlier comment.

I haven't gotten any further than this.

It hibernates but when I try to resume it reboots twice and the hibernated state is lost


https://ugjka.net
paru > yay | webcord > discord
pacman -S spotify-launcher
mount /dev/disk/by-...

Offline

#9 2016-03-18 16:32:29

Iyyel
Member
From: Australia in the US of A
Registered: 2015-12-20
Posts: 36
Website

Re: Hibernation questions - Macbook Pro 15" 2015

ugjka wrote:

It hibernates but when I try to resume it reboots twice and the hibernated state is lost

Interesting. Mine just shows a black screen as I said before.

Well. I hope I'll be able to fix this some time. I'm not sure where to go from here.

Offline

#10 2016-12-10 18:04:30

eblau
Member
Registered: 2016-02-11
Posts: 43

Re: Hibernation questions - Macbook Pro 15" 2015

Iyyel wrote:
ugjka wrote:

It hibernates but when I try to resume it reboots twice and the hibernated state is lost

Interesting. Mine just shows a black screen as I said before.

Well. I hope I'll be able to fix this some time. I'm not sure where to go from here.

I'm having this exact same problem. I wonder if you ever got it to work. I can hibernate fine but on resume it hangs.

I get either a blank screen or a screen with corrupted text in the upper-left corner. It hangs there for about 30 seconds then reboots itself and comes back up without resuming from the hibernation image.

I've tried a bunch of debugging steps including:

- Switching to the systemd hook in mkinitcpio and removing base and udev
- Using uswsusp-git instead
- Booting with KMS disabled

None of these options helped. Did you ever have luck getting hibernation and resume working with the MBP?

Offline

#11 2016-12-10 18:43:22

eblau
Member
Registered: 2016-02-11
Posts: 43

Re: Hibernation questions - Macbook Pro 15" 2015

Of course, right after I post this, I figure it out...

I got hibernate and resume working by unloading / blacklisting the brcmfmac module. With brcmfmac unloaded, wifi doesn't work but hibernate / resume works great.

I got around this by using the following AUR package to unload the module and reload it on resume:

https://aur.archlinux.org/packages/syst … d-modules/

Everything is working great now! Very happy to have this working.

Offline

Board footer

Powered by FluxBB