[EdLUG] Module parameters are different from cmdline

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


Hi Roy,

Thanks for the detailed response!

I don't seem to have /proc/confg.gz, however I think I was able to find it
in /boot:












*$ grep 915 /boot/config-4.8.0-32-generic
CONFIG_CHARGER_DA9150=mCONFIG_BATTERY_DA9150=mCONFIG_MFD_DA9150=mCONFIG_DRM_I915=m#
CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not
setCONFIG_DRM_I915_USERPTR=yCONFIG_DRM_I915_GVT=y# drm/i915 Debugging#
CONFIG_DRM_I915_WERROR is not set# CONFIG_DRM_I915_DEBUG is not
setCONFIG_SND_HDA_I915=yCONFIG_DA9150_GPADC=m*

CONFIG_DRM_I915 is set to 'm', so I presume it was compiled as a module

Yeah, I found in Google that some settings can be changed at runtime,
without module reload, but unfortunately this particular option is
read-only in /sys :(

I think you're right - this particular one should be in initramfs and is
most likely loaded even before the root fs is mounted. However, I thought
that it should still pick up the parameters from the Kernel command line.

I've just noticed some weird entries in the dmesg output. It seems like
it's i915 module specific, but I'm still trying to google anything that can
indicate what they're supposed to mean:

[    1.480619] Setting dangerous option enable_rc6 - tainting kernel
[    1.480621] Setting dangerous option enable_psr - tainting kernel
[    1.480622] Setting dangerous option enable_fbc - tainting kernel
[    1.480624] i915: unknown parameter 'lvds_downclock' ignored
[    1.480626] Setting dangerous option semaphores - tainting kernel


*[    1.480628] Setting dangerous option enable_execlists - tainting
kernel[    1.480631] Setting dangerous option enable_execlists - tainting
kernel*

Best Regards,
Maxim

On Wed, Dec 28, 2016 at 7:26 PM, Edinburgh Linux Users Group <
edlug at lists.edlug.org.uk> wrote:

> 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
>
>
>
>
> _______________________________________________
> EdLUG mailing list
> EdLUG at lists.edlug.org.uk
> https://lists.edlug.org.uk/mailman/listinfo/edlug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.edlug.org.uk/pipermail/edlug/attachments/20161228/075092ac/attachment.html>


More information about the EdLUG mailing list