在哪里可以查看Xenial
内核的默认内核配置?我对 USB 电源管理配置特别感兴趣,包括:
CONFIG_SUSPEND
CONFIG_HIBERNATION
CONFIG_PM_RUNTIME
CONFIG_PM
和CONFIG_USB_SUSPEND
uname -r
给我:4.4.38-l4t-r28.2+g174510d
答案1
对于这个16.04内核:
doug@DOUG-64:/boot$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
doug@DOUG-64:/boot$ uname -a
Linux DOUG-64 4.4.0-176-generic #206-Ubuntu SMP Fri Feb 28 05:02:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
您要寻找的信息是:
doug@DOUG-64:/boot$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
doug@DOUG-64:/boot$ uname -a
Linux DOUG-64 4.4.0-176-generic #206-Ubuntu SMP Fri Feb 28 05:02:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
doug@DOUG-64:/boot$ grep CONFIG_SUSPEND config-4.4.0-176-generic
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
# CONFIG_SUSPEND_SKIP_SYNC is not set
doug@DOUG-64:/boot$ grep CONFIG_HIBERNATION config-4.4.0-176-generic
CONFIG_HIBERNATION=y
doug@DOUG-64:/boot$ grep CONFIG_PM_RUNTIME config-4.4.0-176-generic
doug@DOUG-64:/boot$ grep CONFIG_PM config-4.4.0-176-generic
CONFIG_PM_STD_PARTITION=""
CONFIG_PM_SLEEP=y
CONFIG_PM_SLEEP_SMP=y
# CONFIG_PM_AUTOSLEEP is not set
CONFIG_PM_WAKELOCKS=y
CONFIG_PM_WAKELOCKS_LIMIT=100
CONFIG_PM_WAKELOCKS_GC=y
CONFIG_PM=y
CONFIG_PM_DEBUG=y
CONFIG_PM_ADVANCED_DEBUG=y
# CONFIG_PM_TEST_SUSPEND is not set
CONFIG_PM_SLEEP_DEBUG=y
CONFIG_PM_TRACE=y
CONFIG_PM_TRACE_RTC=y
CONFIG_PM_CLK=y
# CONFIG_PMIC_OPREGION is not set
CONFIG_PMC_ATOM=y
CONFIG_PMBUS=m
CONFIG_PMIC_ADP5520=y
CONFIG_PMIC_DA903X=y
CONFIG_PMIC_DA9052=y
CONFIG_PM_DEVFREQ=y
CONFIG_PM_DEVFREQ_EVENT=y
CONFIG_PM_NOTIFIER_ERROR_INJECT=m
doug@DOUG-64:/boot$ grep CONFIG_USB_SUSPEND config-4.4.0-176-generic
doug@DOUG-64:/boot$
看起来好像您的几个内核配置参数根本不存在于该内核。实际上,从来没有 CONFIG_USB_SUSPEND,但 CONFIG_USB_AUTOSUSPEND 出现在内核 5.1 左右。从来没有 CONFIG_PM_RUNTIME。
答案2
您当前正在运行的 Linux 内核在 中有一个配置 ( config
) 文件/boot/
。文件名如下/启动/配置-*。运行以下命令查找确切的名称。
ls -l /boot/config-`uname -r`
在那里您可以找到这些配置参数是否已启用。