Created attachment 301465 [details] dell-7390_freeze-thunderbolt.html This performance issue was found running sleepgraph on linux 5.19.0-rc7 on the Dell XPS 13 7390 2-in-1. For reasons unknown, the thunderbolt device takes a full 8 seconds to suspend and a full 8 seconds to resume even though no physical devices are connected. The issue seems to occur in the both the dpm_suspend and dpm_resume phase. There are 4 thunderbolt devices: 2 pcieports and 2 thunderbolt NHIs. The suspend & resume callbacks for these devices spawn async threads that take 8 seconds to complete. The time is shown at the end of dpm_suspend/dpm_resume when async_synchronize_full is called. The time appears to be spent in the ACPI calls: \_SB.PCIO.TBT0._ON and \_SB.PCIO.TBT1._ON. If I disable the 4 thunderbolt devices and run another suspend/resume, the issue goes away. So if thunderbolt is not needed, you can avoid this issue by running this script at boot: #!/bin/sh if [ $USER != "root" ]; then echo "Can only be run as root" exit fi THUNPCI1="/sys/bus/pci/devices/0000:00:07.2" THUNPCI2="/sys/bus/pci/devices/0000:00:07.0" THUNDEV="/sys/bus/pci/drivers/thunderbolt" if [ -e $THUNDEV/0000:00:0d.3 ]; then echo 0000:00:0d.3 > $THUNDEV/unbind fi if [ -e $THUNDEV/0000:00:0d.2 ]; then echo 0000:00:0d.2 > $THUNDEV/unbind fi if [ -e $THUNPCI1 ]; then echo 1 > $THUNPCI1/remove fi if [ -e $THUNPCI2 ]; then echo 1 > $THUNPCI2/remove fi I'm attaching two sleepgraph timelines. The first is the problem timeline run with thunderbolt enabled. The second is run with thunderbolt disabled with the above script. dell-7390_freeze-thunderbolt.html dell-7390_freeze-thunderbolt-removed.html The dmesg logs and system info are in the timelines themselves. Just click the "dmesg" and "log" buttons in the upper right hand corner of the timelines.
Created attachment 301466 [details] dell-7390_freeze-thunderbolt-removed.html
Created attachment 301467 [details] dell-9300_freeze-thunderbolt.html
Created attachment 301468 [details] dell-9300_freeze-thunderbolt-removed.html
I just confirmed the exact same issue on the dell XPS 13 9300. Both this as the 7390 are Ice Lake machines. Attached are the before and after thunderbolt timelines.
Created attachment 301469 [details] otcpl-dell-9300-icl_freeze-thunderbolt.html
Created attachment 301470 [details] otcpl-dell-9300-icl_freeze-thunderbolt-removed.html