Skip to content

Instantly share code, notes, and snippets.

@baatochan
Last active January 29, 2024 17:10
Show Gist options
  • Save baatochan/a1b0b2537fd30026c31df1b2720d0933 to your computer and use it in GitHub Desktop.
Save baatochan/a1b0b2537fd30026c31df1b2720d0933 to your computer and use it in GitHub Desktop.
Linux (Manjaro [Arch]) on an HP Elite x2 1012 G2 with Intel i5

Linux (Manjaro [Arch]) on an HP Elite x2 1012 G2 with Intel i5

This are my notes from the installation of Manjaro Linux on an HP Elite x2 1012 G2 with Intel Core i5-7200U. This was meant to be a fast installation for basic internet things so more advanced stuff like docking station or virtualization are not covered. However this installation differs a little from my other ones as I installed Windows on this device as well and this is convertible Tablet PC so I was playing around with touch a little.

Detailed specs

  • Host: HP Elite x2 1012 G2
  • Resolution: 2736x1824 (best used with 150% scaling as this is only 12" screen)
  • CPU: 7th gen Intel Core i5-7200U
  • GPU: Intel HD Graphics 620
  • Memory: 8 GB (soldered)
  • SSD: 1 TB (Lexar NM620)
  • Network: Intel Wireless 8265 / 8275

Installation

I've chosen Manjaro because it became my go-to Linux distro. I like it for having a very good support, access to AUR and the fact it is rolling-release. Technically I haven't installed Manajro on this PC as I did a mistake during my Folio G1 setup and here I have an original drive from that device so technically Linux was installed on Folio and later the SSD was moved to this laptop. This can have some issue in the future, but for now I don't really care as I wanted to have this Linux setup relatively quick. Manjaro was installed using the default config and partitioning.

Windows and GRUB restoration

Because of this whole mess with drives at the beginning the Linux was installed before Windows which isn't a recommended way and I had to restore GRUB and UEFI entry for Linux. At fist I tried using Rescatux, but I failed and ended up using the manual tutorial from Manjaro wiki and this gist I have found. The most important thing was using manjaro-chroot and grub-install.

The dual-boot Windows-Linux installation means that there is another known issue - wrong time after changing the OS. It's so known that you probably know about that, but if not then it's all about the fact that Linux expects the hw/BIOS time to be UTC, while Windows expects it to be the local time - in my case it's an 1h offset. To fix that you may force Windows to use BIOS time as UTC or force Linux to expect it to be the local one. And as you might've probably guessed Windows is Windows and it doesn't really wanna change (you may force it by some registry hacking) so it's a lot easier to just tell Linux to use the hw time as the local one. You may do it with the following command.

timedatectl set-local-rtc 1

Problems and fixes

Screen scaling

As I mentioned above, this notebook is best used with the screen scaling set to 150% (2736x1824 -> 1824x1216). Setting it up for your user is very straightforward as you do it in the same place where you set the screen resolution (Display configuration). However changing it in that place doesn't change it for the whole PC but only for your user. It may not be a big issue when you're the only user, but there is one place where this setting doesn't apply even when you're the only user - SDDM or login screen. And to fix that I found that you may export your local KDE Plasma settings into the SDDM ones by entering the SDDM Settings (Settings -> Startup and Shutdown -> Login Screen (SDDM)) and using the Apply Plasma Settings.

After changing the scaling it might be a good idea to change panel (taskbar) size (44 -> 66px) and cursor size (24 -> 36px). The panel size can be change after entering the panel edit mode (RMB on the panel) and the cursor size can be change in Settings -> Appearance -> Global Theme -> Cursors. After changing the cursor size it is also required to apply plasma settings into SDDM if you want to have the same cursor size on your login screen as well.

Swap file and hibernation

As this is the same installation as on Folio G1 I had to manually set up swap file and hibernation which I did following this nice tutorial on Arch Wiki.

Black screen after waking up from sleep

This is the weird on as I couldn't find almost any info about this issue for my GPU/laptop. Turns out the fix for that was using the i915.enable_psr=0 kernel param. However that might be some issue related to the fact this OS had been installed using Folio G1 where this param was also required (for screen tearing). That might be somehow useful for someone but it also might be unrelated for normal installation.

Touch control and pen

Well to be fair KDE Plasma isn't the best DE for touch input, but I kinda make it work using this tutorial.

The first thing is to enable the KDE touch mode which makes certain UI elements bigger and easier to press. It might be activated in Settings -> Workspace Behavior -> General Behavior -> Touch Mode.

The second thing was to activate touch gestures - mostly double tap for right click. It might be done using touchegg app (and touche which is a GUI for touchegg). After installation of both apps don't forget to enable and start touchegg.service as I spend more time that I wish to admit to troubleshoot this. Google Chrome does have its own touch support so it's a good idea to turn off touchegg for Chrome.

The last part is getting some on-screen keyboard and I went with onboard. At first this app looked like shit, but it does have a lot of config options so I could make it look nice. I went with full keyboard layout, Droid theme, always on top window and 50% of window transparency with 40% od background transparency. It's also a great idea to pin it to the taskbar.

I don't know if this tablet support auto screen rotation and I didn't try to do anything with it.

For stylus I tried installing xf86-input-wacom drivers and kcm-wacomtablet for GUI settings, but I haven't seen any improvement in pen work - it had been working since the beginning and any config in the new menu in System Settings looked like doesn't have any impact on the device (especially trying to remap the stylus buttons). It did however broke the support for touch screen usage so I removed these packages and the stylus still works (pressure checked in GIMP with Pressure Opacity and Presure Size Dynamics modes).

Brightness control and mic mute keys doesn't work

I have also experienced an issue that is common when you dual boot HP laptop - after installation of Windows (HP Hotkey support driver to be precise) brightness control and mute mic keys stopped working. It's worth noting here that the brightness control works, only the keys on the keyboard are not working.

Some claims that it can be temporarily fixed via BIOS reinstall, but anytime you boot up Windows the issue is back. However I was unsuccessful in doing that as the issue persists after BIOS reinstallation (maybe changing the BIOS version would help, but I have the newest one installed and I can't download the older ones). This post linked above claims that the solution to that is to delete HP Hotkey support driver and reinstall BIOS, but it didn't help me. However removing the Windows driver broke support for these buttons on Windows :/.

The issue itself comes from the fact that both brightness control keys (Fn+F3 and Fn+F4) and the mic mute key (Fn+F8) are recognized as KEY_FN_ESC (checked using sudo libinput debug-events --show-keycodes).

-event4   KEYBOARD_KEY            +0.000s       KEY_FN_ESC (465) pressed
 event4   KEYBOARD_KEY            +0.007s       KEY_FN_ESC (465) released

Conclusion

I didn't think it'd take me so long to have this laptop kinda set up, but I believe I have it working and everything works OK-ish. I'm sad I couldn't remap the pen buttons and that I couldn't make the brightness control work but I guess it's done. The laptop itself is OK, a little bit to heavy and the fact that you have everything in the display makes it unusable in its laptop form when not placed on some kind of desk. It's a great device if you want a tablet, but it's not that good when it comes to being a laptop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment