Skip to content

Conversation

@lukebellis
Copy link

Summary

This PR adds comprehensive Linux support for hardware detection in OpCore Simplify, addressing the need discussed in issue #143 and building upon the work in PR #144.

Changes

New Files

  • Scripts/linux_hardware_detector.py - Linux hardware detection module that gathers system information using standard Linux tools
  • OpCore-Simplify.sh - Shell script for easy execution on Linux systems

Modified Files

  • OpCore-Simplify.py - Added Linux platform support in hardware report selection menu
  • Scripts/gathering_files.py - Modified to detect Linux platform and return appropriate handler
  • .gitignore - Added SysReport directory to ignore generated reports

Features

Hardware Detection - Detects all major components:

  • CPU (model, cores, threads, SIMD features)
  • GPU (vendor/device IDs, codenames for AMD cards)
  • Motherboard (manufacturer, model, platform type)
  • Audio devices
  • Network adapters (Ethernet and WiFi)
  • Storage controllers (SATA, NVMe)
  • Bluetooth devices

JSON Format Compatibility - Exports hardware report in the same JSON format as Windows Hardware Sniffer, ensuring compatibility with existing OpCore Simplify code

ACPI Table Export - Exports ACPI tables (DSDT, SSDT, etc.) from /sys/firmware/acpi/tables/ for OpenCore configuration

User Experience

  • Option "E" in the menu to export hardware report on Linux
  • Clear notes about sudo requirements for full hardware detection
  • Shell script with Python 3 check and sudo recommendations

Testing

Tested on Ubuntu with AMD Ryzen 9 5900X system:

  • Successfully detected all hardware components
  • Generated compatible Report.json file
  • Exported ACPI tables
  • Menu integration works as expected

Compatibility

  • Preserves existing Windows functionality
  • Uses standard Linux tools (lspci, lscpu, lsusb) available on most distributions
  • Gracefully handles missing information when running without sudo

Related Issues

This implementation provides a solid foundation for Linux users to create OpenCore EFI configurations for macOS installations.

- Add linux_hardware_detector.py module to gather hardware info on Linux
- Detect CPU, GPU, motherboard, audio, network, storage, and Bluetooth devices
- Export hardware report in Windows Hardware Sniffer compatible JSON format
- Export ACPI tables from /sys/firmware/acpi/tables
- Add OpCore-Simplify.sh shell script for easy execution on Linux
- Update main script to handle Linux hardware export (option E)
- Modified gathering_files.py to detect Linux platform
- Add SysReport to .gitignore

The Linux detector uses standard Linux tools (lspci, lscpu, lsusb) to gather
hardware information and formats it to match the expected JSON structure
used by OpCore Simplify for macOS EFI configuration.

Addresses the need for Linux support discussed in issue lzhoang2801#143 and PR lzhoang2801#144.
@lzhoang2801
Copy link
Owner

Check https://github.com/lzhoang2801/Hardware-Sniffer/tree/add-linux-support. OpCore Simplify doesn't handle this.

@lzhoang2801
Copy link
Owner

I've stopped looking into how to identify input and biometric device information on Linux. So, if anyone manages to figure that out, I'd be really glad

@lzhoang2801
Copy link
Owner

And an update for the WiFi profile extractor for Linux, see 92aa40f#diff-172ab378304cc9396b7728519425abca9bb050a95f9bba6c7b4edea43b3cea99

- Improved command execution security in LinuxHardwareDetector by using argument lists instead of shell=True.
- Added methods to gather input and biometric device information.
- Updated validate_wifi_password method to handle different authentication types and return appropriate values.
- Implemented get_wifi_password_linux method to retrieve WiFi passwords using nmcli.
- Enhanced user prompts for network processing in WifiProfileExtractor.
@lukebellis
Copy link
Author

Ok have a look at latest commit

@Delor3an91
Copy link

HI @lukebellis,

  1. The script must be run as root if not, it ask for password to sudo and don't stop spamming for it. It doesn't let the user type it because of the countdown.

  2. Not working :

####################################################################

Loading ACPI Table(s)

####################################################################
by CorpNewt

