openSUSE 13.1 resume from suspend to RAM

Hello,

I am running openSUSE 13.1 x86_64 (3.11.10-21-desktop, systemd-208-23.3) with KDE 4.11.5 on my Acer Aspire V3-771G (i7-3632QM, NVIDIA 740M). For a while now I have been using bumblebee (nvidia-bumblebee-340.32-2.1) but this problem appearead also before. I think that it even was right after installation of 13.1 (end of 2013). I read the thread with similar title “openSUSE 13.1 KDE inconsistant resume from Suspend to RAM” but the issue seems different.

The thing is that only some times after waking up from sleep it seems that it did not complete the whole resume procedure and NetworkManager is not working, there is some kind of lock in filesystems /var/run and,or /var/lock, my custom /etc/pm/sleep.d/00keep_spinning script (which simply executes “/sbin/hdparm -B 254 /dev/sda”) is not executed or fails.
If I restart my laptop, right after all normal shutdown messages, messages about busy partitions are issued and shutdown hangs so I have to power cycle my laptop with the power button:

Could not unmount /var/lock: Device or resource busy
Could not unmount /var/run: Device or resource busy

My filesystems are:

kaspars@acer-laptop:~> df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda6        35G   13G   21G  39% /
devtmpfs        3.9G   24K  3.9G   1% /dev
tmpfs           3.9G  652K  3.9G   1% /dev/shm
tmpfs           3.9G   14M  3.9G   1% /run
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
tmpfs           3.9G   14M  3.9G   1% /var/run
tmpfs           3.9G   14M  3.9G   1% /var/lock
/dev/sda7       435G  365G   69G  85% /home

Right now I can not find a good pm-suspend.log from issue to resume.
I am attaching an excerpt from journald which contains some good resumes and a “bad” resume at Sep 28 10:41.
http://paste.opensuse.org/21142913

Best regards,
Kaspars

On 2014-10-01 21:06, kaspars wrote:

> my custom /etc/pm/sleep.d/00keep_spinning script
> (which simply executes “/sbin/hdparm -B 254 /dev/sda”) is not executed
> or fails.

Put it later. 50somethign.

> If I restart my laptop, right after all normal shutdown messages,
> messages about busy partitions are issued and shutdown hangs so I have
> to power cycle my laptop with the power button:
>
> Code:
> --------------------
> Could not unmount /var/lock: Device or resource busy
> Could not unmount /var/run: Device or resource busy
> --------------------

Weird.

Ah, your “paste” is empty.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” (Elessar))

Had some difficulty uploading to paste.opensuse.
http://pastebin.com/15P1zhd0

Best regards,
Kaspars

Got one:
Here is my pm-suspend.log from a “bad” resume:
http://pastebin.com/iJQ4hKZM
my pm-suspend.log from a normal resume:
http://pastebin.com/0BpMugkY

Best regards,
Kaspars

Hi robin_listas, thank you for your response.

In this case it seems that it is only a consequence not a cause of my problem.

Did some more digging and stumbled upon this thread http://forums.opensuse.org/showthread.php/501099-Suspend-To-RAM-and-kernel-modules and also reviewed more of my problematic resume logs.

It appears that the cause could be the ndiswrapper module.
After the first suspend to RAM, when the system resumes ndiswrapper gets loaded with /usr/lib/pm-utils/sleep.d/75ndiswrapper hook. (It does not get loaded automatically on boot or reboot (do I need it at all?)) After some more suspends at some point it becomes unloadable (Not loadable; that cannot be loaded) and no more pm hooks are executed.
Could this be the case?


acer-laptop:~ # head -1 journal_20141015 
-- Logs begin at Mon 2014-10-13 19:39:01 EEST, end at Wed 2014-10-15 19:57:43 EEST. --

acer-laptop:~ # grep ndiswrapper journal_20141015
Oct 14 16:08:48 acer-laptop.penguin kernel: ndiswrapper version 1.58 loaded (smp=yes, preempt=yes)
Oct 14 16:08:48 acer-laptop.penguin kernel: usbcore: registered new interface driver ndiswrapper
Oct 14 19:27:23 acer-laptop.penguin kernel: usbcore: deregistering interface driver ndiswrapper
Oct 14 19:27:23 acer-laptop.penguin kernel: ndiswrapper version 1.58 loaded (smp=yes, preempt=yes)
Oct 14 19:27:23 acer-laptop.penguin kernel: usbcore: registered new interface driver ndiswrapper
Oct 15 19:57:26 acer-laptop.penguin loadndisdriver[16550]: loadndisdriver: main(548): unable to open ioctl device /dev/ndiswrapper

