This worked on my HP Elitebook 845 G7 in Fedora 43

HP Elitebook 845 G7 wake from suspend crash fix - comprehensive solution
including USB auto-suspend disable, CPU C-state limit, and IOMMU off

Step 1. Update grub GRUB_CMDLINE_LINUX value
sudo nano /etc/default/grub
GRUB_CMDLINE_LINUX="amdgpu.dcdebugmask=0x10 amd_iommu=off iommu=pt 
rtw88_pci.disable_msi=1 usbcore.autosuspend=-1 processor.max_cstate=1"

Step 2. Reload grub and reboot
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
suco reboot

Step 3. Create disable usb suspend systemd service
sudo nano /etc/systemd/system/disable-usb-suspend.service
[Unit]
Description=Disable USB auto-suspend
Before=sleep.target

[Service]
Type=oneshot
ExecStart=/bin/sh -c 'for i in /sys/bus/usb/devices/*/power/control; do echo on 
> $i; done'

[Install]
WantedBy=sleep.target

Step 4. Enable and start disable usb suspend systemd service
sudo systemctl enable disable-usb-suspend.service
sudo systemctl start disable-usb-suspend.service

Step 5. Set When inactive and When laptop lid is closed setting to Sleep in KDE 
Settings:
a.Open KDE Settings Power Management
b. Set When inactive and When laptop lid is closed setting to Sleep or click 
Defaults button if you want to reset all settings to sleep when inactive and 
laptop is closed while on battery, on AC power and on low battery.
c. Click the Apply button
d. Close the laptop lid to let the laptop sleep.
e. Open the laptop lid. Notice login screen is displayed.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1966519

Title:
  hard shutdown after close laptop lid

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1966519/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to