Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Suspend on old MacBook with fresh Bullseye installation

137 views
Skip to first unread message

Andreas Tille

unread,
May 11, 2021, 4:20:04 AM5/11/21
to
Hi,

I've got some MacBook from 2008 to install Debian on it and hand it over
to some user who needs a decent office machine. I've installed Bullseye
RC1 which worked nicely (except that I had to manually add WLAN driver
broadcom-sta-dkms later).

The only real flaw is that neither suspend nor hibernate are working. I
think the problem is independent from the desktop choice (I've installed
lxde) since I can reproduce the issue also at command line:

sudo systemctl suspend

I also used hibernate as well as the LXDE controls or closing the lid -
the result is always the same:

1. Black screen
2. Network disabled (ssh session freezes, no ping from other host)
3. Fan keeps on moving silently
4. Can't wake up to normal operation neither by
- opening the lid
- pressing any key
- pressing power button

So I had to press power button for some seconds to power down the hard
way. I checked /var/log/syslog which has something like:

May 6 07:38:57 noel systemd[1]: Reached target Sleep.
May 6 07:38:57 noel systemd[1]: Starting Hibernate...
May 6 07:38:58 noel systemd-sleep[6542]: Suspending system...
May 6 08:00:47 noel kernel: [ 0.000000] microcode: microcode updated early to revision 0xa0b, date = 2010-09-28
May 6 08:00:47 noel kernel: [ 0.000000] Linux version 5.10.0-6-amd64 (debian...@lists.debian.org) (gcc-10 (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.3 5.2) #1 SMP Debian 5.10.28-1 (2021-04-09)
--
May 6 08:34:20 noel systemd[1]: Reached target Sleep.
May 6 08:34:20 noel systemd[1]: Starting Suspend...
May 6 08:34:20 noel systemd-sleep[2478]: Suspending system...
May 6 08:34:20 noel kernel: [ 2020.808214] PM: suspend entry (deep)
May 6 08:36:00 noel kernel: [ 0.000000] microcode: microcode updated early to revision 0xa0b, date = 2010-09-28
May 6 08:36:00 noel kernel: [ 0.000000] Linux version 5.10.0-6-amd64 (debian...@lists.debian.org) (gcc-10 (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.3 5.2) #1 SMP Debian 5.10.28-1 (2021-04-09)

I did some research and found a hint to ArchLinux Wiki gefunden[1].
In the first place /proc/acpi/wakeup was just empty. I followed the
recommendation and created /etc/systemd/system/suspend-fix.service
and so I got:

$ cat /proc/acpi/wakeup
Device S-state Status Sysfs node
ADP1 S3 *disabled platform:ACPI0003:00
LID0 S3 *enabled platform:PNP0C0D:00
EC S3 *disabled platform:PNP0C09:00
OHC1 S3 *enabled pci:0000:00:04.0
EHC1 S3 *enabled pci:0000:00:04.1
OHC2 S3 *enabled pci:0000:00:06.0
EHC2 S3 *enabled pci:0000:00:06.1
GIGE S5 *disabled pci:0000:00:0a.0

Unfortunately this does not change anything.


I was wondering about the black screen and suspected that the video
driver might be responsible for the problem. Despite I'm perfectly fine
with the nuoveau driver I simply tried nvidia-legacy-340xx-driver (only
in unstable) hoping that this might solve the suspend problem. I was
able to install the driver but it had really strange colors. For
instance the Bluetooth symbol was brown and the desktop icon for power
off was blue (instead of red).

Besides the strange colors there is also no change in the broken suspend
process so I switched back to nuoveau driver.

Is there any idea how to get suspend working reliably on this otherwise
pretty decent machine?

Kind regards

Andreas.

PS: I'd be happy if you could CC me but I can read the web archive of
this mailing list.

[1] https://wiki.archlinux.org/title/Mac#Wake_Up_After_Suspend

--
http://fam-tille.de

Stefan Monnier

unread,
May 11, 2021, 10:50:05 AM5/11/21
to
> I also used hibernate as well as the LXDE controls or closing the lid -
> the result is always the same:
>
> 1. Black screen
> 2. Network disabled (ssh session freezes, no ping from other host)
> 3. Fan keeps on moving silently
> 4. Can't wake up to normal operation neither by
> - opening the lid
> - pressing any key
> - pressing power button

Hmm... hibernate "should" work reasonably well, regardless of the
underlying firmware. Are you booting via EFI or via the "legacy BIOS"
(which at some point was referred to as BootCamp)? You may want to try
the other one, just to see if it helps.

How did you initiate the hibernate?

What does `cat /sys/power/disk` say?
Try changing it, e.g. via `echo shutdown >/sys/power/disk`
(that won't help for suspend but it might help for hibernation since
step 3 above suggests that the machine didn't *really* turn itself off).

> I was wondering about the black screen and suspected that the video
> driver might be responsible for the problem. Despite I'm perfectly fine
> with the nuoveau driver I simply tried nvidia-legacy-340xx-driver (only
> in unstable) hoping that this might solve the suspend problem.

FWIW, I'd expect `nouveau` to behave a bit better w.r.t suspend/hibernate.


Stefan

Andreas Tille

unread,
May 11, 2021, 2:20:05 PM5/11/21
to
Hi Stefan,

> > I also used hibernate as well as the LXDE controls or closing the lid -
> > the result is always the same:
> >
> > 1. Black screen
> > 2. Network disabled (ssh session freezes, no ping from other host)
> > 3. Fan keeps on moving silently
> > 4. Can't wake up to normal operation neither by
> > - opening the lid
> > - pressing any key
> > - pressing power button
>
> Hmm... hibernate "should" work reasonably well, regardless of the
> underlying firmware. Are you booting via EFI or via the "legacy BIOS"
> (which at some point was referred to as BootCamp)? You may want to try
> the other one, just to see if it helps.

I used the installer default which is EFI. I admit I have no idea how
to convince that MacBook to use something else. Its the first time I've
got my hand on any Apple hardware - so no idea how I can switch to
something else from hardware side (nor whether I need to change
something on the Debian installation.

> How did you initiate the hibernate?

sudo systemctl hibernate

(as well as what lxde offers in its menu - no idea how that is called in
English locale).

> What does `cat /sys/power/disk` say?

$ cat /sys/power/disk
[platform] shutdown reboot suspend test_resume

> Try changing it, e.g. via `echo shutdown >/sys/power/disk`

# echo shutdown >/sys/power/disk
# cat /sys/power/disk
platform [shutdown] reboot suspend test_resume

> (that won't help for suspend but it might help for hibernation since
> step 3 above suggests that the machine didn't *really* turn itself off).

Yes, this is what I suspect. The issue is in the process of suspending
/ hibernating and not in the process of waking up again.

Unfortunately the suggested change does not help either.

> > I was wondering about the black screen and suspected that the video
> > driver might be responsible for the problem. Despite I'm perfectly fine
> > with the nuoveau driver I simply tried nvidia-legacy-340xx-driver (only
> > in unstable) hoping that this might solve the suspend problem.
>
> FWIW, I'd expect `nouveau` to behave a bit better w.r.t suspend/hibernate.

OK, thanks for confirming and for your hints in general

Andreas.

--
http://fam-tille.de

Stefan Monnier

unread,
May 11, 2021, 3:00:05 PM5/11/21
to
Andreas Tille [2021-05-11 20:18:55] wrote:
> Hi Stefan,
>> > I also used hibernate as well as the LXDE controls or closing the lid -
>> > the result is always the same:
>> >
>> > 1. Black screen
>> > 2. Network disabled (ssh session freezes, no ping from other host)
>> > 3. Fan keeps on moving silently
>> > 4. Can't wake up to normal operation neither by
>> > - opening the lid
>> > - pressing any key
>> > - pressing power button
>>
>> Hmm... hibernate "should" work reasonably well, regardless of the
>> underlying firmware. Are you booting via EFI or via the "legacy BIOS"
>> (which at some point was referred to as BootCamp)? You may want to try
>> the other one, just to see if it helps.
>
> I used the installer default which is EFI. I admit I have no idea how
> to convince that MacBook to use something else. Its the first time I've
> got my hand on any Apple hardware - so no idea how I can switch to
> something else from hardware side (nor whether I need to change
> something on the Debian installation.

To use the "legacy BIOS" style boot, you need:
- setup an MBR (ideally you have less than 4 partitions, so you can
have a simple MBR with one pseudo-partition which is the "EFI
protective" thingy and then the other partitions as before).
You can set such an MBR without having to fully reinstall
or repartition. rEFIt used to come with a tool that did that, IIRC.
- install the non-EFI grub on your disk.
- potentially tell your Mac explicitly to use this boot method.
A tool like rEFIt can be used (rEFIt is old, it's been superseded at
least by rEFInd and probably others by now but I haven't kept up, sorry).


Stefan
0 new messages