Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

As the question says it all, I would just like to elaborate with an example:

i915.i915_enable_rc6=1

This is an option for i915 module or intel video driver. So is there any way to know or list something like i915_enable_rc6 is an option for i915 from linux commandline ?

I hope I am clear with the question ?

Edit: I was referring to i915 just for example and nothing else. modinfo seems to be the command I was looking for.

share|improve this question

2 Answers 2

up vote 7 down vote accepted

modinfo does it:

modinfo i915 | grep ^parm:

For open source modules the most reliable way is to look at the source. You don't need to be a kernel developer.

See source for i915.

share|improve this answer
    
If there is no section called parm in the modinfo output does that mean there is no options to configure the modules? –  sagarchalise Aug 30 '11 at 9:37
    
Mostly it means that author wanted to keep it as a non-visible parameter for some reason. See updated post. –  Michał Šrajer Aug 30 '11 at 12:11

You can find all the applicable i915 kernel params applicable for your card using a command such as

sudo grep -H '' /sys/module/i915/parameters/*

or

sudo grep . /sys/module/i915/parameters/*

(thanks @arrange)

In my case I can potentially use:

/sys/module/i915/parameters/fbpercrtc:0
/sys/module/i915/parameters/i915_enable_rc6:1
/sys/module/i915/parameters/lvds_downclock:1
/sys/module/i915/parameters/lvds_use_ssc:1
/sys/module/i915/parameters/modeset:-1
/sys/module/i915/parameters/powersave:1
/sys/module/i915/parameters/reset:Y
/sys/module/i915/parameters/semaphores:0

If no parameters are identified then either that is a true statement - or the kernel is loading a different kernel module than you were expecting:

 sudo lshw -c display

  *-display               
       description: VGA compatible controller
       product: Core Processor Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 18
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:41 memory:90000000-903fffff memory:80000000-8fffffff ioport:3050(size=8)

In the above trace you can see in the configuration line "driver=i915" that the kernel sees the video card and has loaded the i915 module.

source

share|improve this answer
1  
+1. I'd just simplify the command to sudo grep . /sys/module/i915/parameters/* –  arrange Aug 29 '11 at 19:17
    
I was referring to i915 because its mostly used. But the path information was something I didn't know, so if there is no parameters folder in the /sys/module/{module_name}/ Does that mean the specific module doesnot have options to tweak ? –  sagarchalise Aug 30 '11 at 4:23
    
@sagarchalise - have updated with an explanation –  fossfreedom Aug 30 '11 at 6:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.