You are not logged in.

#1 2013-09-25 09:10:35

diederick76
Member
Registered: 2010-02-14
Posts: 133

[solved] Unloading modules before suspend to disk

Hi, I'm trying to get my Asus U36jc to suspend to disk and resume. Suspending seems to go fine, but after resuming I get an unresponsive notebook (no response on key presses or ping) showing a black screen. Then immediately the fan gets louder and the notebook gets warmer.

Just before the machine goes to sleep, I see this in my screen:

xhci_hcd 0000:04:00.0: PCI post-resume error -110!
xhci_hcd 0000:04:00.0: HC died; cleaning up
xhci_hcd 0000:04:00.0: HC died; cleaning up
dpm_run_callback(): pci_pm_resume+0x0/0xb0 returns -110
PM: Device 0000:04:00.0 failed to resume async: error -110
hda-codec: out of range cmd 0:20:400:fffff7ff

I found this guide (https://www.kernel.org/doc/Documentatio … ugging.txt) and using that I determined that when I first remove modules ehci_pci, ehci_hcd and xhci_hcd, suspend to disk and resume seem to work fine.

I found out here (https://wiki.archlinux.org/index.php/Pm … end_to_RAM) how to unload modules prior to suspending to RAM, but that doesn't seem to work for suspend to disk, and I can't find how to unload modules prior to that. Can someone tell me how to do that?

Thanks for any help!

Last edited by diederick76 (2013-09-25 20:27:36)

Offline

#2 2013-09-25 18:18:26

andy123
Member
Registered: 2011-11-04
Posts: 169
Website

Re: [solved] Unloading modules before suspend to disk

This should be doable with a systemd service. Maybe Type=oneshot and Before=sleep.target or something?

I think tlp has a service that does stuff on suspend, if you need an example.

Plus, isn't pm-utils deprecated anyways?


i'm sorry for my poor english wirting skills…

Offline

#3 2013-09-25 20:03:54

diederick76
Member
Registered: 2010-02-14
Posts: 133

Re: [solved] Unloading modules before suspend to disk

I'm not sure if pm-utils is deprecated, it doesn't say so here (https://wiki.archlinux.org/index.php/Pm-utils). In any case its a dependency of upower, which is a dependency of kdelibs, so as long as I want to use KDE my harddrive is stuck with it.

However, I decided to try your suggestion to use systemd:

# asus36JC.service

[Unit]
Description=Script upon suspend/resume
Before=sleep.target
StopWhenUnneeded=no

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/home/diederick/bin/no_modules
ExecStop=/home/diederick/bin/modules

[Install]
WantedBy=sleep.target

It seemed to work perfectly for a couple of times in a row (modules were there before and afterwards) until I restarted the notebook, when the problem was back. But then I remembered to enable the service and now it works. Thanks a lot!

Offline

#4 2013-09-25 20:22:49

andy123
Member
Registered: 2011-11-04
Posts: 169
Website

Re: [solved] Unloading modules before suspend to disk

Yay for being helpful! I'm glad your problem is solved and I'm sure you are too, so please let people know by marking this thread as [solved].


i'm sorry for my poor english wirting skills…

Offline

#5 2016-10-06 05:27:43

branthebuilder
Member
Registered: 2016-10-01
Posts: 35

Re: [solved] Unloading modules before suspend to disk

Sorry to necrobump, but this is relevant to my thread https://bbs.archlinux.org/viewtopic.php … 2#p1659092.  What were the contents of your /home/$USER/bin/no_modules and .../modules files?

Offline

#6 2016-10-06 05:39:59

diederick76
Member
Registered: 2010-02-14
Posts: 133

Re: [solved] Unloading modules before suspend to disk

I don't remember. Sorry. With Plasma 5 I have no need for this anymore.

Offline

Board footer

Powered by FluxBB