This guide covers the initial setup, configuration, and troubleshooting steps for the ODROID H4+ single-board computer, specifically tailored for stability and the NETSetup process.

Initial Device Setup

Follow these steps in order to prepare a new ODROID H4+ device.

1. Hardware Assembly

  1. RTC Battery: Connect the RTC (Real-Time Clock) battery to the board. This is crucial for maintaining time and BIOS settings.

  2. RAM: Install the SODIMM DDR5 memory module(s) into the slot(s). Ensure they are seated correctly.

  3. Storage: Install the NVMe or SATA drive.

  4. Peripherals: Connect a Monitor (HDMI/DP), Keyboard, and the Power Supply.

  5. BIOS Update Media: Plug in the USB stick containing the newest BIOS update file.

2. BIOS Configuration (Initial)

  1. Power On: Turn on the device.

  2. Enter BIOS: Immediately start pressing Delete or F2 to enter the BIOS setup menu.

  3. Set Clock: Navigate to the Date/Time settings and set the current UTC time.

  4. Chipset → PCH-IO Configuration → State After G3: Set to "S0", to auto boot when power is applied (https://wiki.odroid.com/odroid-h4/application_note/autostart_when_power_applied)

  5. Save & Exit: Save changes and reboot.

3. BIOS Update

  1. Boot to Updater: If using the ODROID UEFI BIOS updater tool, boot from the USB stick prepared in step 1.5.

  2. Perform Update: Follow the on-screen instructions to flash the latest BIOS.

    • Note: Ensure power is stable during this process. Do not unplug the device.

  3. Verification: After the update, enter the BIOS again and verify the BIOS version string matches the new version.

4. Final BIOS Settings

Re-enter the BIOS after the update reboot to finalize settings: 1. Check Clock: Verify the system time is still correct. 2. WOL (Wake-on-LAN): Ensure "Wake on LAN" is Enabled in the network stack configuration. 3. Virtualization: Ensure Intel VMX (Virtualization Technology) and VT-d are Enabled. 4. Boot Order: Set the USB Boot priority if you are about to flash with NETSetup.

ref read WOL.adoc

5. Flash with NETSetup

  1. Insert the NETSetup boot stick.

  2. Boot from the USB.

  3. Follow the standard NETSetup flashing procedure.

Troubleshooting & Stability Diagnosis

If the ODROID H4+ experiences instability (freezes, random reboots, hardware errors), use the following diagnostic steps.

  1. Quick Check: Run sudo dmesg | grep -i "hardware error" to see if the kernel has already logged fatal errors.

  2. Monitor Baseline: Run the Combined Monitoring Loop while the system is idle for 5 minutes.

  3. Light Stress: Run sudo stress-ng --cpu 4 --timeout 300s while monitoring temperatures.

  4. Memory Test: Run memtester or use Memtest86+ (reboot required).

  5. Full Stress: Run the Comprehensive Test Script if the system survives the above.

Warning
Stress tests may trigger crashes if hardware is defective. Save all work before proceeding.

Diagnostic Commands

1. Real-time Hardware Error Monitoring

Watch for hardware level errors like Machine Check Exceptions (MCE).

# Watch for hardware errors in real-time
sudo dmesg -wH --level=err,warn

# Monitor specifically for MCE (Machine Check Exceptions)
sudo dmesg -wH | grep -i "mce\|hardware error\|bert\|ras\|corrected"

# Check MCE logs (if rasdaemon is installed)
sudo ras-mc-ctl --errors
sudo ras-mc-ctl --summary

2. Memory Testing

Faulty RAM is a common cause of instability.

# In-system memory test (no reboot required, but less thorough)
sudo apt install memtester
# Test 8GB, 5 passes (adjust '8G' to match your available free RAM)
sudo memtester 8G 5

# Check for memory-related errors logged by the kernel
sudo dmesg | grep -i "memory\|dimm\|ecc"

# EDAC (Error Detection and Correction) monitoring
sudo modprobe edac_core
sudo edac-util -v

Note: For a definitive test, boot into Memtest86+ from a USB stick or the GRUB menu.

3. CPU Stress Testing & Thermal Monitoring

Ensure the CPU is stable under load and cooling is adequate.

# Install tools
sudo apt install stress-ng lm-sensors htop

# Initialize sensors
sudo sensors-detect --auto

# Terminal 1: Monitor temperatures
watch -n 1 sensors

# Terminal 2: Run Stress Test (10 minutes)
# Tests CPU and Virtual Memory
sudo stress-ng --cpu 4 --vm 2 --vm-bytes 2G --timeout 600s --metrics-brief

4. Combined Monitoring Loop

Paste this block into a terminal to monitor vital stats in one view.

while true; do
  clear
  date
  echo "=== CPU Temp & Freq ==="
  sensors | grep -E "Core|Package|temp"
  grep MHz /proc/cpuinfo | head -4
  echo "=== Memory ==="
  free -h
  echo "=== Load ==="
  uptime
  echo "=== Recent Errors ==="
  sudo dmesg -T | tail -5
  sleep 2
done

5. Advanced & Aggressive Stress Testing

Use with caution.

# CPU thermal stress (heats up CPU quickly)
sudo stress-ng --cpu 4 --cpu-method all --timeout 10m --metrics

# Combined stress (CPU + Memory)
sudo stress-ng --cpu 4 --vm 2 --vm-bytes 4G --matrix 2 --timeout 600s --verify --metrics-brief

# Long-run stability test (1 hour) logging to file
sudo stress-ng --cpu 4 --vm 2 --timeout 3600s --verify --log-file /tmp/stress.log &

6. Comprehensive Test Script

Save this as test_stability.sh and run with sudo bash test_stability.sh.

#!/bin/bash
LOG_DIR="/tmp/stability_test_$(date +%Y%m%d_%H%M%S)"
mkdir -p "$LOG_DIR"

echo "Starting stability test - logs in $LOG_DIR"

# Capture initial state
sudo dmesg > "$LOG_DIR/dmesg_before.log"
sensors > "$LOG_DIR/sensors_before.log"
free -h > "$LOG_DIR/memory_before.log"

# Start monitoring background process
(while true; do
  echo "$(date +%s),$(sensors | grep 'Package id 0' | awk '{print $4}' | tr -d '+°C')"
  sleep 1
done) > "$LOG_DIR/temps.log" &
TEMP_PID=$!

sudo dmesg -wH > "$LOG_DIR/dmesg_live.log" &
DMESG_PID=$!

# Run stress test (10 mins)
echo "Running 10-minute stress test..."
sudo stress-ng --cpu 4 --vm 2 --vm-bytes 4G --timeout 600s --metrics-brief --verify 2>&1 | tee "$LOG_DIR/stress_output.log"

# Stop monitoring
kill $TEMP_PID $DMESG_PID

# Capture final state
sudo dmesg > "$LOG_DIR/dmesg_after.log"
sensors > "$LOG_DIR/sensors_after.log"
free -h > "$LOG_DIR/memory_after.log"

echo "Test complete. Check $LOG_DIR for results"
echo "Potential errors found:"
grep -i "error\|fail\|mce\|hardware" "$LOG_DIR/dmesg_after.log"

Specific Issues & Solutions

Power Supply Stability

The ODROID H4+ requires a stable power source. Instability or reboot loops can often be traced to an inadequate PSU.

  • Official Spec: 15V/4A (60W) or 19V. Probably stable for a bare board but might fail under load with peripherals attached.

  • Recommended: 19V x 7A (133W) provides ample headroom for NVMe drives and USB peripherals.

Diagnosis: If the system shuts down abruptly during the stress-ng test (especially GPU/CPU combined load), check the PSU.

Kernel Boot Parameters for Stability

The Alder Lake-N architecture (N97/N305) used in the ODROID H4+ can have power management issues with older Linux kernels (C-states, ASPM).

If you experience freezes (system hangs, no logs), try adding these parameters to your bootloader (GRUB/systemd-boot):

  1. intel_idle.max_cstate=1: Prevents the CPU from entering deep sleep states which can cause freezes on some N-series chips. 1.5 nopcid: Workaround if not newer kernel available (< 6.4)

  2. pcie_aspm=off: Disables PCIe Active State Power Management. Fixes PCIe bus errors or NVMe dropouts.

  3. acpi=off: Last resort. Disables ACPI entirely. Limits functionality (no fan control, no clean shutdown) but verifies if the issue is BIOS/ACPI table related.

Proxmox and Kernel Updates

The ODROID H4+ benefits significantly from newer Linux kernels (6.4+) due to improvements for Alder Lake-N processors (e.g., PCID/INVLPG optimizations).

BIOS Updates

  • Freeze during update? If the system freezes during a BIOS update, wait at least 15 minutes. If it remains frozen, you may need to force a reboot, but this carries a risk of bricking. Always use a UPS if possible.

  • Check Version: Use sudo dmidecode -t bios to verify the currently installed version matches the latest release from Hardkernel.

  • Firmware Updates (Linux): You can check for non-BIOS firmware updates using: [source,bash] ---- sudo fwupdmgr get-devices sudo fwupdmgr get-updates ----