# [Solved) CONFIG_EXPERT is a booby trap

## shrike

While diagnosing a black screen login issue I noticed a parameter enabled by EXPERT. I did enable EXPERT some time ago, ignoring the warning (enable only if you really know what you are doing) but I did not know that this would affect other kernel settings outside of the EXPERT menu. Anyway, I found this thread on LKML which alleviates my ignorance a bit:

https://lkml.org/lkml/2012/9/30/159

Regards,

shrikeLast edited by shrike on Thu May 04, 2017 3:09 pm; edited 1 time in total

----------

## NTU

I use CONFIG_EXPERT personally to disable things such as PC speaker and 16-bit UIDs. CONFIG_EXPERT forces all of the debugging and expert options to be visible in the kernel hacking section as well, makes it convenient for me to further tune things. I also have CONFIG_EMBEDDED set to have the potential to trim additional space and adjust further configs for things I don't need / use.

As for the email you linked, I just ran a git grep for CONFIG_EXPERT and the only thing I could find that isn't directly related to the options in the EXPERT menu is this:

drivers/gpu/drm/drm_fb_helper.c:#if defined(CONFIG_FRAMEBUFFER_CONSOLE_MODULE) && !defined(CONFIG_EXPERT)

That section of the file is referring to this part in the code, and it is properly commented as to why, and this part may be related to your issue:

```
/* The Kconfig DRM_KMS_HELPER selects FRAMEBUFFER_CONSOLE (if !EXPERT)

 * but the module doesn't depend on any fb console symbols.  At least

 * attempt to load fbcon to avoid leaving the system without a usable console.

 */

#if defined(CONFIG_FRAMEBUFFER_CONSOLE_MODULE) && !defined(CONFIG_EXPERT)

static int __init drm_fb_helper_modinit(void)

{

   const char *name = "fbcon";

   struct module *fbcon;

   mutex_lock(&module_mutex);

   fbcon = find_module(name);

   mutex_unlock(&module_mutex);

   if (!fbcon)

      request_module_nowait(name);

   return 0;

}

module_init(drm_fb_helper_modinit);

#endif
```

As I use KMS (Radeon R9 290X user here) I need to have the following enabled, not set as modules, but rather built-in, to avoid the black screen, as I don't use an initrd (initial ramdisk) let alone with framebuffer modules built into it:

```
CONFIG_FB=y

CONFIG_DRM_FBDEV_EMULATION=y

CONFIG_FRAMEBUFFER_CONSOLE=y
```

Your black screen is not caused by the CONFIG_EXPERT menu being enabled, but rather a configuration problem with your graphics/DRM/KMS/FB settings.

As for the CONFIG_HID_APPLE problem he was referring to, when CONFIG_EXPERT is selected, yes it disables certain configs, but that doesn't mean you can't turn them back on again.

If you look here starting at line 115: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/drivers/hid/Kconfig?h=linux-4.10.y&id=96e132ebc0a162c643e0e6e6f1f85c3be3355715

Line 118 is default !EXPERT which means it is default y unless EXPERT is set. I agree that people shouldn't mess with kernel configuration when they don't know what they're doing and don't have the skill to toggle through the menus again to re-enable whatever they need. That's also the wrong way to do it in the first place, EXPERT and the major general options go on first and you tweak from there. I always start off with make tinyconfig (if supported by the kernel version, otherwise I use the defconfigs for older releases) and configure the kernel to my system after fully understanding what all the options do, how my distribution is configured, and what hardware I'm using/plan on using. I then go back and double check through the menus and ensure no options have either been flipped on or back off. After verifying the entire kernel configuration which I have memorized like the back of my hand, I compile and reboot to a heavily optimized and tuned kernel specifically for my machine. If you know what you're doing, it's perfectly safe to toggle EXPERT and it's suboptions.

----------

## shrike

@NTU,

I did indeed have CONFIG_FB=m, thinking it would auto-udev-magically work. Built-in works.

