All | Aquariums | Arduino | Btrfs | Cars | Cats | Clubbing | Computers | Diving | Electronics | Exercising | Festivals | Flying | Halloween | Hbot | Hiking | Linux | Linuxha | Monuments | Museums | Outings | Public | Rc | Sciencemuseums | Solar | Tfsf | Trips



Table of Content for computers:

More pages: June 2024 April 2024 December 2023 August 2021 May 2020 February 2016 July 2014 December 2013 November 2013 January 2013 August 2011 July 2011 August 2010 June 2010 May 2010 March 2010 February 2010 December 2009 November 2009 March 2009 July 2002 October 2001





2024/06/24 Linux on Lenovo P17gen2
π 2024-06-24 01:01 in Computers, Linux
I had a forced upgrade from P73 to P17gen2 after my P73 suddenly died, and the upgrade wasn't as seamless as I was hoping for. First, the new laptop did not support SATA M2 anymore, and removed the 2.5" Sata drive slot despite the huge laptop size, so I had to get new drives (all 3 had to be M2 NVME).

I have to admit now that while I've been using debian since 1997 and I'm not super interested in switching again to ubuntu, especially when I already did once, and they honestly sucked and let me down enough that I went back to debian. But in this case, debian didn't support sound right this new laptop, especially sound input (microphone), and it took several days of work painstakenly diffing the latest ubuntu 23 that worked, and debian that did not. Eventually got debian to work though.

P73 (after it died) next to P17gen2
P73 (after it died) next to P17gen2

Intro

You should look at these pages first:
  • My Linux on Thinkpad P70 page has most of the info you need and that is still valid for P73 and P17gen2
  • this explains Upgrading from Sata SSD, to M2 Sata, to M2 NVME on P70
  • How to get the P70 to charge from slimtip adapters it doesn't like
  • By then Lenovo messed up P73 power further and it refused to even use an 20V power unless I built special trickery, so this page helps with getting around power limitations
  • And definitely read this page on Thinkpad P70 vs P73 vs P17
  • Note that as per the last page linked above, I do not recommend getting a P17 if you already have a P73. I found nothing really better in the P17gen2 despite it being 2 years newer. Quite disappointing.

    Power

    That's the biggest issue on this laptop, battery use is way too high, even under windows, and Lenovo could not be bothered to make it work with USB-PD, unlike Dell who did a fine job of that.

    The page with workaround again, but it's very sad I still had to do this for P17 :(

  • By then Lenovo messed up P73 power further and it refused to even use an 20V power unless I built special trickery, so this page helps with getting around power limitations
  • If you want a laptop with a proper power system and 2x the battery life while being also faster, try the Dell XPS 9730 (see review)

    Configs

    If that helps, a few config files ( You also can get them here )

    /etc/pipewire/microphone.conf

    # https://wiki.archlinux.org/title/PipeWire
    context.objects = [
        { factory = adapter
            args = {
                factory.name           = api.alsa.pcm.source
                node.name              = "microphone"
                node.description       = "Lenovo P17 DMIC16kHz"
                media.class            = "Audio/Source"
    # arecord -l
                api.alsa.path          = "hw:0,7"
            }
        }
    ]

    /etc/modprobe.d/thinkpad..conf

    alias char-major-10-170 thinkpad
    alias /dev/thinkpad thinkpad
    alias /dev/thinkpad/thinkpad thinkpad
    alias /dev/thinkpad/smapi smapi
    alias /dev/thinkpad/superio superio
    alias /dev/thinkpad/rtcmosram rtcmosram
    

    # See http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work options thinkpad_acpi hotkey=0xff8c7ffb experimental=1 fan_control=1

    options thinkpad enable_smapi=1 enable_superio=1 enable_rtcmosram=1 enable_thinkpadpm=1 #http://www.thinkwiki.org/wiki/Tp_smapi options thinkpad_ec force_io=1 # Invert X and Y: https://wiki.archlinux.org/index.php/HDAPS options hdaps invert=1

    options usbcore autosuspend=1

    # http://www.mjmwired.net/kernel/Documentation/sound/alsa/HD-Audio-Models.txt # http://ubuntuforums.org/showthread.php?t=1316634 options snd-hda-intel probe_mask=1 model=thinkpad

    #options iwlwifi 11n_disable=2

    # To prevent applications from using ALSA's OSS emulation and bypassing # PulseAudio (thereby preventing other applications from playing sound), # make sure the module snd_pcm_oss is not being loaded at boot # https://wiki.archlinux.org/index.php/PulseAudio#ALSA blacklist snd_pcm_oss blacklist snd_mixer_oss

    blacklist dvb_usb_rtl28xxu #blacklist snd_hda_codec_hdmi

    # slows down boot blacklist mei_wdt

    # irq 48: nobody cared (try booting with the "irqpoll" option) # [<00000000c1127e5c>] tis_int_handler [tpm_tis_core] blacklist tpm_tis_core

    Sound

    Sounds got complicated, took me a while to understand how sound now works (so changed so many times), and debug it:
    pipewire replaces pulseaudio https://wiki.archlinux.org/title/PipeWire
    helvum is graphical interface, it's pretty but not sure it's useful
    qpwgraph is the same as helvum
    pulseaudio still needed to talk to it.
    

    Check out the linux kernel config options in here if that helps.

    sauron:~$ pactl info Server String: /run/user/500/pulse/native Library Protocol Version: 35 Server Protocol Version: 35 Is Local: yes Client Index: 557 Tile Size: 65472 User Name: merlin Host Name: sauron.svh.merlins.org Server Name: PulseAudio (on PipeWire 0.3.65) Server Version: 15.0.0 Default Sample Specification: float32le 2ch 48000Hz Default Channel Map: front-left,front-right Default Sink: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.stereo-fallback Default Source: alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.stereo-fallback.monitor Cookie: 1ece:0308

    sauron:/etc/modprobe.d# inxi -aA Audio: Device-1: Intel Tiger Lake-H HD Audio vendor: Lenovo driver: sof-audio-pci-intel-tgl alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 00:1f.3 chip-ID: 8086:43c8 class-ID: 0401 Device-2: NVIDIA GA104 High Definition Audio vendor: Lenovo driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:228b class-ID: 0403 API: ALSA v: k6.6.8-amd64-volpre-sysrq-20231218 status: kernel-api with: aoss type: oss-emulator tools: alsamixer,amixer Server-1: PipeWire v: 0.3.65 status: n/a (root, process) with: 1: pipewire-pulse status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl

    ====================== microphone not working ====================== https://forum.endeavouros.com/t/pipewire-pipewire-media-session-vs-wireplumber/20705 wireplumber is new and inevitable, it uses LUA and different config files

    https://wiki.archlinux.org/title/PipeWire /usr/share/wireplumber/main.lua.d/50-alsa-config.lua -- ["api.alsa.use-acp"] = true, => yeah, this kind of works but prevents headphones from working later

    default output is Tiger Lake HD Audio Controller microphone is HD Autdio Controller DMIC 16Khz

    Instead of fixing in wireplugger, fix in pipewire which was not super documented:

    Tried again with /etc/pipewire/microphone.conf after ln -s /usr/share/pipewire /etc/pipewire ---------------------------------------------------------------------------- merlin:/etc/pipewire$ ls -l /etc/pipewire lrwxrwxrwx 1 root root 19 Dec 25 03:37 /etc/pipewire -> /usr/share/pipewire merlin:/etc/pipewire$ cat microphone.conf # https://wiki.archlinux.org/title/PipeWire context.objects = [ { factory = adapter args = { factory.name = api.alsa.pcm.source node.name = "microphone" node.description = "Lenovo P17 DMIC16kHz" media.class = "Audio/Source" # arecord -l api.alsa.path = "hw:0,7" } } ] ----------------------------------------------------------------------------

    then restart: killall pipewire pipewire-pulse (which gets auto restarted)

    changes Audio |- Devices: | 44. GA104 High Definition Audio Controller [alsa] | 45. Tiger Lake-H HD Audio Controller [alsa] | |- Sinks: | * 54. Tiger Lake-H HD Audio Controller Stereo [vol: 0.71] | |- Sink endpoints: | |- Sources: | 55. Tiger Lake-H HD Audio Controller Stereo [vol: 0.61]

    to Audio |- Devices: | 45. Tiger Lake-H HD Audio Controller [alsa:pcm] | 51. GA104 High Definition Audio Controller [alsa:pcm] | |- Sinks: | * 33. Tiger Lake-H HD Audio Controller [vol: 0.89] | 37. GA104 High Definition Audio Controller (HDMI 1) [vol: 1.00] | 38. GA104 High Definition Audio Controller (HDMI 3) [vol: 1.00] | 39. GA104 High Definition Audio Controller (HDMI 2) [vol: 1.00] | 40. GA104 High Definition Audio Controller (HDMI 0) [vol: 1.00] | 363. Tiger Lake-H HD Audio Controller (HDA Analog Deep Buffer (*)) [vol: 1.00] | 366. Tiger Lake-H HD Audio Controller (HDMI3 (*)) [vol: 1.00] | 377. Tiger Lake-H HD Audio Controller (HDMI2 (*)) [vol: 1.00] | 378. Tiger Lake-H HD Audio Controller (HDMI1 (*)) [vol: 1.00] | |- Sink endpoints: | |- Sources: | 364. Tiger Lake-H HD Audio Controller (DMIC16kHz (*)) [vol: 0.61] | 365. Tiger Lake-H HD Audio Controller (DMIC (*)) [vol: 1.00] | * 411. Tiger Lake-H HD Audio Controller [vol: 0.55]

    ubuntu had this instead: Audio Chip: Realtek ALC287 |- Devices: | 44. Tiger Lake-H HD Audio Controller [alsa] | 45. GA104 High Definition Audio Controller [alsa] | |- Sinks: | 46. Tiger Lake-H HD Audio Controller HDMI / DisplayPort 3 Output [vol: 1.00] | 47. Tiger Lake-H HD Audio Controller HDMI / DisplayPort 2 Output [vol: 1.00] | 48. Tiger Lake-H HD Audio Controller HDMI / DisplayPort 1 Output [vol: 1.00] | * 49. Tiger Lake-H HD Audio Controller Speaker + Headphones [vol: 0.40] | |- Sink endpoints: | |- Sources: | 50. Tiger Lake-H HD Audio Controller Headphones Stereo Microphone [vol: 1.00] | * 51. Tiger Lake-H HD Audio Controller Digital Microphone [vol: 1.00]

    sauron:~# lsmod | grep snd snd_seq_dummy 12288 0 snd_hrtimer 12288 1 snd_hda_codec_hdmi 90112 1 snd_hda_codec_realtek 196608 1 snd_hda_codec_generic 110592 1 snd_hda_codec_realtek snd_soc_dmic 12288 1 snd_sof_pci_intel_tgl 12288 2 snd_sof_intel_hda_common 208896 1 snd_sof_pci_intel_tgl snd_sof_intel_hda 24576 1 snd_sof_intel_hda_common snd_sof_pci 24576 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl snd_sof_xtensa_dsp 12288 1 snd_sof_intel_hda_common snd_soc_hdac_hda 24576 1 snd_sof_intel_hda_common snd_soc_acpi_intel_match 98304 2 snd_sof_intel_hda_common,snd_sof_pci_intel_tgl snd_soc_acpi 16384 2 snd_soc_acpi_intel_match,snd_sof_intel_hda_common snd_hda_intel 57344 0 soundwire_intel 69632 1 snd_sof_intel_hda_common snd_sof_intel_hda_mlink 40960 2 soundwire_intel,snd_sof_intel_hda_common snd_sof_probes 24576 0 snd_sof 352256 4 snd_sof_pci,snd_sof_intel_hda_common,snd_sof_probes,snd_sof_intel_hda snd_sof_utils 16384 1 snd_sof snd_intel_dspcfg 36864 3 snd_hda_intel,snd_sof,snd_sof_intel_hda_common snd_intel_sdw_acpi 16384 2 snd_sof_intel_hda_common,snd_intel_dspcfg snd_soc_skl_hda_dsp 24576 4 snd_soc_intel_hda_dsp_common 16384 1 snd_soc_skl_hda_dsp snd_hda_codec 217088 8 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek, snd_soc_intel_hda_dsp_common,snd_soc_hdac_hda,snd_sof_intel_hda,snd_soc_skl_hda_dsp snd_hwdep 20480 1 snd_hda_codec snd_soc_hdac_hdmi 45056 1 snd_soc_skl_hda_dsp snd_hda_ext_core 40960 5 snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_sof_intel_ hda_mlink,snd_sof_intel_hda snd_hda_core 147456 11 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core, snd_hda_codec,snd_hda_codec_realtek,snd_soc_intel_hda_dsp_common,snd_sof_intel_hda_common,snd_soc_hdac_hdmi, snd_soc_hdac_hda,snd_sof_intel_hda snd_soc_core 421888 8 soundwire_intel,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi, snd_soc_hdac_hda,snd_sof_probes,snd_soc_dmic,snd_soc_skl_hda_dsp snd_compress 28672 2 snd_soc_core,snd_sof_probes snd_pcm_dmaengine 16384 1 snd_soc_core snd_pcm 192512 13 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,soundwire_intel,snd_sof, snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_compress,snd_soc_core,snd_sof_utils,snd_hda_core,snd_pcm_dmaengine snd_seq_midi 20480 0 snd_seq_midi_event 16384 1 snd_seq_midi snd_seq 106496 9 snd_seq_midi,snd_seq_midi_event,snd_seq_dummy snd_timer 53248 3 snd_seq,snd_hrtimer,snd_pcm snd_rawmidi 53248 1 snd_seq_midi snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi snd_ctl_led 24576 0 snd 155648 26 snd_ctl_led,snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep, snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_sof,snd_timer,snd_soc_hdac_hdmi,snd_compress,thinkpad_acpi, snd_soc_core,snd_pcm,snd_rawmidi soundcore 16384 2 snd_ctl_led,snd ledtrig_audio 12288 3 snd_ctl_led,snd_hda_codec_generic,thinkpad_acpi ac97_bus 12288 1 snd_soc_core sauron:~# dmesg | grep snd [ 30.162413] snd_hda_intel 0000:00:1f.3: vgaarb: pci_notify [ 30.162418] snd_hda_intel 0000:00:1f.3: runtime IRQ mapping not provided by arch [ 30.162422] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100 [ 30.162441] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver [ 30.162444] snd_hda_intel 0000:00:1f.3: vgaarb: pci_notify [ 30.838258] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC287: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker [ 30.853017] snd_hda_codec_realtek ehdaudio0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) [ 30.871445] snd_hda_codec_realtek ehdaudio0D0: hp_outs=1 (0x21/0x0/0x0/0x0/0x0) [ 30.892281] snd_hda_codec_realtek ehdaudio0D0: mono: mono_out=0x0 [ 30.892292] snd_hda_codec_realtek ehdaudio0D0: inputs: [ 30.892342] snd_hda_codec_realtek ehdaudio0D0: Mic=0x19 [ 30.969586] snd_hda_codec_realtek ehdaudio0D0: ASoC: sink widget AIF1TX overwritten [ 30.977231] snd_hda_codec_realtek ehdaudio0D0: ASoC: source widget AIF1RX overwritten sauron:~# dmesg | grep firmware [ 2.855848] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/tgl_dmc_ver2_12.bin (v2.12) [ 2.881616] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/tgl_guc_70.1.1.bin version 70.1.1 [ 2.881621] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc_7.9.3.bin version 7.9.3 [ 3.942915] psmouse serio2: trackpoint: Elan TrackPoint firmware: 0x12, buttons: 3/3 [ 29.602566] systemd[1]: systemd-pcrmachine.service - TPM2 PCR Machine ID Measurement was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f). [ 30.386592] iwlwifi 0000:09:00.0: loaded firmware version 83.e8f84e98.0 ty-a0-gf-a0-83.ucode op_mode iwlmvm [ 469.044883] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/tgl_guc_70.1.1.bin version 70.1.1 [ 469.044897] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc_7.9.3.bin version 7.9.3 [ 621.435387] iwlwifi 0000:09:00.0: loaded firmware version 83.e8f84e98.0 ty-a0-gf-a0-83.ucode op_mode iwlmvm [ 3319.317148] Bluetooth: hci0: Minimum firmware build 1 week 10 2014 [ 3319.325256] Bluetooth: hci0: Found device firmware: intel/ibt-0041-0041.sfi [ 3320.667073] Bluetooth: hci0: Waiting for firmware download to complete [50195.773603] usb 3-7: device firmware changed [74491.611751] Bluetooth: hci0: Minimum firmware build 1 week 10 2014 [74491.620036] Bluetooth: hci0: Found device firmware: intel/ibt-0041-0041.sfi [74492.962244] Bluetooth: hci0: Waiting for firmware download to complete [86582.232349] iwlwifi 0000:09:00.0: loaded firmware version 83.e8f84e98.0 ty-a0-gf-a0-83.ucode op_mode iwlmvm [87048.949201] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/tgl_guc_70.1.1.bin version 70.1.1 [87048.949215] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc_7.9.3.bin version 7.9.3 [88544.085573] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/tgl_guc_70.1.1.bin version 70.1.1 [88544.085590] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc_7.9.3.bin version 7.9.3 [88711.577697] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/tgl_guc_70.1.1.bin version 70.1.1 [88711.577711] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc_7.9.3.bin version 7.9.3 [88712.922837] Bluetooth: hci0: Minimum firmware build 1 week 10 2014

    See more images for Linux on Lenovo P17gen2
    2024/06/23 Linux on Dell XPS 9730
    π 2024-06-23 01:01 in Computers, Linux

    Intro

    I had a forced upgrade from P73 to P17gen2 after my P73 suddenly died, and honestly I wasn't really impressed with the P17gen2, it was still huge, was not faster CPU wise, and did not run any longer on batteries despite going from Intel gen9 to gen11 (lenovo has no newer CPUs for 17" and 4K). This is where I looked into other options and found the Dell XPS 9730 as pretty much the only up to date gen13 laptop with 4K and 17" LCD.

    Have a look at this page on Thinkpad P70 vs P73 vs P17

    XPS 9730 is definitely smaller and more pixels than the P17gen
    XPS 9730 is definitely smaller and more pixels than the P17gen

    smaller footprint and lighter, sadly also a shit keyboard :(
    smaller footprint and lighter, sadly also a shit keyboard :(

    the text console is very small ;)
    the text console is very small ;)

    battery use is much better than lenovo
    battery use is much better than lenovo

    13th gen intol, 6 fast cores plus 8 low power cores
    13th gen intol, 6 fast cores plus 8 low power cores

    nice 3840x2400 native panel resolution
    nice 3840x2400 native panel resolution

    compared to lenovo, the laptop is not easy to open, but hopefully you only have to do it once to add/replace NVME M2 drives (M2 SATA is not supported)
    compared to lenovo, the laptop is not easy to open, but hopefully you only have to do it once to add/replace NVME M2 drives (M2 SATA is not supported)

    The things I don't like about this laptop however:

  • no trackpoint. I'm sorry trackpoint is so much more reliable and efficient when you know how to use it. The trackpoint only is why I go back to my thinkpad when I'm not travelling and need lightweight and long battery life
  • the keyboard layout sucks. Why trying to save keys on a 17" laptop? Why no Pg Down/Pg Up without Fn? Why no direct home and end? and OMG sysrq does not work :( Seriously, Dell, what were you thinking? Why such a crappy small laptop keyboard on your biggest keyboard? The other reason I go back to the thinkpad is because of the proper keyboard.
  • Linux config files

    You can get them here

    Missing hardware ports

    Somehow Dell decided it was worth removing the USB-A ports, that sucks, I really wanted at least one or two. Anyway, you can use USB-C to USB-A adapters, but now you're carrying dongles taped ton your laptop :-
    They do provide a dongle that outputs 1x USB-A (works but dongle is too big for that), and 1x HDMI. That latter one is actually the cool one, because it just worked on linux. Getting HDMI out on lenovo with their stupid nvidia chip in the way has been a complete pain, but HDMI over USB-C actually just worked!

    Hardware support

    A recent kernel is important with the right build options to get support for the touchpad, the touchscreen, and sound

    modprobe dell_laptop

    merlin:~# lsmod | grep ^dell dell_rbu 20480 0 dell_laptop 32768 0 dell_wmi 28672 1 dell_laptop dell_smbios 32768 2 dell_wmi,dell_laptop dell_wmi_sysman 53248 0 dell_wmi_descriptor 20480 2 dell_wmi,dell_smbios dell_wmi_ddv 24576 0

    Need this in kernel build: Dell X86 Platform Specific Device Drivers

    Dell X86 Platform Specific Device Drivers (X86_PLATFORM_DRIVERS_DELL) [N/y/?] (NEW) y Alienware Special feature control (ALIENWARE_WMI) [M/n/?] (NEW) m Dell Systems Management Base Driver (DCDBAS) [M/n/y/?] (NEW) m Dell Laptop Extras (DELL_LAPTOP) [M/n/?] (NEW) m BIOS update support for DELL systems via sysfs (DELL_RBU) [M/n/y/?] (NEW) m Dell Airplane Mode Switch driver (DELL_RBTN) [M/n/?] (NEW) m Dell SMBIOS driver (DELL_SMBIOS) [M/n/?] (NEW) m Dell SMBIOS driver WMI backend (DELL_SMBIOS_WMI) [Y/n/?] (NEW) m Dell Latitude freefall driver (ACPI SMO88XX) (DELL_SMO8800) [M/n/y/?] (NEW) y Dell WMI notifications (DELL_WMI) [M/n/?] (NEW) y Dell WMI Hardware Privacy Support (DELL_WMI_PRIVACY) [N/y/?] (NEW) y WMI Hotkeys for Dell All-In-One series (DELL_WMI_AIO) [M/n/?] (NEW) y Dell WMI sensors Support (DELL_WMI_DDV) [M/n/?] (NEW) m External LED on Dell Business Netbooks (DELL_WMI_LED) [M/n/?] (NEW) m Dell WMI-based Systems management driver (DELL_WMI_SYSMAN) [M/n/?] (NEW) m

    Touchpad

    https://forums.gentoo.org/viewtopic-t-1026576-start-0.html <<< kernel modules for touchpad
    Have a look for USB HID SUPPORT and turn on raw HID SUPPORT there.
    merlin:~# lsmod | grep -i HID
    hid_sensor_als         16384  0
    hid_sensor_trigger     20480  2 hid_sensor_als
    industrialio_triggered_buffer    12288  1 hid_sensor_trigger
    industrialio          131072  4 industrialio_triggered_buffer,hid_sensor_trigger,kfifo_buf,hid_sensor_als
    hid_sensor_iio_common    20480  2 hid_sensor_trigger,hid_sensor_als
    intel_hid              32768  0
    sparse_keymap          16384  2 intel_hid,dell_wmi
    hid_multitouch         32768  0
    usbhid                 69632  0
    hid_sensor_custom      28672  0
    hid_sensor_hub         28672  4 hid_sensor_trigger,hid_sensor_iio_common,hid_sensor_als,hid_sensor_custom
    intel_ishtp_hid        28672  0
    hid_generic            12288  0
    usbcore               389120  5 xhci_hcd,usbhid,uvcvideo,btusb,xhci_pci
    intel_ishtp            73728  2 intel_ishtp_hid,intel_ish_ipc
    i2c_hid_acpi           12288  0
    i2c_hid                36864  1 i2c_hid_acpi
    hid                   167936  6 i2c_hid,usbhid,hid_multitouch,hid_sensor_hub,intel_ishtp_hid,hid_generic
    

    screen touch works

    touchpad: merlin:~$ xinput Unable to connect to X server merlin:~$ DISPLAY=:0 xinput | Virtual core pointer id=2 [master pointer (3)] | | Virtual core XTEST pointer id=4 [slave pointer (2)] | | ELAN2097:00 04F3:2A15 id=10 [slave pointer (2)] | | VEN_06CB:00 06CB:CE7E Mouse id=11 [slave pointer (2)] | | VEN_06CB:00 06CB:CE7E Touchpad id=12 [slave pointer (2)] | | PS/2 Generic Mouse id=19 [slave pointer (2)] | Virtual core keyboard id=3 [master keyboard (2)] | Virtual core XTEST keyboard id=5 [slave keyboard (3)] | Video Bus id=6 [slave keyboard (3)] | Video Bus id=7 [slave keyboard (3)] | Power Button id=8 [slave keyboard (3)] | Sleep Button id=9 [slave keyboard (3)] | sof-soundwire Headset Jack id=13 [slave keyboard (3)] | Intel HID events id=14 [slave keyboard (3)] | Intel HID 5 button array id=15 [slave keyboard (3)] | Dell Privacy Driver id=16 [slave keyboard (3)] | Dell WMI hotkeys id=17 [slave keyboard (3)] | AT Translated Set 2 keyboard id=18 [slave keyboard (3)]

    Other touchpad notes, including upgrading your firmware if it's too old and setup an ACPI hotkey to turn the touchpad back on with Fn+F3 if it gets turned off by mistake

    https://ubuntuforums.org/archive/index.php/t-2392658.html So, the two touchpads (you can get the id easily with dmesg | grep -i touchpad): ELAN 04F3:311C <-- this is the one with issues Synaptics 06CB:CE7E => I have the right one but if not lastest firmware fixes things: https://bugzilla.kernel.org/show_bug.cgi?id=214597

    https://www.dell.com/support/kbdoc/en-us/000150104/precision-xps-ubuntu-general-touchpad-mouse-issue-fix

    Added a hotkey to re-enablet touchpad if it gets turned off by mistake by syndaemon merlin:/etc/acpi# grep . touchpad-local.sh events/dell-f* touchpad-local.sh:#!/bin/bash touchpad-local.sh:su - merlin -c "DISPLAY=:0 synclient TouchpadOff=0" events/dell-f4-cdplay-sleep-local:event=button/volumeup VOLUP 00000080 00000000 events/dell-f4-cdplay-sleep-local:action=/etc/acpi/touchpad-local.sh

    Fan control needed for CPU

    Fan control is also required to allow CPUs to work faster, or they will be temperature throttled.

    merlin:~# smbios-thermal-ctl -g -------------------------------------------------------------------

    Current Thermal Modes: Performance

    Current Active Acoustic Controller (AAC) Mode: AAC mode Disabled

    Current Active Acoustic Controller (AAC) Mode: Global (AAC enable/disable applies to all supported USTT modes)

    Current Fan Failure Mode: Helper function to Get current Thermal Mode settings

    by default, CPUs are throttled down for temperature, install throttled to control fans which in turn allow CPUs to run harder: apt install thermald merlin:~# systemctl start thermald merlin:~# psg thermald root 45398 0.0 0.0 287000 10240 ? Ssl 04:09 0:00 /usr/sbin/thermald --systemd --dbus-enable --adaptive

    Sound

    Sound is fairly tricky, it worked in Ubuntu 23, nothing less than that and not so much on Debian.

    This firmware module is crutial and missing on debian: merlin:/# dpkg -S iwlwifi-so-a0-gf-a0-83.ucode linux-firmware: /lib/firmware/iwlwifi-so-a0-gf-a0-83.ucode.zst



    /etc/pipewire/microphone.conf

    # https://wiki.archlinux.org/title/PipeWire
    # this works for pipewire-media-session but not wireplumber (that uses lua)
    context.objects = [
        { factory = adapter
            args = {
                factory.name           = api.alsa.pcm.source
                node.name              = "microphone"
                node.description       = "Undetected Microphone"
                media.class            = "Audio/Source"
    # arecord -l
                api.alsa.path          = "hw:1,7"
            }
        }
    ]
    

    merlin:~# dmesg | grep snd [ 84.237700] snd_hda_intel 0000:00:1f.3: vgaarb: pci_notify [ 84.242752] snd_hda_intel 0000:00:1f.3: runtime IRQ mapping not provided by arch [ 84.242780] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100 [ 84.247195] snd_hda_intel 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver [ 84.247203] snd_hda_intel 0000:00:1f.3: vgaarb: pci_notify

    merlin:~# dmesg | grep firmware [ 2.924714] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/adlp_dmc.bin (v2.19) [ 2.949985] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/adlp_guc_70.bin version 70.5.1 [ 2.949993] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc.bin version 7.9.3 [ 83.756991] systemd[1]: systemd-pcrmachine.service - TPM2 PCR Machine ID Measurement was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f). [ 84.624266] iwlwifi 0000:00:14.3: loaded firmware version 83.e8f84e98.0 so-a0-gf-a0-83.ucode op_mode iwlmvm [ 85.611677] Bluetooth: hci0: Minimum firmware build 1 week 10 2014 [ 85.641830] Bluetooth: hci0: Found device firmware: intel/ibt-0040-0041.sfi [ 87.312791] Bluetooth: hci0: Waiting for firmware download to complete



    https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html#run-alsa-info
    

    No sound on speakers on dell 9730 (But works on wired headphones and bluetooth) #4758: https://github.com/thesofproject/linux/issues/4758#issuecomment-1874578163

    apt-get install -t bullseye-backports firmware-sof-signed thermald intel-microcode amd64-microcode firmware-realtek firmware-iwlwifi

    apt-get install -t unstable firmware-sof-signed alsa-ucm-conf

    Without alsa-ucm.conf (not always installed on debian), this crutial file was missing: merlin:~# cat /usr/share/alsa/ucm2/sof-soundwire/rt1316-2.conf # Use case Configuration for sof-soundwire card

    SectionDevice."Speaker" { Comment "Speaker"

    If.lrswitch { Condition { Type ControlExists Control "name='rt1316-1 DAC L Switch'" } True { EnableSequence [ cset "name='rt1316-1 RX Channel Select' L,L" cset "name='rt1316-2 RX Channel Select' R,R" cset "name='rt1316-1 DAC L Switch' 1" cset "name='rt1316-1 DAC R Switch' 1" cset "name='rt1316-2 DAC L Switch' 1" cset "name='rt1316-2 DAC R Switch' 1" cset "name='Speaker Switch' on" ]

    merlin:~$ inxi -aA Audio: Device-1: Intel vendor: Dell driver: sof-audio-pci-intel-tgl alternate: snd_hda_intel,snd_sof_pci_intel_tgl bus-ID: 0000:00:1f.3 chip-ID: 8086:51ca class-ID: 0401 API: ALSA v: k6.6.9-amd64-volpre-sysrq-20240101 status: kernel-api with: aoss type: oss-emulator tools: alsamixer,amixer Server-1: PipeWire v: 0.3.65 status: active (process) with: 1: pipewire-pulse status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl

    merlin:~$ wpctl status PipeWire 'pipewire-0' [0.3.65, merlin@merlin.svh.merlins.org, cookie:3437972412] `- Clients: 31. pipewire [0.3.65, merlin@merlin.svh.merlins.org, pid:3849] 33. WirePlumber [0.3.65, merlin@merlin.svh.merlins.org, pid:3847] 34. WirePlumber [export] [0.3.65, merlin@merlin.svh.merlins.org, pid:3847] 81. Efl Volume Control [0.3.65, merlin@merlin.svh.merlins.org, pid:32317] 95. enlightenment [0.3.65, merlin@merlin.svh.merlins.org, pid:32317] 102. wpctl [0.3.65, merlin@merlin.svh.merlins.org, pid:41767]

    Audio |- Devices: | 44. sof-soundwire [alsa] | |- Sinks: | 53. sof-soundwire HDMI / DisplayPort 3 Output [vol: 1.00] | 54. sof-soundwire HDMI / DisplayPort 2 Output [vol: 1.00] | 55. sof-soundwire HDMI / DisplayPort 1 Output [vol: 1.00] | 56. sof-soundwire Headphones [vol: 1.00] | * 57. sof-soundwire Speaker [vol: 0.50] | |- Sink endpoints: | |- Sources: | 58. sof-soundwire Headset Microphone [vol: 1.03] | * 59. sof-soundwire SoundWire microphones [vol: 0.48] |

    Configs

    If that helps, a few config files ( You also can get them here )

    This config file is very important if you want to configure the touchpad to emulate 3 buttons at the bottom of the bad (left/middle/right)
    /etc/X11/xorg.conf.d/70-synaptics.conf

    # https://wiki.archlinux.org/title/Touchpad_Synaptics#Configuration
    # https://www.dell.com/support/kbdoc/en-us/000150104/precision-xps-ubuntu-general-touchpad-mouse-issue-fix
    

    Section "InputClass" Identifier "touchpad" Driver "synaptics" MatchIsTouchpad "on" #Option "TapButton1" "1" #Option "TapButton2" "3" #Option "TapButton3" "2" #Option "VertEdgeScroll" "on" #Option "VertTwoFingerScroll" "on" #Option "HorizEdgeScroll" "on" #Option "HorizTwoFingerScroll" "on" #Option "CircularScrolling" "on" #Option "CircScrollTrigger" "2" #Option "EmulateTwoFingerMinZ" "40" #Option "EmulateTwoFingerMinW" "8" #Option "CoastingSpeed" "0" #Option "FingerLow" "30" #Option "FingerHigh" "50" #Option "MaxTapTime" "125" #Option "SendEventsMode" "disabled-on-external-mouse" #Option "Tapping" "True" Option "AccelProfile" "adaptive" Option "AccelSpeed" "0.3" #Option "TappingDrag" "True" #Option "HorizontalScrolling" "True" #Option "ScrollMethod" "edge" # https://wiki.archlinux.org/title/Touchpad_Synaptics # left 40% middle 25% (40% to 65%) right 35% (from 65% to 0=inf) # buttons go from 90% down to 0=inf Option "SoftButtonAreas" "66% 0 90% 0 40% 65% 90% 0" EndSection

    lmsensors if the right kernel build options are set

    merlin:~# sensors
    coretemp-isa-0000
    Adapter: ISA adapter
    Package id 0:  +62.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 0:        +58.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 4:        +57.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 8:        +60.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 12:       +59.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 16:       +58.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 20:       +52.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 24:       +59.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 25:       +59.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 26:       +59.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 27:       +59.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 28:       +59.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 29:       +58.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 30:       +58.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 31:       +58.0°C  (high = +100.0°C, crit = +100.0°C)
    

    dell_ddv-virtual-0 Adapter: Virtual device CPU Fan: 2866 RPM Video Fan: 2857 RPM CPU: +61.0°C (low = +0.0°C, high = +0.0°C) NB: +52.0°C (low = +0.0°C, high = +0.0°C) Other: +56.0°C (low = +0.0°C, high = +0.0°C) Other: +51.0°C (low = +0.0°C, high = +0.0°C) Other: +53.0°C (low = +0.0°C, high = +0.0°C) Ambient: +28.0°C (low = +0.0°C, high = +0.0°C) Other: +49.0°C (low = +0.0°C, high = +0.0°C) Unknown: +26.0°C (low = +0.0°C, high = +0.0°C) Video: +53.0°C (low = +0.0°C, high = +0.0°C)

    ubuntu 6.5.0-14 kernel: merlin:/lib/modules# sensors ucsi_source_psy_USBC000:002-isa-0000 Adapter: ISA adapter in0: 5.00 V (min = +5.00 V, max = +5.00 V) curr1: 0.00 A (max = +0.00 A)

    iwlwifi_1-virtual-0 Adapter: Virtual device temp1: +39.0°C

    ucsi_source_psy_USBC000:004-isa-0000 Adapter: ISA adapter in0: 5.00 V (min = +5.00 V, max = +5.00 V) curr1: 0.00 A (max = +3.00 A)

    coretemp-isa-0000 Adapter: ISA adapter Package id 0: +51.0°C (high = +100.0°C, crit = +100.0°C) Core 0: +44.0°C (high = +100.0°C, crit = +100.0°C) Core 4: +43.0°C (high = +100.0°C, crit = +100.0°C) Core 8: +46.0°C (high = +100.0°C, crit = +100.0°C) Core 12: +41.0°C (high = +100.0°C, crit = +100.0°C) Core 16: +41.0°C (high = +100.0°C, crit = +100.0°C) Core 20: +45.0°C (high = +100.0°C, crit = +100.0°C) Core 24: +47.0°C (high = +100.0°C, crit = +100.0°C) Core 25: +47.0°C (high = +100.0°C, crit = +100.0°C) Core 26: +47.0°C (high = +100.0°C, crit = +100.0°C) Core 27: +47.0°C (high = +100.0°C, crit = +100.0°C) Core 28: +48.0°C (high = +100.0°C, crit = +100.0°C) Core 29: +48.0°C (high = +100.0°C, crit = +100.0°C) Core 30: +48.0°C (high = +100.0°C, crit = +100.0°C) Core 31: +48.0°C (high = +100.0°C, crit = +100.0°C)

    nvme-pci-e200 Adapter: PCI adapter Composite: +30.9°C (low = -40.1°C, high = +119.8°C) (crit = +129.8°C) Sensor 1: +40.9°C (low = -40.1°C, high = +139.8°C) Sensor 2: +30.9°C (low = -40.1°C, high = +119.8°C)

    ucsi_source_psy_USBC000:003-isa-0000 Adapter: ISA adapter in0: 5.00 V (min = +5.00 V, max = +5.00 V) curr1: 0.00 A (max = +0.00 A)

    ucsi_source_psy_USBC000:001-isa-0000 Adapter: ISA adapter in0: 18.00 V (min = +0.00 V, max = +20.00 V) curr1: 6.50 A (max = +6.50 A)

    dell_ddv-virtual-0 Adapter: Virtual device CPU Fan: 1221 RPM Video Fan: 1206 RPM CPU: +53.0°C (low = +0.0°C, high = +0.0°C) NB: +43.0°C (low = +0.0°C, high = +0.0°C) Other: +47.0°C (low = +0.0°C, high = +0.0°C) Other: +42.0°C (low = +0.0°C, high = +0.0°C) Other: +45.0°C (low = +0.0°C, high = +0.0°C) Ambient: +31.0°C (low = +0.0°C, high = +0.0°C) Other: +42.0°C (low = +0.0°C, high = +0.0°C) Unknown: +27.0°C (low = +0.0°C, high = +0.0°C) Video: +36.0°C (low = +0.0°C, high = +0.0°C)

    nvme-pci-e100 Adapter: PCI adapter Composite: +31.9°C (low = -5.2°C, high = +89.8°C) (crit = +93.8°C)

    BAT0-acpi-0 Adapter: ACPI interface in0: 13.13 V curr1: 1000.00 uA

    See more images for Linux on Dell XPS 9730
    2024/04/14 Electronics Flea Market
    π 2024-04-14 01:01 in Computers, Public
    I hadn't been able to go in a few years, glad to be back and find other electronics, batteries and other stuff I might or might not need, but looked enticing :) (I ended up finding a bunch of lithium battery packs for a good price, that will work for my burning man bike, and maybe LED outfit as a backup source of power, I may even be able to use them to power my laptop)










    See more images for Electronics Flea Market
    2024/04/09 Texas Toy Museum and Arcade in Austin
    π 2024-04-09 01:01 in Computers, Sciencemuseums, Texas
    I finished my day visit of Austin in the Texas Toy Museum and Arcade, which had a pretty cool collection of old video games, flippers, role playing games, cartoons, and other geek memorabilia:











    2023/12/30 National Videogame Museum in Sheffield, UK
    π 2023-12-30 01:01 in Computers, Sciencemuseums, Uk
    While briefly in Sheffield, I had a little bit of time before going back to Manchester, and the most enticing place to visit was the National Videogame Museum.
    Once there, I only had about 1H as it closes betweeen 13:00 and 14:00. I didn't have a much time to play, but enough time to look around and enjoy the collection:






    The various historical collections were fairly good:












    Hopefully I'll be back in Sheffield one day, and will have time to play more next time.


    2023/12/08 Thinkpad P73 vs P17 gen2 vs Dell XPS 9730 With Linux
    π 2023-12-08 01:01 in Computers, Linux

    Thinkpad History: P70, P73, to P17gen2 With Linux

    Let's start with historical/related page:
  • originally I had a Thinkpad P70 (see review here)
  • this explains Upgrading from Sata SSD, to M2 Sata, to M2 NVME on P70
  • How to get the P70 to charge from slimtip adapters it doesn't like
  • After many years, I eventually upgraded to P73, which has 2x as many cores as P70, so it was a worthwhile speed upgrade, although it dropped room for the optical drive (which I used for a 2nd 2.5" SATA drive, which was then gone).
  • By then Lenovo messed up P73 power further and it refused to even use an 20V power unless I built special trickery
  • So I wrote this Lenovo P17gen2 with linux page
  • And this Linux on Dell XPS 9730 page
  • P17gen2 is not much an upgrade to P73, if at all :-/

    So, I was pretty used to the P73 and hadn't heard that the new lenovos were really that much better, and I stayed with it. That is until it suddenly died with a critical motherboard error that had to be decoded by an android app that listened to the complex beep code.
    Thankfully I had full extended onsite warranty, which was a very good buy, but then found out that Lenovo was struggling to find a replacement motherboard for me 3 years later, especially as CPUs were soldered on the motherboard, making it harder for them to have the right parts. After much back and forth and delays in getting a fixed board, they mentioned it might be smarter for me to take a check from them for the full price I paid, and buy a newer thinkpad from them.
    However, this is when I found out that Lenovo had entirely stopped making 17" 4K laptops. Because Apple decided that 16" was good enough according to them, other vendors stupidly decided to follow suit. At that point, I realized that the P17gen2 was the last 17" laptop they made, so I eventually found one on their outlet store, and was able to buy one with the money they refunded me for the P73 (and even had money left over to buy a Dell 9730, see below).
    Both laptops mostly look the same, but p17gen2
  • wasn't really much faster in my tests despite being much newer
  • drops the 2nd set of buttons under the touchpad (not a huge deal for me)
  • completely removes space for the SATA 2.5" drive (seriously? there is so much space in that huge laptop, what happened?)
  • more annoyingly even, despite 3 M2 slots, none of them support SATA/AHCI anymore, so my existing 2TB M2 Sata would not work at all anymore. Come on lenovo? how much did you save doing this?
  • has no better battery life than the P73, maybe even slightly worse. Given the newer CPU, that's quite disappointing (in both cases, I turned off the nvidia chip I really wish weren't there to start with)
  • both laptops mostly look the same,
    both laptops mostly look the same,

    so in the short term, this is how I had to get the P17 to work, with 2 USB adapters, sigh...
    so in the short term, this is how I had to get the P17 to work, with 2 USB adapters, sigh...

    128GB of RAM in that used model, that was nice. The Xeon 11855 didn't feel faster and definitely didn't last longer on batteries :-/
    128GB of RAM in that used model, that was nice. The Xeon 11855 didn't feel faster and definitely didn't last longer on batteries :-/

    So basically the P17gen2 didn't really have any clear advanage compared to the P73 and dropped a few things I used. It does allow for more RAM, and I'm hoping the new CPU is better somehow, but I didn't see anything super obvious.

  • P73: 9th Gen Intel® Core i9-9880H with vPro (2.30GHz, up to 4.80GHz with Turbo Boost, 8 Cores, 16MB Cache)
  • P17gen2: 11th Gen Intel Xeon® W-11855M Processor with vProâ„¢ (3.20 GHz, up to 4.90 GHz with Turbo Boost, 6 Cores, 12 Threads, 18 MB Cache)

  • So the newer CPU had to be more efficient, but 6 cores vs 8 cores, it didn't win in the end. I guess Lenovo didn't want to put more cores maybe due to cooling issues, or who knows?

    Dell XPS 9730, faster, smaller, lighter and 2x the battery life of P17gen2, and charges from regular USB-PD when Lenovo still refuses almost all other power supplies

    Because I was really hoping for much better battery life and transportability, I looked at other options tht had 17" screen and 4K resolution. Turns out all I found were 2 Dells and that's it. All the big 17-18" gamer laptops didn't have 4K on their LCD, and of course their battery life would have been dubious.
    So I got a Dell XPS 9730, and it's definitely smaller, thinner and lighter than the Lenovo:

    P17gen2 vs Dell XPS 9730, and the Dell has more pixels even (3840x2400 instead of 3840x2160), but it's sadly missing the trackpoint
    P17gen2 vs Dell XPS 9730, and the Dell has more pixels even (3840x2400 instead of 3840x2160), but it's sadly missing the trackpoint

    P70, P73, P17gen, Dell XPS 9730, you can see how big and fat the Lenovos, are
    P70, P73, P17gen, Dell XPS 9730, you can see how big and fat the Lenovos, are

    another shot of how much smaller and thinner Dell XPS 9730, sittting on top of P17gen2
    another shot of how much smaller and thinner Dell XPS 9730, sittting on top of P17gen2

    I had no plans on using windows, but I wanted to get a fair test of battery life, so I did it under windows

    Not even 5H, I feel P73 was better than P17gen2
    Not even 5H, I feel P73 was better than P17gen2

    With Dell XPS 9730, I easily got 8H on windows and linux, and up to 10H by tuning a lot
    With Dell XPS 9730, I easily got 8H on windows and linux, and up to 10H by tuning a lot


    up to 15h of battery life on the dell?
    up to 15h of battery life on the dell?

    only 3H for lenovo on windows in battery saver mode?
    only 3H for lenovo on windows in battery saver mode?

    So basically as much as I very much, and I mean very very much miss the trackpoint on Lenovo, Lenovo really got lazy in design. The P17gen2 is huge compared to the Dell XPS 9730, it's much heavier, bigger, has a smaller resolution and only about half the battery life. So much wasted space inside that laptop, I'm not sure what else to say.
    Oh, right, and Lenovo made power worse on their laptops, they still require special and heavy power supplies, and still refuse to use any other power source. and completely refuse to use any USB power (20V, 100W PD). Come on, lenovo, really! I don't want to hear any BS excuses, Dell does it fine (it uses whatever power can come from USB and if it's not enough will slowly discharge the battery to make up for the difference).

    Dell XPS 9730 Linux Tip: AHCI vs VMD and no M2 SATA support either

    The 9730 came with windows of course, and now ships with VMD by default, which is another incompatible block layer. You can switch it back to AHCI since some older linux installs do not support VMD, but if you do, the built in windows install will stop booting entirely (yeah for windows for still being that stupid and unable to adapt to the blocker layer changing, even when secure boot is disabled).


    Tbe laptop documentation says nothing on whether SATA M2 is supported or not, and sadly just like Lenovo, it only supports NVME, no M2 SATA:

    one downside of the Dell is that it's hard to open to change the M2 drives (only 2 slots), lots of clips to unclip carefully
    one downside of the Dell is that it's hard to open to change the M2 drives (only 2 slots), lots of clips to unclip carefully


    Other 17"+ 4K laptops (intel gen13 or better)

    I started this thread: https://www.reddit.com/r/DellXPS/comments/1do72fl/which_other_17_lcd_4k_lcd_laptops_with_3h_of/ and as part of this got at least one other option:
  • HP Envy Laptop 17-cw0097nr (14th gen intel, 17.3" 4K, but only 53Wh battery, which is sad: https://www.hp.com/us-en/shop/pdp/hp-envy-laptop-17-cw0097nr
  • Windows, trying hard to prevent people from installing google chrome, what a joke

    I used windows briefly enough to get spec, update firmware, and test battery use. During that time, I found how pathetic windows and microsoft have gotten. They gave me literally newer fewer than 4 warnings to try and stop me from switching from edge to google chrome, OMG...


    'added trust of microsoft' the company that got infiltrated by crackers that stole all their source code?
    'added trust of microsoft' the company that got infiltrated by crackers that stole all their source code?

    another forced banner to tell me not to use chrome
    another forced banner to tell me not to use chrome

    and one more pathetic attempt to stop me from switching, 4 in a row!
    and one more pathetic attempt to stop me from switching, 4 in a row!

    2021/08/25 Bletchley Park & National Museum of Computing
    π 2021-08-25 01:01 in Computers, England2021, Sciencemuseums
    I did not know anything about Bletchley Park or National Museum of Computing just 1H north of London until I was in London and had dinner with my friend and EFREI schoolmate, Jerome Abela, who told me about it. It is purposely 1H outside of London just next to a train station, because it was a very secret encrypted message breaking and decoding base during WWII and in case London ever were to be bombed, this place that didn't look like anything, would be spared.

    I didn't quite know that Bletchley Park is actually separate from the National Museum of Computing (they are adjacent, but separated by a fence, needing an annoying 10-15mn walk all the way around), and Bletchey Park actually opens earlier, so it's probably best to visit first (also check the National Museum of Computing's website for which dsays they have guided tours and guides showing the hardware (well worth it).

    I'll start with the National Museum of Computing as it was the most exciting to me with its fully functional rebuild bombe and colossus decryption machines for Enigma and Lorenz (the much more secure encryption system German Command used):



    One big mistake the germans did was to send a weather report starting with the same german word (known plaintext) every morning. This allowed building a computer (bombe) that tried all rotor combinations to turn the crypted message into the known platintext:



    The even more impressive machine (by a lot) was the aptly named "Colossus" which was build from scratch from a reverse engineered design (that part is so impressive), to decrypt the much more secure Lorenz encryption:








    the computer reads the encrypted message from this paper tape (5 bit ASCII)
    the computer reads the encrypted message from this paper tape (5 bit ASCII)


    this machine did the decryption once the other machine had output the decryption parameters
    this machine did the decryption once the other machine had output the decryption parameters


    How lorenz was reverse engineered and cracked is complicated and super impressive, but basically all came down to the almost same message being sent twice with the same key which allowed for a known plaintext attack:


    This video shows the different machines in action Bombe rebuild (to break enigma), Colossus rebuild (to break Lorenz), plus the oldest still working half-mechanical computer (Harwell Dekatron):

    And the museum had lot of other computers, a collection that is close to being as good as the one at the computer history museum in Mountain View, CA:


    they have a whole collection of tubes (pre-transistors) to replace the ones that break on their machines
    they have a whole collection of tubes (pre-transistors) to replace the ones that break on their machines





    core memory
    core memory





    impressive they had so many of those machines, still working
    impressive they had so many of those machines, still working




    I had one of those
    I had one of those

    this too
    this too

    and this too (Asmtrad CPC464+memory upgrade+floppy)
    and this too (Asmtrad CPC464+memory upgrade+floppy)

    didn't have this one at home, but worked with them at SGI
    didn't have this one at home, but worked with them at SGI

    those I never had, but I wish I did. Archimedes was awesome and way ahead of its time with Arm RISC CPUs
    those I never had, but I wish I did. Archimedes was awesome and way ahead of its time with Arm RISC CPUs

    The Harwell Dekatron was also a very cool (and still working) computer I had never seen:



    Watch it in action:

    Bletchley Park had different buildings each with their story and what they were used for:





    Lots of info on the machines, an earlier crack of older enigma machines was to use EINS for plaintext attacks:








    They had many displays on the brilliant mathematicians that broke the codes and built the machines. Alan Turing was one of them, but they were multiple others:


    Despite some inefficiencies in having to go back and forth between the 2 museums to join a timed tour at Bletchley (which actually is skipable if you are short on time), I spent the entire day there (open to close) and it was very well worth it.

    2020/05/04 Hacking Power Supplies and Battery Pack To Get Around ThinkPad P73 Broken Power Supply Design
    π 2020-05-04 01:01 in Computers, Electronics, Linux
    While I wrote this for my Lenovo Thinkpad P73, this is likely equivally relevant to P53, P72, and P52.

    Thinkpad P73 vs P70, not a win all around: only one 2.5" drive instead of 2, and a badly designed power system

    So, when lenovo came out with the Thinkpad P70, I wasn't very happy because if you had a 90W power supply, it refused to charge from it, at any rate whatsoever. I was not impressed, but eh, at least it would still power the laptop so that its batteries didn't go flat while plugged in.
    Well, leave it to lenovo engineers to make things worse the for the P73. The minimum power supply was raised from 135W (170W recommended) to 170W (230W recommended) which is understandable, but lenovo decided to ensure that the laptop will not take any power from any power supply that does not identify itself as 170W or more. This means that even ifit only needs 40W to sustain itself without digging into the batteries, it will completely refuse to use a 90W or even 135W power supply for anything at all, and kill the battery instead. Lenovo, you just plain suck, there is no excuse for this.

    P70 vs P73, they look pretty similar
    P70 vs P73, they look pretty similar

    *Update*: it seems if that if you get a cheaper nvidia chip with the P73, it is then configured to accept 135W power supplies as the minimum required. That said, it will still refuse to work with any regular 90W power supply or external battery back, unless you force it with the center pin resistor swap.

    While I have no plans to use windows on that machine, I thought I'd just try it out to see how it does on power. This is where I was impressed, windows can idle at less than 10W for more than 11H runtime, while I'm lucky if I can get linux at 15W. This is definitely a place where linux should do better, of course, it's not as if Lenovo put any work into making linux more efficient on their hardware either:


    *Update* : with tlp and using the nouveau driver just enough to turn off the nvidia chip, I'm now able to tune the laptop down to 10W, almost matching windows.
    See tlp issue 494 for details on how to setup tlp to run in low power mode when power is plugged in.

    Another disappointment is that the P73 is mostly the same size and weight than the P70, but it has less room for storage. It has a bunch of empty spaces that aren't used for anything, and it can't use two 2.5" SATA drives anymore, like the P70 could. Worse, the now single 2.5" slot uses a lenovo only ribbon cable that does not ship with the laptop and basically means you cannot even add a 2.5" drive without that special ribbon cable, which isn't in stock yet. Well done... Ah yes, the battery is also not hot swappable, even if it is replaceable (unlike a Mac laptop where everything is sealed shut).


    this shows the unobtanium lenovo cable for the now only single drive that fits, along the unused space
    this shows the unobtanium lenovo cable for the now only single drive that fits, along the unused space

    Ok, stop complaining, just buy a bunch of 170w or 230W power supplies and move on with your life

    Well, yes and no:
  • I literally have 10 power supplies between home and work, not really looking at replacing all 10. Lenovo wants $137 per power supply by the way, even if they are $85 from other sellers
  • those 170W/230W power supplies are huge. They also weigh as much as some small notebooks (!)
  • I have 12V to 20V car adapters, those won't work anymore
  • I have external battery packs for extended runtime, and I haven't found a single one that can deliver the amps a P73 tries to needlessly require
  • Tricking the P70 and P73 into accepting a power supply it wouldn't otherwise use

    Lenovo uses the a center pin resistor to know how much power they can draw from the power supply, see: http://www.thinkwiki.org/wiki/Power_Connector .

    For the P70, I built this power supply adapter with a resistor bridge to tell the laptop how big it should think the power supply, is:


    It's basically a configurable version of this. Yes, lenovo, I thank you for the hours I wasted opening up power supply plugs and replacing the center pin resistors:


    Here's how the P73 responds:

    - 230W works fine   4.6k => I have seen power supplies work with 170W but fail at 230W, so the laptop does draw more
    - 170W works ok     1.9k (1.8k also ok)
    - 130W rejected     1k
    - 90W  rejected     550 

    The rejected power supplies will be used to charge the laptop if it is shutdown, but they will not be used in any way otherwise. On the P70 the laptop would at least use the power supply to keep the laptop alive, and use half battery half external power supply. Not so with the P73, it just ignores it entirely.
    This is utter bullshit as I have plenty of 90W power supplies, including 12V car converters, or a 90W external 20V battery pack I can't use anymore.

    You can go read my Hacking a thinkpad slim tip adapter to output more than 90W (required to charge a Thinkpad P70) page for details, including this nice battery pack I couldn't use anymore:


    *Update* : so, actually with some serious tlp hacking (basically I told it to force battery mode even if a power supply is plugged in), I've managed to throttle the laptop enough, even when plugged in, so that it only uses 20W. At that point, I'm actually able to use my old external battery pack, as well as a 90W power supply, as long as I lie to the laptop and pretend they are 230W power supplies with the resistor trick. In my tests with windows, it was not possible to throttle the laptop enough when plugged in, not to have it overwhelm a smaller power supply (not that 90W is small for a laptop that normally uses 20-30W when it's not charging batteries).
    If you scroll to the bottom of the page, you'll also see a terrible buffer lipo hardware hack I did that allows to use the battery pack with higher amp draws, but it's a bit ridiculous (and bulky).
    See tlp issue 494 for details on how to setup tlp to run in low power mode when power is plugged in.

    Without the tlp hack or the buffer lipo hack, when I lie to the laptop and tell it is connected to a a bigger power supply, manage power draw with what I run, and disable battery charging in software, but the laptop will still draw the power supply for over 100W when you plug it in for a fraction of a second, and refuse it if the voltage drops.
    Obviously this would not be a problem if the laptop simply had a 90W power supply mode where it throttle things down and turned off battery charging. This is mostly what the P70 does.

    In the meantme, on top of hacking my power supplies, I also made this for my laptop, it looks silly and makes the thinkpad not look like a professional laptop, but well, that's lenovo's fault:


    this takes any power supply and replaces the center tip resistor with a 1.9k one to emulate a 170W power supply
    this takes any power supply and replaces the center tip resistor with a 1.9k one to emulate a 170W power supply

    From talking to Lenovo, they don't think that this is really a problem, so since I'm an engineer, I made my own external battery pack, but I otherwise recommend to road warriors to avoid thinkpads from now on, given the backward power design in this one.

    Making a Thinkpad P73 compatible external battery pack

    I did some testing and confirmed that the laptop is very picky about power supplies. It even rejects a 19.7V 20A power supply I had, because it's 19.8V and not 20V. Same thing for amps, it needs to be able to draw maybe around 5A for a short time to accept the power supply (they sure are putting a lot of effort into making sure the power supply is not under-spec'ed).

    Prototype with 150W step up converter which takes my 16V lipo to 20V while delivering enough amps to make the laptop happy:


    it works, and the laptop thinks it's connected to a 230W power supply thanks to the center pin resistor.
    it works, and the laptop thinks it's connected to a 230W power supply thanks to the center pin resistor.

    Here's a quick demo:

    Version 2 was to have a way to recharge the battery pack while it's being used. I've used this to use the battery pack as a buffer to absorb peaks from the laptop without tripping an external power supply, including in a car limited to 100W or a plane power supply limited to even less:

    this works in theory, but the lipo charger is quite slow and wouldn't keep up for long, but I made a better version shown lower down
    this works in theory, but the lipo charger is quite slow and wouldn't keep up for long, but I made a better version shown lower down

    Lenovo's P73 airplane mode simply stops using the external power supply and reverts to batteries. Sigh...

    Oh yes, let's talk about airplane mode. The lenovo engineers thought of everything: if they detect that the power supply drops a few times in a row, they offer a nice setting which is supposed to make the plane more airplane friendly. How friendly you ask? Well, you could throttle down the CPUs, disable battery charging, do smart stuff like that. Or, if you're lenovo, you can have airplane mode simply refuse to use the power supply altogether. Thank you lenovo, you wrote a feature that saves me the trouble of unplugging an otherwise perfectly good power supply that you refuse to use (to be super clear, my 230W power supply is plugged in and airplane mode just disabled it):


    Making a battery pack to act both as buffer for a smaller power supply, and as emergency external power (even power the laptop from 12v)

    Anyway, back to the battery pack, I found the ISDT H605 Air lipo charger which is small enough and can charge the lipo at 5A, which should be enough to keep up with the laptop when not doing CPU crazy stuff. This also allows using a 12V power supply or a lower wattage lenovo power supply to recharge the pack while it's in use, or not:


    version 1 was a bit bigger than I wanted, 90W power supply shown for scale
    version 1 was a bit bigger than I wanted, 90W power supply shown for scale

    here, the 90W power supply is recharging the battery at 2.5A while it's being discharged at 3A on the output side, using the battery as buffer
    here, the 90W power supply is recharging the battery at 2.5A while it's being discharged at 3A on the output side, using the battery as buffer

    I made version 3 a bit smaller, with a built in 12V lipo to act as buffer for a smaller power supply. Yes, it's a beautiful piece of art, I know :)
    I made version 3 a bit smaller, with a built in 12V lipo to act as buffer for a smaller power supply. Yes, it's a beautiful piece of art, I know :)

    Pushed to the extreme, I can now use my original external battery pack again by having it recharge my lipo+150W step up that can output more amps than the ravpower pack can. Of couse, it's inefficient, the ravpower pack outputs 20V that gets down converted to 12V by the H605 Air lipo charger, which charges the built in 3S lipo in the box, and then gets up converted back to 20V without the amp limitation (the phone used to control the lipo charger also inside the box):


    The really cool thing is that by using tlp, it's actually possible to tune the laptop down to very low power use, even when plugged in, something that windows probably can't do:

    7.3W with the screen off (and around 10W with wifi off and the screen on low dim) is not bad for a laptop that big
    7.3W with the screen off (and around 10W with wifi off and the screen on low dim) is not bad for a laptop that big

    4S Lipo vs 4x 18650 or 26650 batteries

    I do have a few lipos laying around, so that's free energy for my laptop if I'm willing to carry them. I have however found that for higher draws, the step up converter doesn't quite keep up at 20V/5A+ with just 12V input (3S), but is fine with 16V input (4S):


    That said, as I recently found out that 16650 (or better 26650) batteries are both lighter and smaller. The only thing the lipos do, is offer a better discharge rate, but while that's useful for a high power RC plane motor that can empty the batteries in 10mn, it's not needed for a laptop:


    Outside of 26650 batteries, there are other ones like https://www.18650batterystore.com/21700-p/samsung-50e.htm .

    26650s are 195 Wh/kg while the lipo I gave was 184Wh/kg. The 3rd battery listed is supposed to be 260Wh/kg which is much nicer, that said, it looks like those samsung batteries are actually smaller than 26650s, lighter, and yet offer the same 5Ah at 3.6V. If so, that's very impressive.

    As of this writing, I have however not found 26650 battery holders that hold 26650 protected cells that are a bit longer. This seems to the be only one available, and it's too short to hold the batteries: https://www.amazon.com/gp/product/B074GVPWSH


    A few months later, I ended up cutting them and taping them to make them longer. It doesn't work great, but it was enough for a few tests. In the end, I found that somehow I wasn't getting enough amps out of them, which surprised me, so they didn't work that well compared to a lipo:


    Conclusion

    Lenovo, please make the P73 work like the P70, and fix this airplane mode thing that turns off the external power supply. That's embarrassing...
    2016/02/29 Hacking a thinkpad slim tip adapter to output more than 90W (required to charge a Thinkpad P70)
    π 2016-02-29 01:01 in Computers, Electronics, Linux
    The thinkwiki power connector page explains very nicely how Lenovo power supplies come in round and slimp (rectangular) tip, and can be 35, 45, 65, 90, 135, 170, and 230W. The way the laptop knows how much power it can draw, is by measuring a resistor between the center pin and ground. So far, most of my power supplies had been 90W, and all my thinkpads, including the T540p, were ok enough with that, even if maybe they were not always charging at full speed.

    However, when I got my thinkpad P70, although it also uses around 25W in typical use, which means plenty of extra wattage on a 90W power supply to charge the battery, the P70 was unfortunately designed not to charge under any condition unless it recognizes a power supply that's at least 135W (it ships with a 170W power supply, and it's a huge monster brick). I'm pretty mad at lenovo for that because they could totally have designed the P70 to charge at a slower rate from a 90W power supply, or at least when the laptop is sleeping, but no, even when it's sleeping, it will just not charge at all. Sadly, this means that the RAVPower 23000mAh Portable Charger Power Bank External Battery Pack I bougght, was able to power the laptop, but not charge it. I guess in this case, it's not a huge issue since energy would be wasted trying to charge the laptop battery instead of just powering it, but still, that was disappointing.

    here, the pack is powering my laptop at 20V, 2.1A
    here, the pack is powering my laptop at 20V, 2.1A

    The P70 will function off a 90W power supply by just not discharging its battery, and consuming around 1.5A at 20V (i.e. 30W), so that meant that not only I had to buy some bulky 135W power supplies (less bulky than 170W thankfully), but also that I was now unable to use my travel iGo 110W 12V DC power supply, which I use to charge in cars. For AC, I did buy a Lenovo ThinkPad 135W (Slim Tip) Replacement AC Adapter for lenovo ThinkPad T440p 20AN 20AW, Lenovo ThinkPad T540p 20BE 20BF: https://www.amazon.com/gp/product/B00HOMBO0M


    But for car use, I was upset about the situation, so I read up and realized I only had to change the resistor in my barrel connector to slimtip adapter and that would likely allow my thinkpad to start charging from my 110W iGo power supply. The hard part was finding where the resistor was since I had to replace a small resistor with a bigger one (the other way around, I could have trivially added a resistor in series).

    So, I started with the AC Charger Power Supply Adapter Converter Cable Cord For Lenovo ThinkPad : https://www.amazon.com/gp/product/B00T013J44 and had to find where the resistor was hidden. After cutting the cable in 2, I convfirmed it was on the slimtip side, so I had to take the plug apart until I found it.



    After that, it was just a matter of adding a new resistor, and in the end, I added a resistor bridge, so that I could select no resistor, 550 Ohm (90W), 1kOhm (135W), or even 1.9kOhm (170W). For my laptop, though 135W was enough, and my iGo only delivers 110W anyway.



    I added a amp/volt meter (RioRand 2in1 4.5-30V 10A Digital Voltage Detector DC Current Volt Amp Meter), so I can tell how much current is flowing and whether I might be exceeding the wattage of the power supply. When my laptop is running, and the battery charging, it's now using 5.6A (just about 110W)


    So problem solved. I'm not super happy at Lenovo for having stupidly designed their Thinkpad P70 not to charge from a 90W power supply under any use case, even at reduced speed, or even with the laptop sleeping or off, but since I already had the laptop, I was stuck with it, so this little resistor hack did the trick. Hope this helps someone.

    Oh yeah, for car use, instead of this old obsolete iGo brick, I made my own 12V-20V DC-DC converter, and you can read more about it on this page


    2016/02/22 Thinkpad P70 NVME vs M2 Sata vs 2.5inch Sata SSD
    π 2016-02-22 01:01 in Computers, Linux
    So far I had been using the Lenovo T540 which I got because of its 3K 15" screen, but I really hated that generation of thinkpads due to the lack of mouse buttons (hence the bluetack on the pad, used to know where I can click to emulate buttons 1, 2, and 3), and someone who decided it would be great to remove almost all LEDs, including caps lock, and hard drive activity. So when the P70 came out, I was very interested in it, not just because they fixed the LED and mouse button situation, but especially because of the first thinkpad with a 4K screen. The P50 has the same resolution in 15", but I figured if I'm going to have 4K's worth of dots (8 million pixels), I might as well have a 17" screen.

    So let's be honest and say that it is a big a heavy laptop, but that was an acceptable tradeoff for me. CPU wise, it's actually no faster than the T540, but the big new thing is the 2 M2 slots in addition to capacity for 2 2.5" Sata drives, like the T540 (one goes in place of the DVD Burner using a special tray).

    yes, it's big
    yes, it's big

    the 2 M2 slots are on the right, and the 2nd drive goes under where the SSD is visible in this picture
    the 2 M2 slots are on the right, and the 2nd drive goes under where the SSD is visible in this picture

    size of M2 sticks compared to the SSD (with free shot of the 96Wh battery :) )
    size of M2 sticks compared to the SSD (with free shot of the 96Wh battery :) )

    Comparison with the T540
    Comparison with the T540

    So the P70 can currently house 5TB of storage and I was interested to see how well the M2 slots worked compared to the Sata ones under linux. First thing to note is that currently M2 slots can only house 512MB of storage each vs 2TB for the 2.5" Sata slots that have more room. Sadly, Lenovo is still not selling the Drive Caddy Adapter for the P70, but the good news is that you can buy this $17 Soogood 2nd HDD SSD Hard Drive Caddy Adapter Use For Lenovo Thinkpad T440p T540p W540p from Amazon, unscrew the little tab from the DVD Drive, screw it on the drive caddy adapter, and it'll work in the P70.

    To try that out, I got the following (with price by GB as of 2016/02), in increasing price per GB: - 4.6c/GB: Seagate 2TB Laptop HDD SATA 6Gb/s 32MB Cache 2.5-Inch Internal Bare Drive (ST2000LM003) - 30c/GB: SATA6G: Samsung 850 EVO 2 TB 2.5-Inch SATA III Internal SSD (MZ-75E2T0B/AM) - 33c/GB: M2/SATA Samsung 850 EVO 500 GB M.2 3.5-Inch SSD (MZ-N5E500BW) - 64c/GB: M2/NVMe: Samsung 950 PRO -Series 512GB PCIe NVMe - M.2 Internal SSD 2-Inch MZ-V5P512BW

    So it's interesting to note that SSDs still cost 6.5x more than a hard drive (actually I was surprised to see how cheap the 2.5" 2TB hard drive was). Next, it's good to know that M2/Sata SSDs cost about the same price per GB than full size Sata SSDs. And last, at twice the price, the M2/NVMe SSD is no bigger than the SATA M2 version, but clearly more expensive. It's supposed to be up to 4 times faster in bulk transfer rate due to the use of 4 PCI lanes, but I was curious to see how much faster it would actually be for real use with linux.

    First, is looking at support. To make things interesting, I decided to make the NVMe SSD my boot drive. The Thinkpad bios of course supports it fully, but a big gotcha is that it'll only boot if you use a GPT partition with EFI. Setting that up from scratch was a pain, but I got through it, and it's out of topic for this post.


    Next, is linux support. Thankfully linux has supported NVME for a while now. I just set CONFIG_BLK_DEV_NVME=y in my kernel so that I didn't have to worry about the module being in my initrd. Device partitions show up as /dev/nvme0n1p1 and so forth.

    Now, the benchmarks. For my main filesystems, I have btrfs on top of dmcrypt, created with:

    cryptsetup luksFormat --align-payload=8192 -s 256 -c aes-xts-plain64 /dev/device

    In the tests below, I did used hdparm, iozone, and 2 kinds of dd, ddd with data, and dd0 copying just /dev/zero:

    ddd test: sync; dd if=/mnt/ram/file of=file bs=100M count=100 conv=fdatasync; dd if=file of=/dev/null bs=100M
    dd0 test: sync; dd if=/dev/zero of=file bs=100M count=100 conv=fdatasync; dd if=file of=/dev/null bs=1M

    Let me start with the summary conclusions first, since this is what most people probably care about:

  • NVMe is faster for big contiguous I/O, even through dmcrypt, that's good.
  • M2 NVMe and M2 sata do not seem to go through buffer cache for writes, but SATA/6GB does
  • When using buffer cache, SATA/6GB beats NVMe/M2 and SATA/M2 by a lot on block reads. Why?
  • For random I/O, NVMe is up to 50% faster, and faster with ext4 than btrfs
  • Encrypted NVMe is a bit faster than non encrypted Sata/M2
  • At $328 for 512GB M2/NVMe vs $168 for 500GB M2/Sata, unless you're doing big contiguous I/O, the 2x price difference is hard to justify, cached I/O and random I/O are not significantly faster on NVMe.
  • More detailled summaries related to the test results below:

  • NVMe only really looks faster on big block sequential read/write (indeed 4X read, 2X write). On Random I/O, it's no faster. Other overheads seem to kill its performance advantage.
  • 2TB Sata 6GB SSD is faster for read/write encrypted than NVMe is non encrypted (except hdparm). Looks like the block caching layer works better for Sata than NVMe?
  • iozone through block cache is faster on M2/SATA than M2/NVMe, very weird.
  • iozone direct I/O shows NVMe is fastest (by 50% only) and external SATA just a bit faster than M2/Sata. Clearly the block caching layer hides differences for iozone.
  • when using dmcrypt, NVMe is only marginally faster in iozone than Sata/M2 or Sata/6G
  • kernel build speed is same on SATA/M2 and NVMe/M2, encrypted or not, but SATA6G is 10% faster (probably the same effect that block cache works better on SATA/6G than SATA/M2 or NVMe/M2)
  • Thankfully on big sequential IO (ddd test), NVMe finally shows being 4x faster on read, and 2.5x faster on write.
  • ext4 does better on iozone -I (directIO) than btrfs, 2x as fast on random read for NVMe
  • So there you go. I realize that my test suite may not have been perfect, but hopefully the results are helpful to others. I'm hoping linux will get fixed, or that I can find a tunin g parameter to bridge the gab in cached IO speed between Sata 6G 2.5" and M2 slots. Below are test results in more details are you go down the page.

    Here are test results for cached IO:

    		SATA/M2 dmcrypt	 SATA/M2	NVMe dmcrypt	NVMe		SATA6GB/dmcrypt
    hdparm -t	 534MB/s	 517MB/s	1307MB/s	2140MB/s	 534MB/s
    

    ddd 10GB read 550MB/s 560MB/s 2000MB/s 2400MB/s 550MB/s ddd 10GB write 500MB/s 503MB/s 1300MB/s 1200MB/s 506MB/s

    dd with /dev/zero hits optimizations that actually penalize NVMe: dd0 10GB read 7GB/s 6.7GB/s 2.3GB/s 4.4GB/s 6.6GB/s dd0 10GB write 495MB/s 503MB/s 1.3GB/s 1.3GB/s 2.0GB/s

    iozone -e -a -s 4096 -i 0 -i 1 -i 2 (cache makes Sata6G faster than M2, weird): ioz read 4KB 1760MB/s 1790MB/s 675MB/s 766MB/s 7863MB/s ioz write 4KB 268MB/s 298MB/s 295MB/s 291MB/s 777MB/s ioz ranread4KB 5535MB/s 7392MB/s 3185MB/s 7261MB/s 7892MB/s ioz ranwrite4KB 288MB/s 329MB/s 205MB/s 381MB/s 796MB/s

    For comparison, I then used directio to bypass the caching layer:

    iozone -I -e -a -s 4096 -i 0 -i 1 -i 2 (direct IO):
    		SATA/M2 dmcrypt	 SATA/M2	 NVMe dmcrypt	 NVMe		 SATA6GB
    										 dmcrypt notcrypted
    		 btrfs		 btrfs   ext4	 btrfs		 btrfs   ext4	 btrfs     ext4
    ioz read 4KB	 255MB/s	 303MB/s 408MB/s 303MB/s	 396MB/s 562MB/s 310MB/s 379MB/s
    ioz write 4KB	 195MB/s	 238MB/s 344MB/s 257MB/s	 358MB/s 361MB/s 233MB/s 365MB/s
    ioz ranread4KB	 305MB/s	 351MB/s 482MB/s 476MB/s	 699MB/s1434MB/s 309MB/s 475MB/s
    ioz ranwrite4KB	 265MB/s	 223MB/s 392MB/s 260MB/s	 217MB/s 315MB/s 254MB/s 366MB/s

    Details of each test, per type of drive;

    ===============================================================================
    saruman M2 SATA 512GB encrypted btrfs
    

    saruman:/tmp# hdparm -t /dev/mapper/cryptroot Timing buffered disk reads: 1604 MB in 3.00 seconds = 534.03 MB/sec

    iozone -e -a -s 4096 -i 0 -i 1 -i 2: random random kB reclen write rewrite read reread read write 4096 4 257076 281089 1761711 6094733 6066754 290373 4096 512 277108 295167 1588844 8426437 11128258 318731 4096 4096 268940 308248 1760087 8062616 8377131 320802

    iozone -I -e -a -s 4096 -i 0 -i 1 -i 2: 4096 4 38626 45227 102236 111141 30936 64317 4096 512 138467 128878 134674 137832 140067 126248 4096 4096 195439 273100 255379 307300 305605 265093

    saruman:/mnt/mnt# sync; dd if=/dev/zero of=file bs=100M count=100 conv=fdatasync; dd if=file of=/dev/null bs=1M 10485760000 bytes (10 GB) copied, 21.1761 s, 495 MB/s 10485760000 bytes (10 GB) copied, 1.49373 s, 7.0 GB/s

    kernel 4.4.1 make -j8: real 17m54.712s user 126m26.620s sys 6m21.948s

    btrfs send/receive encrypted partition to non encrypted, 87GB: 10mn30

    saruman M2 SATA non encrypted btrfs ----------------------------------- saruman:/mnt/mnt4# hdparm -t /dev/sdc4 /dev/sdc4: Timing buffered disk reads: 1554 MB in 3.00 seconds = 517.93 MB/sec

    iozone -e -a -s 4096 -i 0 -i 1 -i 2: random random kB reclen write rewrite read reread read write 4096 4 285020 297565 1739944 7434579 6605595 305785 4096 512 310937 336617 1298278 3703511 5483860 299416 4096 4096 298433 317101 1790911 7392988 7434579 337476 iozone -I -e -a -s 4096 -i 0 -i 1 -i 2: 4096 4 47219 93497 118900 126065 39160 86462 4096 512 214381 213388 194307 209215 206951 209289 4096 4096 238792 221839 303768 352951 351342 223618 ext4 iozone -I -e -a -s 4096 -i 0 -i 1 -i 2: 4096 4 119524 146035 150173 159105 53090 140697 4096 512 358954 354810 366466 423088 419760 375542 4096 4096 344087 398828 408259 478337 482569 392487

    saruman:/mnt/mnt3# sync; dd if=/dev/zero of=file bs=100M count=100 conv=fdatasync; dd if=file of=/dev/null bs=1M 10485760000 bytes (10 GB) copied, 20.8537 s, 503 MB/s 10485760000 bytes (10 GB) copied, 1.55651 s, 6.7 GB/s

    kernel 4.4.1 make -j8: real 17m55.612s user 126m31.952s sys 6m27.452s

    ******************************************************************************** saruman M2 NVMe 512GB encrypted btrfs

    saruman:/tmp# hdparm -t /dev/mapper/cryptroot2 /dev/mapper/cryptroot2: Timing buffered disk reads: 3924 MB in 3.00 seconds = 1307.56 MB/sec

    iozone -e -a -s 4096 -i 0 -i 1 -i 2: random random kB reclen write rewrite read reread read write 4096 4 284205 341651 742181 6195843 6178018 341101 4096 512 314351 319573 864883 8865630 8902382 384993 4096 4096 295741 201042 675234 3281854 3185110 205974 iozone -I -e -a -s 4096 -i 0 -i 1 -i 2: 4096 4 80042 83160 122616 127129 41421 53963 4096 512 168713 153333 167710 209923 198123 168026 4096 4096 257968 258566 303023 490828 476440 260014

    saruman:/mnt/mnt2# sync; dd if=/dev/zero of=file bs=100M count=100 conv=fdatasync; dd if=file of=/dev/null bs=1M 10485760000 bytes (10 GB) copied, 8.01494 s, 1.3 GB/s 10485760000 bytes (10 GB) copied, 4.63397 s, 2.3 GB/s

    kernel 4.4.1 make -j8: real 17m57.513s user 126m58.360s sys 6m25.164s

    btrfs send/receive encrypted partition to non encrypted, 87GB: 7mn (33% faster than Sata M2)

    saruman M2 NVMe non encrypted btrfs ----------------------------------- saruman:/mnt/mnt4# hdparm -t /dev/nvme0n1p4 /dev/nvme0n1p4: Timing buffered disk reads: 6422 MB in 3.00 seconds = 2140.38 MB/sec

    iozone -e -a -s 4096 -i 0 -i 1 -i 2: random random kB reclen write rewrite read reread read write 4096 4 274808 271851 684271 2634219 2280673 177630 4096 512 290191 336755 668196 3362795 4039655 184779 4096 4096 291427 340345 766588 7355007 7261741 381768 iozone -I -e -a -s 4096 -i 0 -i 1 -i 2: 4096 4 94814 117116 147645 159695 44075 108039 4096 512 271130 267800 239969 325933 301841 271062 4096 4096 358602 275933 396591 719099 699939 217665 ext4 iozone -I -e -a -s 4096 -i 0 -i 1 -i 2: 4096 4 107281 200735 205900 263035 54832 124219 4096 512 537478 374641 525060 1173664 1139338 558807 4096 4096 361545 526137 562632 1483477 1434069 315883

    saruman:/mnt/mnt4# sync; dd if=/dev/zero of=file bs=100M count=100 conv=fdatasync; dd if=file of=/dev/null bs=1M 10485760000 bytes (10 GB) copied, 7.90653 s, 1.3 GB/s 10485760000 bytes (10 GB) copied, 2.35863 s, 4.4 GB/s

    kernel 4.4.1 make -j8: real 17m54.221s user 126m46.264s sys 6m10.592s

    ******************************************************************************** saruman Samsung Evo 850 2TB SSD encrypted btrfs

    hdparm -t Timing buffered disk reads: 1606 MB in 3.00 seconds = 534.87 MB/sec

    iozone -e -a -s 4096 -i 0 -i 1 -i 2: random random kB reclen write rewrite read reread read write 4096 4 513924 738957 8586475 9144037 8017464 697665 4096 512 772100 820362 9287391 10136778 10586522 840551 4096 4096 719099 777517 7863339 8047509 7892238 796108

    iozone -I -e -a -s 4096 -i 0 -i 1 -i 2 4096 4 76626 47961 92886 80947 36063 63788 4096 512 135087 138998 143127 150981 144393 132219 4096 4096 233245 234058 310797 311552 309855 254080

    ext4 iozone -I -e -a -s 4096 -i 0 -i 1 -i 2 (unencrypted) 4096 4 118013 141212 130575 111534 42343 138654 4096 512 336347 312192 332847 414404 424542 342707 4096 4096 365227 364638 379298 484160 475122 366536

    saruman:/tmp# sync; dd if=/dev/zero of=file bs=100M count=100 conv=fdatasync; dd if=file of=/dev/null bs=1M 10485760000 bytes (10 GB) copied, 5.23919 s, 2.0 GB/s 10485760000 bytes (10 GB) copied, 1.58287 s, 6.6 GB/s

    kernel 4.4.1 make -j8: real 16m4.305s user 104m0.816s sys 7m2.832s


    More pages: June 2024 April 2024 December 2023 August 2021 May 2020 February 2016 July 2014 December 2013 November 2013 January 2013 August 2011 July 2011 August 2010 June 2010 May 2010 March 2010 February 2010 December 2009 November 2009 March 2009 July 2002 October 2001

    Contact Email