Modules being ignored

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
2
down vote

favorite












/etc/modules includes

bbswitch load_state=0


Every time, bbswitch isn't loaded, and I have to manually:



sudo modprobe bbswitch


Then run bbswitch command to toggle graphics card.



Why isn't it respecting load_state=0?







share|improve this question

























    up vote
    2
    down vote

    favorite












    /etc/modules includes

    bbswitch load_state=0


    Every time, bbswitch isn't loaded, and I have to manually:



    sudo modprobe bbswitch


    Then run bbswitch command to toggle graphics card.



    Why isn't it respecting load_state=0?







    share|improve this question























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      /etc/modules includes

      bbswitch load_state=0


      Every time, bbswitch isn't loaded, and I have to manually:



      sudo modprobe bbswitch


      Then run bbswitch command to toggle graphics card.



      Why isn't it respecting load_state=0?







      share|improve this question













      /etc/modules includes

      bbswitch load_state=0


      Every time, bbswitch isn't loaded, and I have to manually:



      sudo modprobe bbswitch


      Then run bbswitch command to toggle graphics card.



      Why isn't it respecting load_state=0?









      share|improve this question












      share|improve this question




      share|improve this question








      edited Jun 3 at 16:11









      Vlad Spirin

      3203417




      3203417









      asked Jun 3 at 5:27









      Tom Mercer

      5611323




      5611323




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          Without knowing what distribution you are using, the following does apply at least for Ubuntu 16.04 and 18.04, since Ubuntu started to use systemd from 16.04 onwards.



          The old module-loader script /etc/init.d/kmod would allow to put module options into /etc/modules. systemd did replace this script with an own service systemd-modules-load.service. The new method does not allow putting module options into /etc/modules and only accepts the module names each per line.

          If you call /etc/init.d/kmod it will not execute the script but rather call the systemd service systemd-modules-load.service. Further it is better to get used to systemd as it is very unlikely that the old sys-v init scripts will ever experience a comeback and will rather be completely replaced.



          However, if you want to load the bbswitch module with a set of options you have to do the steps as follows.



          Make the module load at boot time.



          root@localhost:~# echo "bbswitch" >> /etc/modules


          Put your options into a /etc/modprobe.d file which is honored each time a module is loaded. So this should be even better to define module parameters. So create the file /etc/modprobe.d/bbswitch.conf and put in the line as follows.



          root@localhost:~# cat /etc/modprobe.d/bbswitch.conf
          options bbswitch load_state=0





          share|improve this answer























          • That was incredibly complicated, but worked. Thank you!
            – Tom Mercer
            Jun 3 at 19:23










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          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',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1043116%2fmodules-being-ignored%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          4
          down vote



          accepted










          Without knowing what distribution you are using, the following does apply at least for Ubuntu 16.04 and 18.04, since Ubuntu started to use systemd from 16.04 onwards.



          The old module-loader script /etc/init.d/kmod would allow to put module options into /etc/modules. systemd did replace this script with an own service systemd-modules-load.service. The new method does not allow putting module options into /etc/modules and only accepts the module names each per line.

          If you call /etc/init.d/kmod it will not execute the script but rather call the systemd service systemd-modules-load.service. Further it is better to get used to systemd as it is very unlikely that the old sys-v init scripts will ever experience a comeback and will rather be completely replaced.



          However, if you want to load the bbswitch module with a set of options you have to do the steps as follows.



          Make the module load at boot time.



          root@localhost:~# echo "bbswitch" >> /etc/modules


          Put your options into a /etc/modprobe.d file which is honored each time a module is loaded. So this should be even better to define module parameters. So create the file /etc/modprobe.d/bbswitch.conf and put in the line as follows.



          root@localhost:~# cat /etc/modprobe.d/bbswitch.conf
          options bbswitch load_state=0





          share|improve this answer























          • That was incredibly complicated, but worked. Thank you!
            – Tom Mercer
            Jun 3 at 19:23














          up vote
          4
          down vote



          accepted










          Without knowing what distribution you are using, the following does apply at least for Ubuntu 16.04 and 18.04, since Ubuntu started to use systemd from 16.04 onwards.



          The old module-loader script /etc/init.d/kmod would allow to put module options into /etc/modules. systemd did replace this script with an own service systemd-modules-load.service. The new method does not allow putting module options into /etc/modules and only accepts the module names each per line.

          If you call /etc/init.d/kmod it will not execute the script but rather call the systemd service systemd-modules-load.service. Further it is better to get used to systemd as it is very unlikely that the old sys-v init scripts will ever experience a comeback and will rather be completely replaced.



          However, if you want to load the bbswitch module with a set of options you have to do the steps as follows.



          Make the module load at boot time.



          root@localhost:~# echo "bbswitch" >> /etc/modules


          Put your options into a /etc/modprobe.d file which is honored each time a module is loaded. So this should be even better to define module parameters. So create the file /etc/modprobe.d/bbswitch.conf and put in the line as follows.



          root@localhost:~# cat /etc/modprobe.d/bbswitch.conf
          options bbswitch load_state=0





          share|improve this answer























          • That was incredibly complicated, but worked. Thank you!
            – Tom Mercer
            Jun 3 at 19:23












          up vote
          4
          down vote



          accepted







          up vote
          4
          down vote



          accepted






          Without knowing what distribution you are using, the following does apply at least for Ubuntu 16.04 and 18.04, since Ubuntu started to use systemd from 16.04 onwards.



          The old module-loader script /etc/init.d/kmod would allow to put module options into /etc/modules. systemd did replace this script with an own service systemd-modules-load.service. The new method does not allow putting module options into /etc/modules and only accepts the module names each per line.

          If you call /etc/init.d/kmod it will not execute the script but rather call the systemd service systemd-modules-load.service. Further it is better to get used to systemd as it is very unlikely that the old sys-v init scripts will ever experience a comeback and will rather be completely replaced.



          However, if you want to load the bbswitch module with a set of options you have to do the steps as follows.



          Make the module load at boot time.



          root@localhost:~# echo "bbswitch" >> /etc/modules


          Put your options into a /etc/modprobe.d file which is honored each time a module is loaded. So this should be even better to define module parameters. So create the file /etc/modprobe.d/bbswitch.conf and put in the line as follows.



          root@localhost:~# cat /etc/modprobe.d/bbswitch.conf
          options bbswitch load_state=0





          share|improve this answer















          Without knowing what distribution you are using, the following does apply at least for Ubuntu 16.04 and 18.04, since Ubuntu started to use systemd from 16.04 onwards.



          The old module-loader script /etc/init.d/kmod would allow to put module options into /etc/modules. systemd did replace this script with an own service systemd-modules-load.service. The new method does not allow putting module options into /etc/modules and only accepts the module names each per line.

          If you call /etc/init.d/kmod it will not execute the script but rather call the systemd service systemd-modules-load.service. Further it is better to get used to systemd as it is very unlikely that the old sys-v init scripts will ever experience a comeback and will rather be completely replaced.



          However, if you want to load the bbswitch module with a set of options you have to do the steps as follows.



          Make the module load at boot time.



          root@localhost:~# echo "bbswitch" >> /etc/modules


          Put your options into a /etc/modprobe.d file which is honored each time a module is loaded. So this should be even better to define module parameters. So create the file /etc/modprobe.d/bbswitch.conf and put in the line as follows.



          root@localhost:~# cat /etc/modprobe.d/bbswitch.conf
          options bbswitch load_state=0






          share|improve this answer















          share|improve this answer



          share|improve this answer








          edited Jun 3 at 17:00









          Rinzwind

          195k25373504




          195k25373504











          answered Jun 3 at 10:43









          Thomas

          3,09071325




          3,09071325











          • That was incredibly complicated, but worked. Thank you!
            – Tom Mercer
            Jun 3 at 19:23
















          • That was incredibly complicated, but worked. Thank you!
            – Tom Mercer
            Jun 3 at 19:23















          That was incredibly complicated, but worked. Thank you!
          – Tom Mercer
          Jun 3 at 19:23




          That was incredibly complicated, but worked. Thank you!
          – Tom Mercer
          Jun 3 at 19:23












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1043116%2fmodules-being-ignored%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

          Trouble downloading packages list due to a “Hash sum mismatch” error

          How do I move numbers in filenames, in a batch renaming operation?