Gathering valid tables from ACPI...

  • DMAR.aml
  • DSDT.aml
  • SSDT-1.aml
  • SSDT-2.aml
  • SSDT-3.aml
  • SSDT-4.aml
  • SSDT-5.aml
  • SSDT-6.aml
  • SSDT-7.aml
  • SSDT-8.aml
  • SSDT-9.aml
  • SSDT-10.aml

Loading valid tables in /tmp/OpCore-Simplify-add-linux-hardware-detection/SysReport/ACPI...

Done.

Hardware report exported successfully!

Press Enter to continue...

-> I press Enter :

####################################################################

Compatibility Checker

####################################################################

Checking compatibility with macOS for the following devices:

Press Enter to continue...

-> I press Enter :

####################################################################

An Error Occurred

####################################################################

Traceback (most recent call last):
File "/tmp/OpCore-Simplify-add-linux-hardware-detection/OpCore-Simplify.py", line 442, in
o.main()
~~~~~~^^
File "/tmp/OpCore-Simplify-add-linux-hardware-detection/OpCore-Simplify.py", line 398, in main
hardware_report, native_macos_version, ocl_patched_macos_version = self.c.check_compatibility(hardware_report)
~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/tmp/OpCore-Simplify-add-linux-hardware-detection/Scripts/compatibility_checker.py", line 394, in check_compatibility
return hardware_report, (self.min_native_macos_version, self.max_native_macos_version), self.ocl_patched_macos_version
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'CompatibilityChecker' object has no attribute 'min_native_macos_version'. Did you mean: 'ocl_patched_macos_version'?

Press Enter to continue...

Wish You Well

@amanullahmenjli
Copy link

HI @lukebellis,

1. The script must be run as **root** if not, it ask for password to sudo and don't stop spamming for it. It doesn't let the user type it because of the countdown.

2. Not working :

####################################################################

Loading ACPI Table(s)

#################################################################### by CorpNewt

Gathering valid tables from ACPI...

* DMAR.aml

* DSDT.aml

* SSDT-1.aml

* SSDT-2.aml

* SSDT-3.aml

* SSDT-4.aml

* SSDT-5.aml

* SSDT-6.aml

* SSDT-7.aml

* SSDT-8.aml

* SSDT-9.aml

* SSDT-10.aml

Loading valid tables in /tmp/OpCore-Simplify-add-linux-hardware-detection/SysReport/ACPI...

Done.

Hardware report exported successfully!

Press Enter to continue...

-> I press Enter :

####################################################################

Compatibility Checker

####################################################################

Checking compatibility with macOS for the following devices:

Press Enter to continue...

-> I press Enter :

####################################################################

An Error Occurred

####################################################################

Traceback (most recent call last): File "/tmp/OpCore-Simplify-add-linux-hardware-detection/OpCore-Simplify.py", line 442, in o.main() ~~~~~~^^ File "/tmp/OpCore-Simplify-add-linux-hardware-detection/OpCore-Simplify.py", line 398, in main hardware_report, native_macos_version, ocl_patched_macos_version = self.c.check_compatibility(hardware_report) ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ File "/tmp/OpCore-Simplify-add-linux-hardware-detection/Scripts/compatibility_checker.py", line 394, in check_compatibility return hardware_report, (self.min_native_macos_version, self.max_native_macos_version), self.ocl_patched_macos_version ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'CompatibilityChecker' object has no attribute 'min_native_macos_version'. Did you mean: 'ocl_patched_macos_version'?

Press Enter to continue...

Wish You Well

I got the same error while trying it on my machine

@casualNavigator
Copy link

any update on this?

@amanullahmenjli
Copy link

The PR was approved but what about the issues mentioned above?

@lzhoang2801
Copy link
Owner

The PR was approved but what about the issues mentioned above?

That's just a community feature, and in this case, it holds no value. This PR won't resolve any further issues I've encountered. If you want to use it, please use my separate branch to ensure the results

@lzhoang2801
Copy link
Owner

Move to #400

@lzhoang2801 lzhoang2801 closed this Nov 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux Support

6 participants