cubieplayer / Cubian

Debian for Cubieboard
http://cubian.org
271 stars 49 forks source link

rtcwake: ext-4 readonly mounted after wakeup #285

Closed ghost closed 9 years ago

ghost commented 10 years ago

Hello,

I get a readonly remount of my SDCARD ext4 partition after wakeup from suspend using rtcwake.

I need to reboot to recover from this. My system is:

Linux Cubian 3.4.75-sun4i #36 PREEMPT Sat Feb 8 03:55:37 CST 2014 armv7l GNU/Linux

Thanks!!!

opless commented 10 years ago

Have you tried remounting the partition?

Generic instructions here: http://askubuntu.com/questions/175739/how-do-i-remount-a-filesystem-as-read-write

ghost commented 10 years ago

yes, but this is not working, it will not take any command after wakeup at all - simply says "command not found" and something about the readonly mount of the partitions ... you can try it yourself - I did a simple: rtcwake -s 10

ghost commented 10 years ago

Here is some log output:

Apr 3 17:32:19 Cubian drvmon: =========================================== Apr 3 17:32:19 Cubian drvmon: Monitoring activity from the disks daemon. Press Ctrl+C to cancel. Apr 3 17:32:19 Cubian drvmon: =========================================== Apr 3 17:32:19 Cubian drvmon: changed: /org/freedesktop/UDisks/devices/sda1 Apr 3 17:32:28 Cubian kernel: [109171.463460] PM: suspend entry 2014-04-03 15:32:28.804135197 UTC Apr 3 17:32:29 Cubian kernel: [109171.466556] PM: Syncing filesystems ... done. Apr 3 17:32:29 Cubian kernel: [109172.040111] mmc0: card b368 removed

opless commented 10 years ago

I think the readonly message is a red herring.

From the last line of the log, it looks like the filesystem has vanished completely.

There's a couple of things you could do. (Or at least what I would investigate)

  1. Install cubian onto the internal flash.

or

  1. Look into rtcwake's shutdown process and stop it "removing" mmc0. (I'm just a cubian user, and mine are all in use currently)

perhaps even...

  1. Having it do something along the lines of what's described here on wakeup. http://unix.stackexchange.com/questions/89207/resetting-mmc-controller-without-physically-removing-the-card

Let us know how you get on!

ghost commented 10 years ago

I think the problem is a missing kernel option:

https://github.com/Xilinx/linux-xlnx/issues/23

One needs to enable MMC_UNSAFE_RESUME if the root is on a MMC.

Can someone please fix this for the cubian kernel? Thank you :D

michalliu commented 9 years ago

MMC_UNSAFE_RESUME is enabled in latest linux 3.4.79