How do I enable kernel option MMC_UNSAFE_RESUME











up vote
1
down vote

favorite












I am trying sleep and wake up my Kobo Mini ebook reader manually by using the command rtcwake. The reader is using busybox.
cat /proc/version gives me this output:
Linux version 2.6.35.3-850-gbc67621+ (gallen@gallen-P5KPL-AM-BM) (gcc version 4.4.4 (4.4.4_09.06.2010) ) #617 PREEMPT Mon Apr 22 11:07:47 CST 2013



rtcwake sets the reader to sleep but fails with this message:
wakeup from "mem" at Wed Nov 13 18:02:44 2013

rtcwake: short write


...and does not wake up again. After some googling I tracked the error down to the removable micro sd card which the reader uses as its primary (and only) storage. Which means that the whole system is running on that sd card which is being removed on standby.

I also found another user with the same problem on a completely different device but also with a removable sd card as the primary storage. He solved the problem by enabling the kernel option/parameter
MMC_UNSAFE_RESUME.



Now my question: How do I set/enable/activate this parameter?
Do I have to recompile the kernel?










share|improve this question




























    up vote
    1
    down vote

    favorite












    I am trying sleep and wake up my Kobo Mini ebook reader manually by using the command rtcwake. The reader is using busybox.
    cat /proc/version gives me this output:
    Linux version 2.6.35.3-850-gbc67621+ (gallen@gallen-P5KPL-AM-BM) (gcc version 4.4.4 (4.4.4_09.06.2010) ) #617 PREEMPT Mon Apr 22 11:07:47 CST 2013



    rtcwake sets the reader to sleep but fails with this message:
    wakeup from "mem" at Wed Nov 13 18:02:44 2013

    rtcwake: short write


    ...and does not wake up again. After some googling I tracked the error down to the removable micro sd card which the reader uses as its primary (and only) storage. Which means that the whole system is running on that sd card which is being removed on standby.

    I also found another user with the same problem on a completely different device but also with a removable sd card as the primary storage. He solved the problem by enabling the kernel option/parameter
    MMC_UNSAFE_RESUME.



    Now my question: How do I set/enable/activate this parameter?
    Do I have to recompile the kernel?










    share|improve this question


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am trying sleep and wake up my Kobo Mini ebook reader manually by using the command rtcwake. The reader is using busybox.
      cat /proc/version gives me this output:
      Linux version 2.6.35.3-850-gbc67621+ (gallen@gallen-P5KPL-AM-BM) (gcc version 4.4.4 (4.4.4_09.06.2010) ) #617 PREEMPT Mon Apr 22 11:07:47 CST 2013



      rtcwake sets the reader to sleep but fails with this message:
      wakeup from "mem" at Wed Nov 13 18:02:44 2013

      rtcwake: short write


      ...and does not wake up again. After some googling I tracked the error down to the removable micro sd card which the reader uses as its primary (and only) storage. Which means that the whole system is running on that sd card which is being removed on standby.

      I also found another user with the same problem on a completely different device but also with a removable sd card as the primary storage. He solved the problem by enabling the kernel option/parameter
      MMC_UNSAFE_RESUME.



      Now my question: How do I set/enable/activate this parameter?
      Do I have to recompile the kernel?










      share|improve this question















      I am trying sleep and wake up my Kobo Mini ebook reader manually by using the command rtcwake. The reader is using busybox.
      cat /proc/version gives me this output:
      Linux version 2.6.35.3-850-gbc67621+ (gallen@gallen-P5KPL-AM-BM) (gcc version 4.4.4 (4.4.4_09.06.2010) ) #617 PREEMPT Mon Apr 22 11:07:47 CST 2013



      rtcwake sets the reader to sleep but fails with this message:
      wakeup from "mem" at Wed Nov 13 18:02:44 2013

      rtcwake: short write


      ...and does not wake up again. After some googling I tracked the error down to the removable micro sd card which the reader uses as its primary (and only) storage. Which means that the whole system is running on that sd card which is being removed on standby.

      I also found another user with the same problem on a completely different device but also with a removable sd card as the primary storage. He solved the problem by enabling the kernel option/parameter
      MMC_UNSAFE_RESUME.



      Now my question: How do I set/enable/activate this parameter?
      Do I have to recompile the kernel?







      kernel busybox sd-card






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 7 at 23:32









      Rui F Ribeiro

      38.7k1479128




      38.7k1479128










      asked Nov 13 '13 at 17:15









      Tomme

      61




      61






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote













          I think you do have to recompile the kernel. Grepping the 3.11 source, it is not mentioned in [src]/Documentation/kernel-parameters, which is where command-line params for the kernel are documented. It's not mentioned in other docs either.



          Of course, there could be a param that does not literally mention MMC_UNSAFE_RESUME. There are some documented options for tweaking the resume from hibernation/sleep, but in order to assume one of those is useful this way, they would probably need to be connected somehow to MMC_UNSAFE_RESUME in the source.



          So, it's declared in [src]/drivers/mmc/core/core.c, and used to set the value of an exported symbol, mmc_assume_removable. The only place this is used is in in [src]//include/linux/mmc/host.h to influence the return value of an inline function.



          That's far from a conclusive analysis -- and of course there may be another way to get what you want, a /proc setting, etc. -- but looking at some of the dev discussion about this, I doubt very much it will have anything to do with MMC_UNSAFE_RESUME; in most contexts it would be something most people would want to avoid at all costs, particularly since individual drivers can accomplish the same thing on a per device basis (whereas that switch is global).






          share|improve this answer





















          • Thanks to your hints I remebered that I saw the url to the readers sourcecode some weeks ago. I downloaded it and then grepped the parameter but in any case it was set to "Y" which means that is already enabled. Doesn't it? So I need to find a new approach.
            – Tomme
            Nov 16 '13 at 15:23










          • Could easily be -- a bunch of the ARM architectures have that set in their Kconfig files.
            – goldilocks
            Nov 16 '13 at 16:17


















          up vote
          1
          down vote













          Yes, normally the kernel unmounts the file system on removable media when it goes to sleep because of the concern that you will unplug the card while the system is sleeping. It then does the remount when it resumes.



          If you "promise" that you will not remove the MMC card(s) you can set the MMC_UNSAFE_RESUME kernel option. This will essentially tell the kernel that you consider the MMC drive as permanent storage. So it won't unmount and remount the device.



          But you do need to rebuild the kernel for this.



          If you are still having trouble resuming from a sleep, another thing to do is add "debug" to the kernel boot params. This will add verbose output to the console, and many drivers will report their status as they wake up. So if a driver hangs on resume, you may be able to identify which one.






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f101054%2fhow-do-i-enable-kernel-option-mmc-unsafe-resume%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote













            I think you do have to recompile the kernel. Grepping the 3.11 source, it is not mentioned in [src]/Documentation/kernel-parameters, which is where command-line params for the kernel are documented. It's not mentioned in other docs either.



            Of course, there could be a param that does not literally mention MMC_UNSAFE_RESUME. There are some documented options for tweaking the resume from hibernation/sleep, but in order to assume one of those is useful this way, they would probably need to be connected somehow to MMC_UNSAFE_RESUME in the source.



            So, it's declared in [src]/drivers/mmc/core/core.c, and used to set the value of an exported symbol, mmc_assume_removable. The only place this is used is in in [src]//include/linux/mmc/host.h to influence the return value of an inline function.



            That's far from a conclusive analysis -- and of course there may be another way to get what you want, a /proc setting, etc. -- but looking at some of the dev discussion about this, I doubt very much it will have anything to do with MMC_UNSAFE_RESUME; in most contexts it would be something most people would want to avoid at all costs, particularly since individual drivers can accomplish the same thing on a per device basis (whereas that switch is global).






            share|improve this answer





















            • Thanks to your hints I remebered that I saw the url to the readers sourcecode some weeks ago. I downloaded it and then grepped the parameter but in any case it was set to "Y" which means that is already enabled. Doesn't it? So I need to find a new approach.
              – Tomme
              Nov 16 '13 at 15:23










            • Could easily be -- a bunch of the ARM architectures have that set in their Kconfig files.
              – goldilocks
              Nov 16 '13 at 16:17















            up vote
            1
            down vote













            I think you do have to recompile the kernel. Grepping the 3.11 source, it is not mentioned in [src]/Documentation/kernel-parameters, which is where command-line params for the kernel are documented. It's not mentioned in other docs either.



            Of course, there could be a param that does not literally mention MMC_UNSAFE_RESUME. There are some documented options for tweaking the resume from hibernation/sleep, but in order to assume one of those is useful this way, they would probably need to be connected somehow to MMC_UNSAFE_RESUME in the source.



            So, it's declared in [src]/drivers/mmc/core/core.c, and used to set the value of an exported symbol, mmc_assume_removable. The only place this is used is in in [src]//include/linux/mmc/host.h to influence the return value of an inline function.



            That's far from a conclusive analysis -- and of course there may be another way to get what you want, a /proc setting, etc. -- but looking at some of the dev discussion about this, I doubt very much it will have anything to do with MMC_UNSAFE_RESUME; in most contexts it would be something most people would want to avoid at all costs, particularly since individual drivers can accomplish the same thing on a per device basis (whereas that switch is global).






            share|improve this answer





















            • Thanks to your hints I remebered that I saw the url to the readers sourcecode some weeks ago. I downloaded it and then grepped the parameter but in any case it was set to "Y" which means that is already enabled. Doesn't it? So I need to find a new approach.
              – Tomme
              Nov 16 '13 at 15:23










            • Could easily be -- a bunch of the ARM architectures have that set in their Kconfig files.
              – goldilocks
              Nov 16 '13 at 16:17













            up vote
            1
            down vote










            up vote
            1
            down vote









            I think you do have to recompile the kernel. Grepping the 3.11 source, it is not mentioned in [src]/Documentation/kernel-parameters, which is where command-line params for the kernel are documented. It's not mentioned in other docs either.



            Of course, there could be a param that does not literally mention MMC_UNSAFE_RESUME. There are some documented options for tweaking the resume from hibernation/sleep, but in order to assume one of those is useful this way, they would probably need to be connected somehow to MMC_UNSAFE_RESUME in the source.



            So, it's declared in [src]/drivers/mmc/core/core.c, and used to set the value of an exported symbol, mmc_assume_removable. The only place this is used is in in [src]//include/linux/mmc/host.h to influence the return value of an inline function.



            That's far from a conclusive analysis -- and of course there may be another way to get what you want, a /proc setting, etc. -- but looking at some of the dev discussion about this, I doubt very much it will have anything to do with MMC_UNSAFE_RESUME; in most contexts it would be something most people would want to avoid at all costs, particularly since individual drivers can accomplish the same thing on a per device basis (whereas that switch is global).






            share|improve this answer












            I think you do have to recompile the kernel. Grepping the 3.11 source, it is not mentioned in [src]/Documentation/kernel-parameters, which is where command-line params for the kernel are documented. It's not mentioned in other docs either.



            Of course, there could be a param that does not literally mention MMC_UNSAFE_RESUME. There are some documented options for tweaking the resume from hibernation/sleep, but in order to assume one of those is useful this way, they would probably need to be connected somehow to MMC_UNSAFE_RESUME in the source.



            So, it's declared in [src]/drivers/mmc/core/core.c, and used to set the value of an exported symbol, mmc_assume_removable. The only place this is used is in in [src]//include/linux/mmc/host.h to influence the return value of an inline function.



            That's far from a conclusive analysis -- and of course there may be another way to get what you want, a /proc setting, etc. -- but looking at some of the dev discussion about this, I doubt very much it will have anything to do with MMC_UNSAFE_RESUME; in most contexts it would be something most people would want to avoid at all costs, particularly since individual drivers can accomplish the same thing on a per device basis (whereas that switch is global).







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 13 '13 at 18:17









            goldilocks

            61.4k13150205




            61.4k13150205












            • Thanks to your hints I remebered that I saw the url to the readers sourcecode some weeks ago. I downloaded it and then grepped the parameter but in any case it was set to "Y" which means that is already enabled. Doesn't it? So I need to find a new approach.
              – Tomme
              Nov 16 '13 at 15:23










            • Could easily be -- a bunch of the ARM architectures have that set in their Kconfig files.
              – goldilocks
              Nov 16 '13 at 16:17


















            • Thanks to your hints I remebered that I saw the url to the readers sourcecode some weeks ago. I downloaded it and then grepped the parameter but in any case it was set to "Y" which means that is already enabled. Doesn't it? So I need to find a new approach.
              – Tomme
              Nov 16 '13 at 15:23










            • Could easily be -- a bunch of the ARM architectures have that set in their Kconfig files.
              – goldilocks
              Nov 16 '13 at 16:17
















            Thanks to your hints I remebered that I saw the url to the readers sourcecode some weeks ago. I downloaded it and then grepped the parameter but in any case it was set to "Y" which means that is already enabled. Doesn't it? So I need to find a new approach.
            – Tomme
            Nov 16 '13 at 15:23




            Thanks to your hints I remebered that I saw the url to the readers sourcecode some weeks ago. I downloaded it and then grepped the parameter but in any case it was set to "Y" which means that is already enabled. Doesn't it? So I need to find a new approach.
            – Tomme
            Nov 16 '13 at 15:23












            Could easily be -- a bunch of the ARM architectures have that set in their Kconfig files.
            – goldilocks
            Nov 16 '13 at 16:17




            Could easily be -- a bunch of the ARM architectures have that set in their Kconfig files.
            – goldilocks
            Nov 16 '13 at 16:17












            up vote
            1
            down vote













            Yes, normally the kernel unmounts the file system on removable media when it goes to sleep because of the concern that you will unplug the card while the system is sleeping. It then does the remount when it resumes.



            If you "promise" that you will not remove the MMC card(s) you can set the MMC_UNSAFE_RESUME kernel option. This will essentially tell the kernel that you consider the MMC drive as permanent storage. So it won't unmount and remount the device.



            But you do need to rebuild the kernel for this.



            If you are still having trouble resuming from a sleep, another thing to do is add "debug" to the kernel boot params. This will add verbose output to the console, and many drivers will report their status as they wake up. So if a driver hangs on resume, you may be able to identify which one.






            share|improve this answer

























              up vote
              1
              down vote













              Yes, normally the kernel unmounts the file system on removable media when it goes to sleep because of the concern that you will unplug the card while the system is sleeping. It then does the remount when it resumes.



              If you "promise" that you will not remove the MMC card(s) you can set the MMC_UNSAFE_RESUME kernel option. This will essentially tell the kernel that you consider the MMC drive as permanent storage. So it won't unmount and remount the device.



              But you do need to rebuild the kernel for this.



              If you are still having trouble resuming from a sleep, another thing to do is add "debug" to the kernel boot params. This will add verbose output to the console, and many drivers will report their status as they wake up. So if a driver hangs on resume, you may be able to identify which one.






              share|improve this answer























                up vote
                1
                down vote










                up vote
                1
                down vote









                Yes, normally the kernel unmounts the file system on removable media when it goes to sleep because of the concern that you will unplug the card while the system is sleeping. It then does the remount when it resumes.



                If you "promise" that you will not remove the MMC card(s) you can set the MMC_UNSAFE_RESUME kernel option. This will essentially tell the kernel that you consider the MMC drive as permanent storage. So it won't unmount and remount the device.



                But you do need to rebuild the kernel for this.



                If you are still having trouble resuming from a sleep, another thing to do is add "debug" to the kernel boot params. This will add verbose output to the console, and many drivers will report their status as they wake up. So if a driver hangs on resume, you may be able to identify which one.






                share|improve this answer












                Yes, normally the kernel unmounts the file system on removable media when it goes to sleep because of the concern that you will unplug the card while the system is sleeping. It then does the remount when it resumes.



                If you "promise" that you will not remove the MMC card(s) you can set the MMC_UNSAFE_RESUME kernel option. This will essentially tell the kernel that you consider the MMC drive as permanent storage. So it won't unmount and remount the device.



                But you do need to rebuild the kernel for this.



                If you are still having trouble resuming from a sleep, another thing to do is add "debug" to the kernel boot params. This will add verbose output to the console, and many drivers will report their status as they wake up. So if a driver hangs on resume, you may be able to identify which one.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered May 28 '14 at 17:42









                frank

                111




                111






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f101054%2fhow-do-i-enable-kernel-option-mmc-unsafe-resume%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Morgemoulin

                    Scott Moir

                    Souastre