I am trying to run Fedora on an Old Macbook 2011. Everything works great, but the system crashes everytime I close the lid or press the power button without holding it (probably puts it into hibernatiion/power saver)
I am noobish with linux, but googled the problem quite extensively, but non of the fixes worked. The last one was about nvidia drivers, but appearently I have an Intel HD Graphics Card (DUH). This turned my screen completely blank. I then figured out how to modify the boot options to boot in text mode and remove the false driver.
Which I was pretty proud of. This is round about the farthest I ever went. So please don’t bash me, if it is an easy fix I overlooked. I actually tried fixing it myself and googling it before posting here.
From what I understand the following output logs are often necessary to troubleshoot this problem, so I added them. As new user I can only post two links, thats why the lspci is without pastebin.
Thank you for your help.
Crash
Regular
LSPCI
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:01.1 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Universal Host Controller #5 (rev 05)
00:1a.7 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b5)
00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b5)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Universal Host Controller #1 (rev 05)
00:1d.7 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)
02:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM57765 Gigabit Ethernet PCIe (rev 10)
02:00.1 SD Host controller: Broadcom Inc. and subsidiaries BCM57765/57785 SDXC/MMC Card Reader (rev 10)
03:00.0 Network controller: Broadcom Inc. and subsidiaries BCM4331 802.11a/b/g/n (rev 02)
04:00.0 FireWire (IEEE 1394): LSI Corporation FW643 [TrueFire] PCIe 1394b Controller (rev 08)
05:00.0 PCI bridge: Intel Corporation CV82524 Thunderbolt Controller [Light Ridge 4C 2010]
06:00.0 PCI bridge: Intel Corporation CV82524 Thunderbolt Controller [Light Ridge 4C 2010]
06:03.0 PCI bridge: Intel Corporation CV82524 Thunderbolt Controller [Light Ridge 4C 2010]
06:04.0 PCI bridge: Intel Corporation CV82524 Thunderbolt Controller [Light Ridge 4C 2010]
06:05.0 PCI bridge: Intel Corporation CV82524 Thunderbolt Controller [Light Ridge 4C 2010]
06:06.0 PCI bridge: Intel Corporation CV82524 Thunderbolt Controller [Light Ridge 4C 2010]
07:00.0 System peripheral: Intel Corporation CV82524 Thunderbolt Controller [Light Ridge 4C 2010]
Sorry about the delay on response. I do not use a mac but might suggest that the cause could be a result of trying to hibernate or suspend without the proper config and/or physical swap space. Fedora uses virtual swap in RAM by default, and I think on most laptops is set to suspend or hibernate with the lid close switch. If that cannot it may cause a crash. The power button may also be set the same way for a quick press.
I believe these settings may be changed under the gnome settings app.
Hi, in terminal
you can change the setting via the terminal console. Open your preferred termanl and type in:
sudo nano /etc/systemd/logind.confand confirm with the Enter key. A configuration text file will open. In it find (CTRL + F) the line HandleLidSwitch=suspend, replace suspend with the word ignore and save the file via CTRL + S (or File » Save). Then go back to your terminal app and enter the commandsudo systemctl restart systemd-login and again confirm with the Enter key.
updated by bios to latest version with tool for windows (huawei pc manager). I hope I can disable modern stadby (also I tryed to enable extended mode in bios - not working for me)
disabled swap (sudo swappoff -a , sudo systemctl mask dev-zram0.swap)
2.1) check your /etc/fstab for swap partions (remove if you found this)
but finally helped only one thing - remove internal tool for manage battery usage (sudo dnf remove power-profiles-daemon, sudo systemctl mask systemd-rfkill.service systemd-rfkill.socket)
None of those worked.
Then from the answers of the reddit thread, I tried the following:
Thanks for that!
I had a very similar issue (as of October 2022). Let me describe it for future generations:
When the lid was closed, sleep was triggered, and I could not wake the system up.
cat /etc/systemd/logind.conf
changed HandleLidSwitch & HandleLidSwitchExternalPower to hibernate
I edited the config, but when I try sudo systemctl restart systemd-login I get the following error Failed to restart systemd-login.service: Unit systemd-login.service not found.
I read some things about the swap and zram, but did not really feel up to change any configs as I did not want to tinker with the wrong solution. How do I configure proper swap space?
You seem to be asking questions but have not provided all the info needed for us to answer. The link you asked about is good for managing swap with zram, but does not say anything about physical swap space (which is required for hibernation)
What is the output of zramctl?
What is the output of free?
Is the system hibernating or suspending?
To set up a physical swap space this is a good reference.
Note however, that swap of this sort on a btrfs file system is not ideal due to the way the btrfs file system is managed. It may be better to create a swap partition instead of using a swapfile on a btrfs file system.
This is the outout of cat /etc/systemd/sleep.conf:
#AllowSuspend=yes
#AllowHibernation=no
#AllowSuspendThenHibernate=no
#AllowHybridSleep=no
#SuspendMode=mem
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
#HibernateDelaySec=120min
The zramctl does not give any output whatsoever. It just makes a new line in the terminal. Free gives the following:
total used free shared buff/cache available
Mem: 16290436 4086312 7466372 391176 4737752 11474404
Swap: 0 0 0
If swap partitions are the preferable way to go, I don"t mind doing it. I have read in one tutorial, which was not on ask.fedora that in order to create a swap partition I have to setup a new installation of fedora. Is that correct?
No, a new installation should not be required just to set up a swap partition.
Instead you should be investigating why you have no swap at all. Even zram does not exist according to those outputs.
I am not an expert on zram swap, but this info should allow someone who is to jump in and guide you in getting swap properly configured.
Thank you for your help Jeff and for pointing a fairly inexperienced linux user in the right direction. Ill tinker a bit around with zram and swaps. Ill post if this fixes this issue.