Could the ndiswrapper module loading be a cause or a consequence?

How should I correctly disable the /usr/lib/pm-utils/sleep.d/75ndiswrapper hook? Does it suffice to simply remove the execute flag?

Best regards,
Kaspars

Thank You, robin_listas, for your input.

It appears that the cause was the ndiswrapper module. Removed the /usr/lib/pm-utils/sleep.d/75ndiswrapper hook and have not had a problem ever since.

Best regards,
Kaspars

On 2014-11-26 21:46, kaspars wrote:
>
> Thank You, robin_listas, for your input.
>
> It appears that the cause was the ndiswrapper module. Removed the
> /usr/lib/pm-utils/sleep.d/75ndiswrapper hook and have not had a problem
> ever since.

Curious. I don’t even have that file anywhere in my system, so I can’t
find out what it is for. I should remember… but I don’t :slight_smile:

Ah, I found out:

https://duckduckgo.com/?q=ndiswrapper&t=opensuse
ndiswrapper.sourceforge.net

+++————————————————————————
NDISwrapper is a free software driver wrapper that enables the use of
Windows XP network device drivers on Linux operating systems.
NDISwrapper works by implementing the Windows kernel and NDIS APIs and
dynamically linking Windows network drivers to this implementation. As a
result, it only works on systems based on the instruction set
architectures supported by Windows, namely IA-32 and x86-64.
————————————————————————+±

Do you need that? If you do, ask in the networking forum how not to use
it, if possible, and use open drivers instead.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

I think that the file was on my 13.1 system by default from package “pm-utils-ndiswrapper”.
It seems that it unloads/loads ndiswrapper when using Suspend to RAM with pm-utils.
Contents:


#!/bin/bash
# The ndiswrapper hook - relead the ndiswrapper module
# TODO: use module_reload from PM_FUNCTIONS


. "${PM_FUNCTIONS}"


command_exists /usr/sbin/ndiswrapper || return $NA


case "$1" in
    resume|thaw)
        modprobe -r ndiswrapper
        modprobe ndiswrapper
        ;;
    *) exit $NA
        ;;
esac

I actually don’t need it (never used it on my system on purpose) as I am fully satisfied by the quality of Atheros open-source drivers for my devices. Very happy! :slight_smile:

Checked that it is not installed on 13.2 by default on my test system.

Best regards,
Kaspars

On 2014-11-27 19:46, kaspars wrote:

> I think that the file was on my 13.1 system by default from package
> “pm-utils-ndiswrapper”.
> It seems that it unloads/loads ndiswrapper when using Suspend to RAM
> with pm-utils.

I meant if you need “ndiswrapper” itself.

> I actually don’t need it (never used it on my system on purpose) as I am
> fully satisfied by the quality of Atheros open-source drivers for my
> devices. Very happy! :slight_smile:

Then remove “ndiswrapper” :slight_smile:

“pm-utils-ndiswrapper” is probably a dependency.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

I have a similar problem that may be related . . .

openSuse 13.2 (x86_64)
Lenovo IdeaPad Y520p with vbox, Linux 3.11.10-21-desktop, KDE, Intel i7, 16GB RAM, 1TB hybrid SSD/HD drive, one nvidia GT755M (no Bumblebee yet).

Everything now works beautifully except that the machine crashes on any attempt (close lid, manual command, etc) to suspend to RAM or HD. It will power off and on normally.

Should I open a new thread?

On 2014-12-12 20:16, pacolaser wrote:

> I have a similar problem that may be related . . .
>
> openSuse 13.2 (x86_64)
> Lenovo IdeaPad Y520p with vbox, Linux 3.11.10-21-desktop, KDE, Intel i7,
> 16GB RAM, 1TB hybrid SSD/HD drive, one nvidia GT755M (no Bumblebee yet).
>
> Everything now works beautifully except that the machine crashes on any
> attempt (close lid, manual command, etc) to suspend to RAM or HD. It
> will power off and on normally.
>
> Should I open a new thread?

Yes, please! :slight_smile:

So far, you have not indicated anything that maybe similar to this
issue. Yes, you have problems with suspend, but not related to
ndiswrapper, as far as we know.

On that new thread, please clarify if you have hybrid video hardware. it
may be an issue.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)