Running Linux on HP Spectre x360

Computer reviews aren’t my thing, but for this one I had to make an exception. My 3.5 year old laptop, the HP Spectre x360 I had scored as swag at the 2015 Microsoft Build conference, suddenly died a few months ago. I had taken a liking to that thing, so when I had to leave for a conference in early November, and realized I should probably bring a laptop with me, I decided to replace it with the current version of the same model. Fortunately they had one in stock at my neighborhood Best Buy (alas, only the silver one and not the pretty black and gold one), so I was able to pick it right up.

I then had the bad idea to search online for Linux support on the x360 after already having bought it, and was dismayed by what I found. A lot of people reported poor performance, too-hot-to-handle operating temperatures, and very poor battery life. Not having much of a choice at that point, I decided to go ahead anyways and install Fedora 28 on it, the then-current release of my go-to Linux distribution. Long story short: installation was a breeze, everything worked out-of-the-box, performance is great, the laptop runs barely warm, and battery life is awesome (so awesome, in fact, that I initially thought the readings were wrong). In order to provide a counter-narrative to those other reports, this is my experience of installing and running Linux on a 2018 HP Spectre x360.

Before the detailed list of things I did, here’s the exact laptop model I bought:

  • Intel Core i7-8550U CPU at 1.8GHz (up to 4.0GHz in turbo mode), 8MB L3 cache, Intel UHD Graphics 620
  • 8GB RAM
  • 256GB SSD
  • 13.3″ 1920×1080 touchscreen display with active stylus

Linux Installation

My first step was to download Fedora 28 workstation 64-bit with MATE desktop (I had Gnome on my previous laptop, and never fully warmed up to it) and burn it onto a 2GB USB stick. I then powered on the laptop and went straight to the BIOS setup screen by madly mashing the F10 key (the laptop came with Windows 10 pre-installed, and I didn’t want to get into that). Once in the BIOS, I checked that “Legacy Boot” was disabled (most Linux instructions recommend enabling it) and “Secure Boot” was enabled. I also set the “System Power Scheme” to “balanced,” as I was still expecting heat/battery issues at that point. I left all other settings at their defaults.

Next, I booted from my prepared USB stick into a live Fedora desktop, without problems, and clicked on “Install to Hard Disk.” I clicked through to the main installation panel, created an administrator user account for myself, and selected “custom partitioning” on the built-in SSD with the following layout:

  • 300MB for /boot
  • 260MB for /boot/efi
  • 30GB for /
  • 8GB for swap
  • 40GB for /home
  • >160GB (whatever was left) for /work

The rest of the installation took less than 10 minutes, and then it was time to reboot. Booting into the new OS took only a few seconds, and I was up and running. Unlike my previous Spectre, this one did not require any kernel options or special treatment. Touchpad — working. Brightness controls — working. Keyboard backlight — working. Audio and audio control buttons — working. Microphone — working. Speakers — working. Headphones — working. Headset microphone — working. Wi-Fi — working, both in 2.4GHz and 5GHz. Bluetooth — working, including LE mode. Side volume buttons — working. Fingerprint reader — don’t know, don’t care. SD card slot — haven’t tried yet. Camera — working. Touchscreen — working. Active stylus (came in the box) — working. External video connector — working. Suspend and resume — working.

Fine-Tuning

While the touchpad was working immediately after installation, I didn’t like its default settings. Fortunately, MATE’s “Mouse Preferences” control panel offers all the options I needed on the “Touchpad” pad, with one caveat. I disabled “Disable touchpad while typing” because Vrui can use keyboard keys as additional mouse buttons; I enabled “Enable mouse clicks with touchpad;” I set “Two-finger click emulation” to “Right button” and “Three-finger click emulation” to “Middle button;” finally I enabled “Vertical two-finger scrolling” and disabled “Natural scrolling” because I prefer it that way. The control panel displays a warning under the finger-click emulation settings: “Warning: multi-finger emulation may disable software buttons.” And indeed it does: clicking the touchpad would now always generate left-clicks, no matter where the touchpad was pressed. To re-enable that useful feature, I had to run the following in a terminal:

xinput --set-prop "SynPS/2 Synaptics TouchPad" 307 1 0

