[EdLUG] Module parameters are different from cmdline

Edinburgh Linux Users Group edlug at lists.edlug.org.uk
Wed Dec 28 19:26:52 UTC 2016


On 2016.12.28 18:24, Edinburgh Linux Users Group wrote:
> Hi guys,
> 
> I have a question about kernel module parameters :) The problem I have
> is
> that i915 kernel module uses different options from what I supply in
> the
> kernel parameters and modprobe.d. I'm trying to load it with
> "enable_execlists=0" while it still uses "enable_execlists=1":
> 
> *$ modprobe -c | grep i915 | grep execlists*
> options i915 enable_rc6=7 enable_psr=2 enable_fbc=1 lvds_downclock=1
> semaphores=1 *enable_execlists=0* modeset=1
> options i915 *enable_execlists=0*
> 
> *$ sudo cat /sys/module/i915/parameters/enable_execlists *
> *1*
> 
> The distro is Ubuntu 16.10. Have you by any chance seen such a
> behavior
> before? It seems like the loader picks up the options from the Kernel
> cmdline and from modprobe.d, but the actually loaded module still uses
> its
> own settings
> 
> Best Regards,
> Maxim
> 

Maxim,

Is i915 actually built as a module or is it built into the kernel binary?
zgrep 915 /proc/config.gz  will tell.

If its a module, the above says =m, not =y, then kernel parameters
cannot be used. They are no longer available when modules load.

Now the problem grows arms and legs.

i915 is a kernel driver that also provides a framebuffer console.
If its not actually built into the kernel, to get the framebuffer console
as early as possible in the boot process, its likely to be in the initramfs.
That's the next best thing for an early framebuffer console.

The initramfs is a whole small root filesystem in a file. If it loads 
i915, it will use its modprobe.d, not the one on the root filesystem
where you can edit it.

There is more bad news, To load i915 with new module parameters,
you must first unload it. If its in use because its providing the 
framebuffer console, or being used for the GUI, you can't unload it.

That's the how it happens. Now for the what you can do about it.

First, long shot, some modules can have some of their parameters
changed by changing values is /proc and or /sys.
I don't use i915 so that's the limit of my knowledge there.

Second, you can unpick the initramfs, edit its modprobe.d and
put the initramfs back together.
Be warned that the initramfs is essential for booting. If you mess
up your system won't boot.

Third, you can rebuild your kernel ... but you probably don't want 
to do that.

I'm a Gentoo user, so I'm accustomed to building things.  Easiest,
if it works, is to find a knob in /proc and or /sys, to twiddle.

Regards,

Roy Bamford


 



More information about the EdLUG mailing list