[x86-64] Hgole2 pro

  • Hello! I have installed your system on the Hgole2 Pro mini-computer. How can I install the drivers for the accelerometer and GoodixTouchDriver?
    And is it possible for the driver to support this device?
    Sincerely, Roman.

  • Drivers need to be included at image creation/compile time. You cannot install or add them afterwards. If you can tell us the specific kernel modules that need to be enabled, we can add them to future images.

  • Thank you for your reply!!!

  • Module Size Used by

  • IAutomatic rotation would require something like a windowing environment to be rotation-aware, but being minimalist LE does not run Kodi under a windowing environment. The same is probably true for the touch driver.

    I think you would be better off running Kodi under a conventional distro.

  • I've tried installing Windows and Ubuntu, but everything keeps crashing. In Windows 11, the video playback is very poor. It's very inconvenient. In Ubuntu, it's impossible to mirror the screen. So, is it possible to make the touchscreen and accelerometer work in Libreelec-Kodi?

  • Nothing is impossible, but we don't normally support hardware with those features; they aren't needed on HTPC devices connected to a TV that don't move. So we have no idea what's required, you don't either, and Google searching on "HiGole 2 Pro" mostly finds complaints about being unable to find drivers, no support from the vendor, and it being rubbish hardware that dissapointed and then died. If the screen is mirrored then you definitely need a windowing environment like Wayland or Xorg. Our legacy image has Xorg but you'd need to configure it to use various drivers and how that's done is not documented.

    Sorry, but we are quite focussed on HTPC hardware and are not a general purpose OS.

  • Thank you for your reply!!! The problem is clear! We have Rockchip RK3399 devices, but they don't have a touch Screen. Which complicates the work process. It is necessary to connect a remote control or a mouse. So we're trying to find a Linux program. But your development is the best fit for us. If your colleagues can help us, we will be very grateful!!!


    The Hgole 2 pro device is the only one we've found with a touch screen so far.And of course we don't need an accelerometer.


    Is it not possible to install a Kodi zip file with an accelerometer and touchscreen driver separately?

    Edited 2 times, last by Roomen: Merged a post created by Roomen into this post. (September 3, 2025 at 8:21 AM).

  • Grok4 went and got itself some extra neurons, so here’s its hot takes. Might not be complete trash, who knows? :D

    Grok4:

    From the system details you provided (which appear to be from a Ubuntu-like distro, not LibreELEC, based on the kernel version and module list), the hardware is detected:

    • Touchscreen: Goodix capacitive over I2C (driver: goodix_ts.ko).
    • Accelerometer: MXC4005 (driver: mxc4005.ko).
    • Both modules are loaded in your current setup, but if they're not functioning (e.g., no input events), it could be due to missing firmware, I2C bus probing issues, or calibration.

    LibreELEC's filesystem is read-only (squashfs), so you can't simply "install" drivers like in a full distro. Instead, you'll need to build a custom LibreELEC image with the drivers enabled in the kernel. This is straightforward if you follow the steps below. I'll assume you're starting from a clean LibreELEC install on your device (download the Generic-x86_64 image from libreelec.tv/downloads and boot/install via USB). If you're currently on Ubuntu, switch to LibreELEC first for testing.

    Step 1: Verify Hardware Detection in Stock LibreELEC
    Before building custom, test if the drivers are partially working in a standard LibreELEC install:

    1. Install LibreELEC 12.x (or latest nightly) Generic x86_64 on a USB drive or your internal storage (eMMC via /dev/mmcblk0).
    1. Boot into LibreELEC and enable SSH (Settings > LibreELEC > Services > SSH).
    1. SSH in (default user: root, password: libreelec).
    1. Check for devices:
    • Code
      lsmod | grep goodix

      (for touchscreen).

    • Code
      lsmod | grep mxc4005

      (for accelerometer).

    • Code
      dmesg | grep -i goodix

      and

      Code
      dmesg | grep -i mxc4005

      for load errors.

    • Code
      evtest

      to list input devices and test touch/accel events (if evtest isn't available, it's because these modules aren't in the stock image).

    • Code
      i2cdetect -l

      to list I2C buses; then

      Code
      i2cdetect -y <bus_number>

      (try buses 0-3 based on your serial controllers) to see if the Goodix (usually at address 0x5d) or MXC4005 (address 0x15) shows up.

    If the modules aren't present (likely), proceed to custom build.

    Step 2: Build Custom LibreELEC with Drivers Enabled
    You'll need a Linux build host (e.g., Ubuntu 22.04+ VM with at least 4 cores, 8GB RAM, 50GB free space). This enables the drivers as kernel modules.

    1. Set Up Build Environment:
    • Install dependencies:
      Code
      sudo apt update && sudo apt install git gcc g++ make ncurses-dev bc lzop libssl-dev flex bison qemu-utils java-runtime-headless dosfstools

      .

    • Clone LibreELEC repo:
      Code
      git clone https://github.com/LibreELEC/LibreELEC.tv.git

      .

    • Checkout the branch for your version (e.g.,
      Code
      cd LibreELEC.tv && git checkout 12.0

      for stable, or master for nightly).

    1. Enable the Drivers in Kernel Config:
    • The kernel config is in
      Code
      packages/linux/linux.conf

      (for Generic x86_64).

    • Edit
      Code
      packages/linux/package.mk

      to add a patch for config changes.

    • Create a patch file
      Code
      packages/linux/patches/linux-0001-enable-goodix-mxc4005.patch

      with contents:

    • Replace
      Code
      XXXX

      with actual line numbers—extract the default config first by running a partial build (see below) and checking

      Code
      build.LibreELEC-Generic.x86_64-*/linux-*/.config

      .

    1. Build the Image:
    • Run:
      Code
      PROJECT=Generic ARCH=x86_64 make image

      .

    • This takes 1-2 hours. Output is in
      Code
      target/

      (e.g., LibreELEC-Generic.x86_64-12.0.0.img.gz).

    • Write the .img to USB:
      Code
      dd if=LibreELEC-Generic.x86_64-12.0.0.img of=/dev/sdX bs=4M conv=fsync

      (replace /dev/sdX with your USB device).

    1. Install and Test:
    • Boot the custom image on your GOLE2 Pro.
    • SSH in and load modules if not auto-loaded:
      Code
      modprobe goodix_ts

      and

      Code
      modprobe mxc4005

      .

    • Check
      Code
      dmesg

      for errors. If Goodix fails with firmware issues, it may need a binary firmware blob—copy from your Ubuntu setup (

      Code
      /lib/firmware/goodix_*.bin

      ) to

      Code
      /storage/.config/firmware/

      in LibreELEC and reboot (per LibreELEC wiki).

    • Test touch:
      Code
      evtest /dev/input/eventX

      (find the Goodix event).

    • Test accel:
      Code
      evtest /dev/input/eventY

      or

      Code
      cat /sys/bus/iio/devices/iio:device0/in_accel_x_raw

      (adjust device number).

    Step 3: Enable Touch in Kodi

    • Kodi supports touch natively, but ensure:
    • Settings > Interface > Skin > Configure skin > Enable touchscreen mode.
    • If calibration is off, use
      Code
      ts_calibrate

      (if available) or edit

      Code
      /storage/.kodi/userdata/guisettings.xml

      for touch params.

    • For multi-touch gestures, it should work once the driver is loaded.

    Step 4: Enable Auto-Rotation (Flip)

    • Accelerometer provides orientation data via IIO.
    • LibreELEC/Kodi doesn't auto-rotate by default (no desktop manager like GNOME).
    • Install the "Screen Orientation" addon from Kodi repo (if available) or script it:
    1. SSH in, install Python if needed (via unofficial addons or custom build).
    1. Create a script
      Code
      /storage/.kodi/userdata/autoexec.py

      :

    • This monitors accel and flips Kodi's GUI. Test thresholds with
      Code
      cat /sys/bus/iio/devices/iio:device*/in_accel_*_raw

      .

    • For GBM rotation, if needed: Edit
      Code
      /flash/extlinux.conf

      to add

      Code
      video=DSI-1:panel_orientation=upsidedown

      or similar, but test.

    Troubleshooting

    • If I2C not probing: Add kernel params in
      Code
      /flash/extlinux.conf

      (append line:

      Code
      i2c_dev i2c_hid.polling=1

      ).

    • Build errors: Check logs in
      Code
      build.LibreELEC-*/

      . If kernel patch fails, manually edit the config during build (pause at menuconfig:

      Code
      PROJECT=Generic ARCH=x86_64 ./scripts/build linux:menuconfig

      ).

    • If modules load but no events: Check ACPI tables (
      Code
      acpidump

      ) for HID overrides; might need a DSDT patch (advanced).

    • Performance: N5095 has UHD Graphics; enable VAAPI in Kodi for hardware decoding (Settings > Player > Video > Allow hardware acceleration - VAAPI).
    • Community: Post your build logs on the LibreELEC forum (your recent thread there is a good start) for x86-specific help.

    If this doesn't resolve it, provide dmesg output from LibreELEC.

  • If your colleagues can help us, we will be very grateful!!!

    I have friends in the project, but no colleagues; because we are not a company, there is no product, and we do not undertake commerical development or support work. Good luck with the AI suggestions!!!