为什么 Ubuntu 12.04 只能识别一个处理器?

为什么 Ubuntu 12.04 只能识别一个处理器?

我在一台装有 Intel i3 处理器的机器上安装了 Ubuntu 12.04 LTS。据我所知,i3 处理器是多核处理器,操作系统应该可以识别 2 个处理器,就像 Windows 7 一样。但 Ubuntu 无法识别它。这是一个已知问题吗?我是否遗漏了一些配置?

$ cat /proc/cpuinfo

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 37
model name      : Intel(R) Core(TM) i3 CPU         530  @ 2.93GHz
stepping        : 2
microcode       : 0x9
cpu MHz         : 2933.374
cache size      : 4096 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc up arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm arat dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5866.74
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

[编辑]

输出

$ lscpu

是:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 37
Stepping:              2
CPU MHz:               2933.196
BogoMIPS:              5866.39
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              4096K
NUMA node0 CPU(s):     0

[编辑2]

一些附加信息:

$ grep APIC /boot/config-3.2.0-29-generic
CONFIG_X86_X2APIC=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_PCI_IOAPIC=y
CONFIG_KVM_APIC_ARCHITECTURE=y

来自 /var/log/kern.log :

Feb 22 08:37:27 MATTIDST002 kernel: [    0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs
...
Feb 22 08:37:27 MATTIDST002 kernel: [    0.003953] CPU0: Thermal monitoring enabled (TM1)
Feb 22 08:37:27 MATTIDST002 kernel: [    0.003961] using mwait in idle threads.
Feb 22 08:37:27 MATTIDST002 kernel: [    0.004000] SMP alternatives: switching to UP code
Feb 22 08:37:27 MATTIDST002 kernel: [    0.010870] Freeing SMP alternatives: 24k freed
Feb 22 08:37:27 MATTIDST002 kernel: [    0.010881] ACPI: Core revision 20110623
Feb 22 08:37:27 MATTIDST002 kernel: [    0.014752] ACPI: setting ELCR to 0200 (from cc60)
Feb 22 08:37:27 MATTIDST002 kernel: [    0.036996] ftrace: allocating 26998 entries in 106 pages
Feb 22 08:37:27 MATTIDST002 kernel: [    0.044302] weird, boot CPU (#0) not listed by the BIOS.
Feb 22 08:37:27 MATTIDST002 kernel: [    0.044304] SMP motherboard not detected.
Feb 22 08:37:27 MATTIDST002 kernel: [    0.150902] SMP disabled
Feb 22 08:37:27 MATTIDST002 kernel: [    0.150904] Performance Events: PEBS fmt1+, Westmere events, Intel PMU driver.
Feb 22 08:37:27 MATTIDST002 kernel: [    0.150911] ... version:                3
Feb 22 08:37:27 MATTIDST002 kernel: [    0.150912] ... bit width:              48
Feb 22 08:37:27 MATTIDST002 kernel: [    0.150914] ... generic registers:      4
Feb 22 08:37:27 MATTIDST002 kernel: [    0.150915] ... value mask:             0000ffffffffffff
Feb 22 08:37:27 MATTIDST002 kernel: [    0.150916] ... max period:             000000007fffffff
Feb 22 08:37:27 MATTIDST002 kernel: [    0.150917] ... fixed-purpose events:   3
Feb 22 08:37:27 MATTIDST002 kernel: [    0.150919] ... event mask:             000000070000000f
Feb 22 08:37:27 MATTIDST002 kernel: [    0.151032] NMI watchdog enabled, takes one hw-pmu counter.
Feb 22 08:37:27 MATTIDST002 kernel: [    0.151050] Brought up 1 CPUs
Feb 22 08:37:27 MATTIDST002 kernel: [    0.151052] Total of 1 processors activated (5866.45 BogoMIPS).

[编辑3]

更多信息:

$ grep SMP /boot/config-3.2.0-29-genericCONFIG_X86_64_SMP=y
CONFIG_USE_GENERIC_SMP_HELPERS=y
CONFIG_SMP=y
# CONFIG_X86_VSMP is not set
# CONFIG_MAXSMP is not set
CONFIG_PM_SLEEP_SMP=y
CONFIG_HAVE_TEXT_POKE_SMP=y
CONFIG_SCSI_SAS_HOST_SMP=y
CONFIG_VIDEO_VP27SMPX=m

主板型号:华硕P7H55-M

$ sudo lshw

我在这里只放置了有关主板的最后一条命令的信息:

  *-core
       description: Motherboard
       product: P7H55-M BR
       vendor: ASUSTeK Computer INC.
       physical id: 0
       version: X.0x
       serial: MS2222222222222222222222222
       slot: To Be Filled By O.E.M.
     *-firmware
          description: BIOS
          vendor: American Megatrends Inc.
          physical id: 0
          version: 0602
          date: 05/11/2011
          size: 64KiB
          capacity: 8128KiB
          capabilities: isa pci pnp apm upgrade shadowing escd cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer int10video acpi usb ls120boot zipboot biosbootspecification

似乎我的 ubuntu 安装缺少一些模块,对吗?如果是,我该如何安装正确的模块?由于这是一个工作站设置,设置这台机器需要花费大量时间(设置开发环境、启动所有网络位置、配置 VPN 等),如果解决方案不涉及格式化和重新安装所有模块等操作,那就太好了 =p

答案1

对我来说,这看起来不像是模块问题,关键看起来位于日志中的这一行:

Feb 22 08:37:27 MATTIDST002 kernel: [    0.044304] SMP motherboard not detected.
Feb 22 08:37:27 MATTIDST002 kernel: [    0.150902] SMP disabled

内核检测到你的主板不支持对称多处理器然后禁用它。如果没有 SMP,则同一时间只能有一个处理器处于活动状态。

根据我的经验,这通常是由 Windows 忽略的一些 BIOS 选项引起的。

答案2

尝试 $ lscpu,这将提供所有 CPU 信息。在此处输入图片描述

lscpu 命令显示我的 corei5 处理器具有 32 位和 64 位架构和 4 个 CPU 核心(0-3),还有 L1、L2、L3 缓存内存。

相关内容