M.2 SSD 性能极差(HP OMEN 搭配三星 XP941)

M.2 SSD 性能极差(HP OMEN 搭配三星 XP941)

我有一台新笔记本电脑(HP Omen),经过一番折腾,终于在它上面安装了 Kubuntu。安装是双启动安装,以及使用 EFI 模式的出厂 Win8.1 安装。

但是,加载到 SSD(一个闪亮的全新 512MB M.2 驱动器)上的东西却非常慢:例如,“sudo apt-get install vim”已经运行了大约十分钟。

使用 hdparm 进行速度测试得到以下结果:

# hdparm -Tt --verbose /dev/sda

/dev/sda:
 Timing cached reads:   1250 MB in  2.00 seconds = 625.01 MB/sec
 Timing buffered disk reads:   4 MB in  3.20 seconds =   1.25 MB/sec

所以显然出了问题。驱动器

# lspci | grep SATA
07:00.0 SATA controller: Samsung Electronics Co Ltd XP941 PCIe SSD (rev 01)

hdparm 说

# hdparm /dev/sda

/dev/sda:
 multcount     =  0 (off)
 IO_support    =  1 (32-bit)
 readonly      =  0 (off)
 readahead     = 256 (on)
 geometry      = 62260/255/63, sectors = 1000215216, start = 0

我不太清楚电梯的情况;我现在无法检查,但至少没有电梯=noop 不应该导致性能下降坏的。

dmesg 中有一些有趣的东西:

[   18.042832] irq 16: nobody cared (try booting with the "irqpoll" option)
[   18.042838] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.16.0-23-generic #31-Ubuntu
[   18.042839] Hardware name: Hewlett-Packard HP OMEN Notebook PC 15/2332, BIOS F.05 10/09/2014
[   18.042840]  ffff8802533360a4 ffff88025f243e60 ffffffff8277fcbc ffff880253336000
[   18.042843]  ffff88025f243e88 ffffffff820d2452 ffff880253336000 0000000000000000
[   18.042845]  0000000000000010 ffff88025f243ec0 ffffffff820d2817 0000000000000000
[   18.042847] Call Trace:
[   18.042848]  <IRQ>  [<ffffffff8277fcbc>] dump_stack+0x45/0x56
[   18.042858]  [<ffffffff820d2452>] __report_bad_irq+0x32/0xd0
[   18.042860]  [<ffffffff820d2817>] note_interrupt+0x267/0x2b0
[   18.042862]  [<ffffffff820cfdf3>] handle_irq_event_percpu+0x133/0x1a0
[   18.042863]  [<ffffffff820cfe9d>] handle_irq_event+0x3d/0x60
[   18.042865]  [<ffffffff820d3471>] handle_fasteoi_irq+0x81/0x170
[   18.042869]  [<ffffffff8201577e>] handle_irq+0x1e/0x40
[   18.042872]  [<ffffffff8278aafd>] do_IRQ+0x4d/0xe0
[   18.042875]  [<ffffffff8278896d>] common_interrupt+0x6d/0x6d
[   18.042875]  <EOI>  [<ffffffff8261915c>] ? cpuidle_enter_state+0x4c/0xc0
[   18.042882]  [<ffffffff826192b7>] cpuidle_enter+0x17/0x20
[   18.042886]  [<ffffffff820b9b77>] cpu_startup_entry+0x347/0x480
[   18.042888]  [<ffffffff82045ac0>] start_secondary+0x230/0x2c0
[   18.042890] handlers:
[   18.042907] [<ffffffffc01c5d80>] ahci_interrupt [libahci]
[   18.042908] Disabling IRQ #16

接下来,这看起来像是 IRQ 冲突:

$ sudo lspci -v | grep "IRQ 16" -B 2 -A 8
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 860M] (rev a2)
    Subsystem: Hewlett-Packard Company Device 2332
    Flags: fast devsel, IRQ 16
    Memory at d0000000 (32-bit, non-prefetchable) [size=16M]
    Memory at a0000000 (64-bit, prefetchable) [size=256M]
    Memory at b0000000 (64-bit, prefetchable) [size=32M]
    I/O ports at 3000 [size=128]
    Expansion ROM at b2000000 [disabled] [size=512K]
    Capabilities: [60] Power Management version 3
    Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [78] Express Endpoint, MSI 00
--
07:00.0 SATA controller: Samsung Electronics Co Ltd XP941 PCIe SSD (rev 01) (prog-if 01 [AHCI 1.0])
    Subsystem: Samsung Electronics Co Ltd Device a811
    Flags: bus master, fast devsel, latency 0, IRQ 16
    Memory at d1600000 (32-bit, non-prefetchable) [size=8K]
    Expansion ROM at d1610000 [disabled] [size=64K]
    Capabilities: [40] Power Management version 3
    Capabilities: [70] Express Endpoint, MSI 00
    Capabilities: [d0] Vital Product Data
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Device Serial Number 00-00-00-00-00-00-00-00
    Capabilities: [150] Power Budgeting <?>

我现在正在尝试弄清楚如何解决这个 IRQ 冲突,希望这会有所帮助...

答案1

所以我遇到了同样的问题(在 Arch Linux 上),这是我能找到的唯一有关该问题的线索,所以我将在这里发布我的答案。

问题确实与图形有关,并非 Ubuntu 独有,但在我尝试的任何发行版上都发生过。Ubuntu 回退功能由于nomodeset内核选项而起作用。如果您要安装 Ubuntu,我建议也为 LiveCD 设置该标志,因为否则 GParted 和安装程序会花很长时间。

安装后,请确保在启动时设置选项nomodeset,以便您可以安装必要的软件:

通过安装 Intel/Nvidia 驱动程序并启用 bumblebee/bbswitch,我解决了这个问题。这样,Nvidia 显卡在启动时被禁用,因此不会发生冲突。删除选项后,Optirun/primusrun 仍可正常工作,不会发生冲突nomodeset

另注:要使 Wifi 在笔记本电脑上运行,您需要将该acer_wmi模块列入黑名单。

相关内容