https://bugzilla.kernel.org/show_bug.cgi?id=210689
--- Comment #10 from Daniele (crudo.dani...@gmail.com) --- I think I finally found a workaround, about 20 successful shutdowns, it never happened before! My last attempt was to look at the ACPI tables: luckily I know that they exist, that they can have bugs, that they can be fixed and that they can be injected at boot. I know that method _PTS is responsible for S states, S5 included. My first attempt was to dump my DSDT and fix only all the errors (mostly some wrong lengths, invalid objects and other minor things): compiled and injected, it didn't work, always randomly hangs on shutdown. Then, I modified the code of the _PTS method. Original code: Method (_PTS, 1, NotSerialized) // _PTS: Prepare To Sleep { If (((Arg0 == 0x04) && (OSFL () == 0x02))) { Sleep (0x0BB8) } PTS (Arg0) DBG8 = Arg0 WAKP [Zero] = Zero WAKP [One] = Zero WSSB = ASSB /* \ASSB */ WOTB = AOTB /* \AOTB */ WAXB = AAXB /* \AAXB */ ASSB = Arg0 AOTB = OSFL () AAXB = Zero \_SB.SLPS = One } Modified code: Method (_PTS, 1, NotSerialized) { If (LEqual (Arg0, 0x05)) {} Else { Store (Arg0, DBG8) If (LAnd (LEqual (Arg0, 0x04), LEqual (OSFL (), 0x02))) { Sleep (0x0BB8) } PTS (Arg0) Store (Zero, Index (WAKP, Zero)) Store (Zero, Index (WAKP, One)) Store (ASSB, WSSB) Store (AOTB, WOTB) Store (AAXB, WAXB) Store (Arg0, ASSB) Store (OSFL (), AOTB) Store (Zero, AAXB) Store (One, \_SB.SLPS) } } I really know near nothing about code in the DSDT, the "fixed" code is found on internet, to fix sleep/restart on hackintosh machines for a different mainboard. I noticed that most of the variables were identical to mine and I noticed a new if cycle containing Arg0=0x05, which complains the S5 state. Compiled and injected, no more issues! I really don't know why this could randomly cause hangs at shutdown, but it would be good if the kernel could be modified to work without injecting a custom DSDT: I know it's a firmware bug, and I don't know if it can be fixed kernel side, maybe some guru can give more light on this. I noticed a lot of new discussions around about hangs of shutdown, without solutions, maybe DSDT is the workaround to go in these situations. Following attachments of the dsl files of the original DSDT and the patched one, for ASUS Z9PED8-WS, bios v. 5802 -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ acpi-bugzilla mailing list acpi-bugzilla@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla