I’m finding that my Framework 13 AMD Ryzen AI 370 (upgraded from 12th gen Intel) frequently wakes up with the lid closed in my bag. I’ve seen several threads about the same problem with the Framework 16, and 13 with Ryzen 7040, e.g.
but no concrete threads about this problem on the latest Ryzen AI 300 series.
I’m using openSUSE Tumbleweed Linux with kernel 6.17.5-1-default. I can’t see how to get the BIOS version via fwupmgr or similar 
Does anyone know if this is a known issue with the 13 with latest Ryzen AI 300 installed, and if so what to do? I was very concerned to see that the problem was apparently not resolved for ~1.5 years on the 16 which seems incredible for such a critical issue.
I’m not sure if it’s relevant, but I upgraded to the stiffer hinge kit as part of the AMD upgrade, so I wonder if there’s some lid sensor which I could have somehow screwed up during the upgrade?
Any tips very welcome, thanks!
After some more research, I found the recommendation to use Making sure you're not a bot! from amd-debug-tools, so I’ll try that and report back.
I do not know, how it look like with FW13, but in FW 16 gen 1 there was an issue with keyboard which was wakening up laptop from the sleep. with enough preser on lid, it was causing button press and waking up the laptop. It was fixed recently in FW 16 with bios 4.02 and keyboard firmware update
I’m running the following service on my ubuntu. It disables all events on the OS level that can wake up the device except the power button (so the only way to wake the device up is with a power button, I don’t mind). Check if this works for you at first:
[Unit]
Description=Disable Wakeup on Devices
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/bin/bash -c “echo disabled > /sys/devices/platform/AMDI0010:03/i2c-1/i2c-PIXA3854:00/power/wakeup”
ExecStartPost=/bin/bash -c “for device in /sys/bus/usb/devices/*/power/wakeup; do echo disabled > “$device”; done”
ExecStartPost=/bin/bash -c “find /sys/devices -type f -name ‘wakeup’ | awk ‘{print "echo disabled | sudo tee " $0}’ | bash”
ExecStartPost=/bin/bash -c “echo -n ‘enabled’ > /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/power/wakeup”
[Install]
WantedBy=multi-user.target
I wrote about this in my blog: Framework 13 AMD wakeup udev rules
tldr; these are my commected udev rules, you probably want at least the last 2 config lines in your udev rules:
# 0x0e8d:0xe61 bluetooth (usb device). This is the wakeup signal of the mediatek wifi/bt card and wakes the laptop if a connected bluetooth device becomes active.
ACTION=="add", ATTR{vendor}=="0x0e8d", ATTR{device}=="0xe616", ATTR{power/wakeup}="disabled"
# /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:44/PNP0C09:00/PNP0C0D:00 lid switch
ACTION=="add", SUBSYSTEM=="acpi", DRIVER=="button", ATTRS{hid}=="PNP0C0D", ATTR{power/wakeup}="disabled"
# /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00 power button
ACTION=="add", SUBSYSTEM=="acpi", DRIVER=="button", ATTRS{hid}=="PNP0C0C", ATTR{power/wakeup}="enabled"
# /sys/devices/platform/AMDI0010:03/i2c-1/i2c-PIXA3854:00 mousepad, seams to also wake on touch alone and is probably quite trigger happy, even in a backpack
ACTION=="add", SUBSYSTEM=="i2c", DRIVER=="i2c_hid_acpi", ATTR{name}=="PIXA3854:00", ATTR{power/wakeup}="disabled"
# /sys/devices/platform/i8042/serio0 / driver=atkbd keyboard
ACTION=="add", SUBSYSTEM=="serio", DRIVER=="atkbd", ATTR{power/wakeup}="disabled"