Grok4 went and got itself some extra neurons, so here’s its hot takes. Might not be complete trash, who knows?
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:
- Install LibreELEC 12.x (or latest nightly) Generic x86_64 on a USB drive or your internal storage (eMMC via /dev/mmcblk0).
- Boot into LibreELEC and enable SSH (Settings > LibreELEC > Services > SSH).
- SSH in (default user: root, password: libreelec).
- Check for devices:
-
(for touchscreen).
-
(for accelerometer).
-
and
for load errors.
-
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).
-
to list I2C buses; then
(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.
- 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:
.
- Checkout the branch for your version (e.g.,
for stable, or master for nightly).
- Enable the Drivers in Kernel Config:
- The kernel config is in
(for Generic x86_64).
- Edit
to add a patch for config changes.
- Create a patch file
with contents:
--- a/.config
+++ b/.config
@@ -XXXX +XXXX @@ # Find the IIO/INPUT sections via `grep` in the config
# CONFIG_TOUCHSCREEN_GOODIX is not set
+CONFIG_TOUCHSCREEN_GOODIX=m
# CONFIG_MXC4005 is not set
+CONFIG_MXC4005=m
# Ensure dependencies:
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_IIO=y
+CONFIG_IIO_BUFFER=y
+CONFIG_IIO_TRIGGER=y
+CONFIG_I2C_HID=y # For Goodix HID mode if needed
Display More
- Replace
with actual line numbers—extract the default config first by running a partial build (see below) and checking
.
- Build the Image:
- Run:
.
- This takes 1-2 hours. Output is in
(e.g., LibreELEC-Generic.x86_64-12.0.0.img.gz).
- Write the .img to USB:
(replace /dev/sdX with your USB device).
- Install and Test:
- Boot the custom image on your GOLE2 Pro.
- SSH in and load modules if not auto-loaded:
and
.
- Check
for errors. If Goodix fails with firmware issues, it may need a binary firmware blob—copy from your Ubuntu setup (
) to
in LibreELEC and reboot (per LibreELEC wiki).
- Test touch:
(find the Goodix event).
- Test accel:
or
(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
(if available) or edit
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:
- SSH in, install Python if needed (via unofficial addons or custom build).
- Create a script
:
import xbmc
import subprocess
import time
while True:
try:
with open('/sys/bus/iio/devices/iio:device0/in_accel_z_raw', 'r') as f: # Adjust path/device
z = int(f.read())
if z > 500: # Threshold for upright/flipped; calibrate based on your tests
subprocess.call(['kodi-send', '--action="SetGUIOrientation(0)"']) # 0=normal, 2=180 deg flip
else:
subprocess.call(['kodi-send', '--action="SetGUIOrientation(2)"'])
except:
pass
time.sleep(1)
Display More
- This monitors accel and flips Kodi's GUI. Test thresholds with
.
- For GBM rotation, if needed: Edit
to add
or similar, but test.
Troubleshooting
- If I2C not probing: Add kernel params in
(append line:
).
- Build errors: Check logs in
. If kernel patch fails, manually edit the config during build (pause at menuconfig:
).
- If modules load but no events: Check ACPI tables (
) 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.