Well 'oley $hit'. I've been screwing around with FB settings for months. Do you have a tip jar? Do you take requests? :)

----------------------------

WRT EXPERT setting my motivation is to alert others to this 'silent' behavior.

Your thoughts on kernel configuration are appreciated, logical. Thank you for taking the time and sharing.

Regards,

shrike

----------

## R0b0t1

 *NTU wrote:*   

> Line 118 is default !EXPERT which means it is default y unless EXPERT is set. I agree that people shouldn't mess with kernel configuration when they don't know what they're doing and don't have the skill to toggle through the menus again to re-enable whatever they need. That's also the wrong way to do it in the first place, EXPERT and the major general options go on first and you tweak from there. I always start off with make tinyconfig (if supported by the kernel version, otherwise I use the defconfigs for older releases) and configure the kernel to my system after fully understanding what all the options do, how my distribution is configured, and what hardware I'm using/plan on using. I then go back and double check through the menus and ensure no options have either been flipped on or back off. After verifying the entire kernel configuration which I have memorized like the back of my hand, I compile and reboot to a heavily optimized and tuned kernel specifically for my machine. If you know what you're doing, it's perfectly safe to toggle EXPERT and it's suboptions.

 

Are you sure you understand every option? I took the better part of a week to read through it all in an attempt to do exactly what you described but was still left with a mountain of options to sort through. Most of them irrelevant, but this incident has shown me that there are "gotchas" out there. How CONFIG_EXPERT behaves on toggle is nonsensical.

----------

## energyman76b

 *R0b0t1 wrote:*   

>  *NTU wrote:*   Line 118 is default !EXPERT which means it is default y unless EXPERT is set. I agree that people shouldn't mess with kernel configuration when they don't know what they're doing and don't have the skill to toggle through the menus again to re-enable whatever they need. That's also the wrong way to do it in the first place, EXPERT and the major general options go on first and you tweak from there. I always start off with make tinyconfig (if supported by the kernel version, otherwise I use the defconfigs for older releases) and configure the kernel to my system after fully understanding what all the options do, how my distribution is configured, and what hardware I'm using/plan on using. I then go back and double check through the menus and ensure no options have either been flipped on or back off. After verifying the entire kernel configuration which I have memorized like the back of my hand, I compile and reboot to a heavily optimized and tuned kernel specifically for my machine. If you know what you're doing, it's perfectly safe to toggle EXPERT and it's suboptions. 
> 
> Are you sure you understand every option? I took the better part of a week to read through it all in an attempt to do exactly what you described but was still left with a mountain of options to sort through. Most of them irrelevant, but this incident has shown me that there are "gotchas" out there. How CONFIG_EXPERT behaves on toggle is nonsensical.

 

why? because it expects you to think about shit? Because it makes options available that most people should not mess with?

But seriously, to see something in framebuffer, you can't have it loaded by udev - because than you are through kernel boot anyway and way into userland init. So setting fb=m and then being surprised that there are not shiny things on the screen smells of 'should not touch expert at all' .

----------

## Ant P.

If you want to know what you're getting into with CONFIG_EXPERT, change it from N to Y by editing .config by hand and then run make oldconfig. It'll take a while. Same goes for some of the options in the kernel debugging section: they can expose other options all over the place with sub-optimal defaults and menuconfig/nconfig won't warn you of spooky action at a distance.

----------

## Hu

 *energyman76b wrote:*   

> why? because it expects you to think about shit? Because it makes options available that most people should not mess with?

 The complaint here is that the user expected that changing CONFIG_EXPERT should have exactly one effect: offer choices on entries that were previously locked to a value chosen by the experts in that subsystem.  The reality reported is that changing CONFIG_EXPERT also changes the value of some of those newly enabled choices, so switching on CONFIG_EXPERT, then saving and exiting with no other changes produces notable differences relative to CONFIG_EXPERT=n.  If not documented, this is a surprising result.

----------

