Found a fix for ryzen laptops that don't like to wake up from sleep (Tried for 7000 series and AI 300 series)

Posted by MrGoose48@reddit | linux | View on Reddit | 34 comments

So about two months back I bought the Acer Swift 14 AI with a ryzen AI 365 / 32 gigs of ram / 1TB drive for about 650ish. Was a pretty good deal, installed arch and besides the wrestling match to get the speakers to play audio I was having a great experience.

It wasn't until I started putting it into my bag and putting the device to sleep that I would notice. I would leave my morning uni class and go get coffee with a friend and then when I pull my laptop out to take some notes down before the next class, it wouldn't wake up. Kind of thing where you mash the caps key or press the space bar a few times, but after 1-2 minutes I gave up and had to hard power off, and turn on the machine again to get it to get back into linux. This issue was so bad that I considered going back to windows all together because after two months I was tired of it, but then read an interesting forum post from another user seeing that the iommu would have issues waking up.

I use systemd boot, so I went to the conf file in /boot/loader/entries/ to edit my arch.conf.

under the options line, I added amd_iommu=off at the end, saved it, rebooted. I have never had an issue since I added it.

For grub you would have to edit the grub config file in /etc/default/grub

at the line GRUB_CMDLINE_LINUX_DEFAULT= add amd_iommu=off, save it and then update the grub.

Hope this fixes the issue for someone else, because even after asking other people and suggesting it was kernel panic I wasn't able to find a fix.