Jump to content
funtoo forums
  • 0
its1louder

question about kernel module arguments

Question

The Documentation for /etc/conf.d/modules is a bit vague.  On this page it says

 

  module_module-name_args_2_6="module arg=value"

 

OK so at least one of the instances of the word "module" is not meant to be replaced with the name of the module.  For example:

 

I need to change usbcore kernel module to prevent my desktop's mouse from going to sleep every 2 seconds.  I think what I need to do based on the linked page above is:

 

  module_usbcore_args="usbcore autosuspend=-1"

 

 

BTW based on the comments on /etc/conf.d/modules itself I would have thought that it should be this:
 

 

   module_usbcore_args="autosuspend=-1"

 

I am building initramfs files both ways just to be sure.

 

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Actually neither of these worked for me in the end I had to add usbcore.autosuspend=-1 to my grub launch line.  Still it would be nice to know how to do it in /etc/conf.d/modules, and if this is even incorporated into the genkernel initramfs, perhaps not.

Share this post


Link to post
Share on other sites
  • 0

Are you sure you are using the module?  If it's built-in, the module syntax would silently fail, but the kernel command line syntax in grub would work.

 

What is the output of:

# lsmod | grep usb

FYI, the module/kernel parameters reference is in /usr/src/linux/Documentation/kernel-parameters.txt

 

I checked my system - confirmed  I've got usbcore built into my kernel.  It also has autosuspend=2 and I have no issues with mice on either of my funtoo systems.
 

# cat /sys/module/usbcore/parameters/autosuspend 
2

 
If I need to change it, I could just issue:
 

# echo -n -1 > /sys/modules/usbcore/parameters/autosuspend

Share this post


Link to post
Share on other sites
  • 0

Actually I broke a rule, which is I changed two things at once and so I am not sure which fixed it.  It might be the grub kernel command or it might be the udev rule I stuck in for usb devices to shut off autosuspend.  Not sure which did it, and I am not sure why I only have this problem on my desktop and not my laptop.  Off the top of my head, the laptop is running laptop_mode as an init process so maybe the autosuspending is better managed.   Anyway its fixed so I am not going to investigate it further.

 

But my original point to the post stands, which is that I am still not sure on the correct syntax for module loading with /etc/conf.d/modules in the case where arguments have a par=val structure rather than just a single argument/flag. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×