Windowsデバイスマネージャと同じ形式でLinuxからBIOSデバイス名を取得する方法

Windowsデバイスマネージャと同じ形式でLinuxからBIOSデバイス名を取得する方法

私のラップトップにはディスプレイアダプタがあり、Windows 10で見ることができます。BIOSデバイス名から..

デバイスマネージャ > ディスプレイアダプタ > プロパティ > 詳細 > "BIOS デバイス名"

そこから次のポップアップが表示されます。\_SB.PCI0.GFX0

同じノートブックがLinuxを実行している場合、その情報をどのように取得できますか?

乾杯

修正する

Hackintoshを構築しており、ディスプレイバックライト修正を作成するためにSSDTを構築する必要があるため、この情報が必要です。私を助けたいです。Opencore projectそして(今は)Linuxでこれを行う方法を提供します。唯一の方法はい、Windowsに切り替えて使用してくださいDevice Manager

私は試しましたが、dmidecodeWindowsが提供し、SSDTを作成するために必要な形式をlspci提供していません。BIOS device name

頑張ったacpidump近づいていますが、デコンパイルされた出力には逆アセンブリエラーがあります。これには私が探している文字列が含まれていますが、\_SB.PCI0.GFX0そのファイルを読み取り、それを自分の特定のディスプレイアダプタに関連付けるスクリプトを作成する方法がわかりません。たとえば: Intel(R) HD Graphics 4000

acpidump
以下は、システムがテキストファイルにACPIテーブルをダンプするためにこれまでに試みたコマンドです。

sudo acpidump -o acpidump.out

acpidump出力からバイナリACPIテーブルを抽出する

acpixtract -a acpidump.out

現在7つのssdt * .dataファイルがあります。 ssdt1.datのバイナリテーブルをヒューマンソースコードに分解しました。

iasl -d ssdt1.dat

これにより、1000行を超える行の最初の60行に過ぎない非常に大きな.dslファイルが生成されます。

/*
 * Intel ACPI Component Architecture
 * AML/ASL+ Disassembler version 20190509 (64-bit version)
 * Copyright (c) 2000 - 2019 Intel Corporation
 * 
 * Disassembling to symbolic ASL+ operators
 *
 * Disassembly of ssdt1.dat, Mon Jun  7 09:54:08 2021
 *
 * Original Table Header:
 *     Signature        "SSDT"
 *     Length           0x00001EED (7917)
 *     Revision         0x01
 *     Checksum         0x9C
 *     OEM ID           "COMPAL"
 *     OEM Table ID     "CRV ORB "
 *     OEM Revision     0x00001000 (4096)
 *     Compiler ID      "ACPI"
 *     Compiler Version 0x00040000 (262144)
 */
DefinitionBlock ("", "SSDT", 1, "COMPAL", "CRV ORB ", 0x00001000)
{
    /*
     * iASL Warning: There was 1 external control method found during
     * disassembly, but only 0 were resolved (1 unresolved). Additional
     * ACPI tables may be required to properly disassemble the code. This
     * resulting disassembler output file may not compile because the
     * disassembler did not know how many arguments to assign to the
     * unresolved methods. Note: SSDTs can be dynamically loaded at
     * runtime and may or may not be available via the host OS.
     *
     * To specify the tables needed to resolve external control method
     * references, the -e option can be used to specify the filenames.
     * Example iASL invocations:
     *     iasl -e ssdt1.aml ssdt2.aml ssdt3.aml -d dsdt.aml
     *     iasl -e dsdt.aml ssdt2.aml -d ssdt1.aml
     *     iasl -e ssdt*.aml -d dsdt.aml
     *
     * In addition, the -fe option can be used to specify a file containing
     * control method external declarations with the associated method
     * argument counts. Each line of the file must be of the form:
     *     External (<method pathname>, MethodObj, <argument count>)
     * Invocation:
     *     iasl -fe refs.txt -d dsdt.aml
     *
     * The following methods were unresolved and many not compile properly
     * because the disassembler had to guess at the number of arguments
     * required for each:
     */
    External (_SB_.PCI0.GFX0, DeviceObj)
    External (_SB_.PCI0.GFX0._DOD, IntObj)
    External (_SB_.PCI0.GFX0.AINT, MethodObj)    // Warning: Unknown method, guessing 2 arguments
    External (_SB_.PCI0.GFX0.DD01._ADR, IntObj)
    External (_SB_.PCI0.GFX0.DD01._DGS, IntObj)
    External (_SB_.PCI0.GFX0.DD02._ADR, IntObj)
    External (_SB_.PCI0.GFX0.DD02._BCL, IntObj)
    External (_SB_.PCI0.GFX0.DD02._BCM, IntObj)
    External (_SB_.PCI0.GFX0.DD02._BQC, IntObj)

ssdt1.dat分解エラーが発生しないように分解する必要があるかもしれません。その後、分解ファイルで「Intel(R)HD Graphics 4000」と同じ名前でデバイスを検索または検索する方法はありますか?これがBIOS Device Name私のディスプレイアダプタであることは明らかですか?

おそらくdmidecodelspciそしてacpidumpすべてが1つのスクリプトにまとめることができますか?

他の助けをいただきありがとうございます。

柔軟

ベストアンサー1

これが最善の解決策であるかどうか、すべてのLinuxディストリビューションで動作するかどうかはわかりませんが、次のようにして\_SB_.PCI0.GFX0必要な情報を見つけることができました。

# cat /sys/class/pci_bus/0000:00/device/0000:00:02.0/firmware_node/path

これはACPIパスとも呼ばれます。このコマンドが私に適しているのはなぜですか?

説明する
Linuxでは、PCIデバイスは16ビットドメイン番号、8ビットバス番号、5ビットデバイス番号、3ビット機能番号で識別されます。最後の3つの数字は通常BDFまたはB /と呼ばれます。デバイスのD / F(バス/デバイス)/機能)。

このlspciコマンドは、以下を使用してこの識別番号を表示できます。

# lspci -D
..
0000:00:02.0 VGA compatible controller: VMware SVGA II Adapter
..

この数字の形式は0000:00:02.0ですdomain:bus:device:function

次に、端末でこのコマンドを使用してディスプレイアダプタのACPIパスを見つけます。

# cat /sys/class/pci_bus/<domain:bus>/device/<domain:bus:device:function>/firmware_node/path

繰り返しますが、私はこのトピックについて知らず、このプロセスがすべてのディストリビューションで動作するかどうかはわかりませんが、私のディストリビューションでは機能しますUbuntu mate 20.04.1

もう1つのハッキングは、およびを使用して元の質問の手順に従うことですacpidump。その後、生成された逆アセンブリ.dslファイルを検索すると、次の文字列が見つかります。acpixtractiaslDeviceObj外部(SB.PCI0.GFX0, デバイスオブジェクト)ACPI パスが次のようになることを意味します。\_SB_.PCI0.GFX0

引用する
lspciの出力解析
便利なReddit投稿

おすすめ記事