This made both methods work at once: multi-finger taps and software buttons, so why the control panel disabled the latter is a mystery to me. To make this adjustment permanent, I put the above command into a script and added that script to the session start-up programs.

Battery Life

The laptop wasn’t running hot during those first steps, but I installed powertop nonetheless, and switched all available tunables from “bad” to “good.” On my previous Spectre, I had to leave some tunables at “bad” to avoid stability issues, but I haven’t run into any problems on this one yet, after more than a month of intensive use. The results are very impressive, as shown in Figure 1: For typical use, power drain hovers around 4W, which, combined with the battery’s large 61.4Wh design capacity, predicts more than 15 hours of use time. I haven’t run that long a session yet, but had many days where I was using the laptop for 8 hours straight, and still had almost 50% battery left at the end. When the laptop is in screen saver mode, with the display turned off, it idles at around 2W. In suspend mode, it feels like it is using no power at all. Streaming a movie via Netflix brings it up to about 8W, and I was in fact able to watch six straight hours of Netflix yesterday (being sick as a dog in a hotel room in Washington, DC) without draining the battery, and running only comfortably warm.

Figure 1: Discharge rate of HP Spectre x360 during typical use.

Performance

Even with the “balanced” system power scheme, the laptop is rather sporty. It completed my personal CPU performance benchmark, building the Vrui VR toolkit from scratch, in 1:15 minutes using 8 threads. That’s only about twice as long as my top-of-the-line main desktop PC.

Graphics performance is another story. I didn’t expect this to be a graphics workstation, given that it does not have a discrete graphics card, but nonetheless, it runs most Vrui applications surprisingly well. It should even be able to run some less-complex applications in full VR mode on a connected HTC Vive — at least my previous Spectre x360 could do it — but for some reason, this one has noticeable latency that I reckon must be due to some changes, or changed default settings, in the Intel graphics driver. I haven’t been able to look into this in detail yet, as it’s not really an intended use case.

Touchscreen and Stylus

One of the main — and unexpected — reasons I ended up liking the Spectre x360 line is its touchscreen with active stylus. The Spectre x360 is advertised as a “2-in-1” laptop that turns into a sort-of tablet when its screen is rotated by 360° and locked to the back of its keyboard. I initially didn’t think I would be using that feature, or the touchscreen itself, but I fell in love with it for one reason: the ability to sketch or write or do math on an infinite slate, and being able to do algebra by directly copying and pasting or moving sub-expressions around. My previous Spectre didn’t come with a stylus in the box, but I found a compatible third-party one, and while it worked, it wasn’t exactly great. The new stylus, on the other hand, is great. I don’t know whether HP increased the touchscreen’s resolution, or upped the reporting rate, or HP’s original stylus is just better than the one I had previously, but drawings and hand-written text and formulas look a lot smoother now than they used to, and there is noticeably less lag even without using fancy smoothing and motion prediction.

Bottom Line

I don’t know what exactly changed between the reports I read and my own experience, but installing Fedora 28 Linux (64-bit, with MATE desktop) on the 13.3″ HP Spectre x360, in non-legacy secure mode, worked without any special consideration or any hitch, and it is now running like a charm, with good performance and at least 12 hours of battery life under normal use. A+, would buy again. Now let’s hope that it survives longer than its predecessor.

4 thoughts on “Running Linux on HP Spectre x360

  1. Thanks for sharing this. I’m toying with buying the 2019 version of x360 spectre and is reassuring to see someone use my preferred OS on (a very similar) one.

  2. Thank you for the review. I got x360 2018 model which looks great but I have major issue with the sleep mode. I have only S2 mode and not S3 mode.
    $ cat /sys/power/mem_sleep
    [s2idle]

    I see that in Fedora 30 and Kubuntu 19.04

    What mem_sleep in your laptop shows?

    • I’m getting

      s2idle [deep]

      which is suspend-to-ram, and the equivalent to Windows system sleep state S3. I;m not sure if this is the deepest the hardware can go, but when I close the lid, the laptop can stay in that state for at least a week without draining the battery, and wake-up is instantaneous.

      Currently running Fedora 28 with kernel 5.0.7-100.fc28.x86_64.

Leave a Reply

Your email address will not be published. Required fields are marked *