BeardOverflow / msi-ec

GNU General Public License v2.0
134 stars 42 forks source link

MSI GF65 Thin 10UE #7

Open constructor-s opened 1 year ago

constructor-s commented 1 year ago

Hi I just want to open this thank you for all of your efforts, including the summary at: https://github.com/YoyPa/isw/issues/263#issuecomment-1165245973

I am not familiar with Linux kernels. I make installed your repo and it was surprisingly effortless in just a few seconds. Model: GF65 Thin 10UE

Here are my results:

 $ for f in /sys/devices/platform/msi-ec/*; do echo $f; cat $f; echo; done
/sys/devices/platform/msi-ec/battery_mode
min

/sys/devices/platform/msi-ec/cooler_boost
off

/sys/devices/platform/msi-ec/cpu
cat: /sys/devices/platform/msi-ec/cpu: Is a directory

/sys/devices/platform/msi-ec/driver
cat: /sys/devices/platform/msi-ec/driver: Is a directory

/sys/devices/platform/msi-ec/driver_override
(null)

/sys/devices/platform/msi-ec/fan_mode
auto

/sys/devices/platform/msi-ec/fn_key
unknown (40)

/sys/devices/platform/msi-ec/fw_release_date
2020/12/15 16:44:32

/sys/devices/platform/msi-ec/fw_version
16W2EMS1.101

/sys/devices/platform/msi-ec/gpu
cat: /sys/devices/platform/msi-ec/gpu: Is a directory

/sys/devices/platform/msi-ec/leds
cat: /sys/devices/platform/msi-ec/leds: Is a directory

/sys/devices/platform/msi-ec/modalias
platform:msi-ec

/sys/devices/platform/msi-ec/power
cat: /sys/devices/platform/msi-ec/power: Is a directory

/sys/devices/platform/msi-ec/shift_mode
off

/sys/devices/platform/msi-ec/subsystem
cat: /sys/devices/platform/msi-ec/subsystem: Is a directory

/sys/devices/platform/msi-ec/uevent
DRIVER=msi-ec
MODALIAS=platform:msi-ec

/sys/devices/platform/msi-ec/webcam
unknown (9)

/sys/devices/platform/msi-ec/win_key
unknown (40)

I have not dare writing to them yet. Again I have a bit of experience with Linux, but to double check: If I want to set a setting do I just "write" to the file (echo > ... or using a Python script), right?

Anything else I can help?

constructor-s commented 1 year ago

I got a bit adventurous and tried the cooler_boost. It works! The fan started humming.

$ echo "on" | sudo tee /sys/devices/platform/msi-ec/cooler_boost
on
$ echo "off" | sudo tee /sys/devices/platform/msi-ec/cooler_boost
off
BeardOverflow commented 1 year ago

I would like to explore some of unknown values here:

/sys/devices/platform/msi-ec/webcam /sys/devices/platform/msi-ec/win_key /sys/devices/platform/msi-ec/fn_key

Has your laptop these buttons? If so, what values are you getting for them (on/off for webcam, switch win/fn key)?

Also, a dmidecode output can be useful for future improves in this module.

constructor-s commented 1 year ago

I would like to explore some of unknown values here:

/sys/devices/platform/msi-ec/webcam /sys/devices/platform/msi-ec/win_key /sys/devices/platform/msi-ec/fn_key

Has your laptop these buttons? If so, what values are you getting for them (on/off for webcam, switch win/fn key)?

There is a toggle for webcame on Fn+F5 and in Dragon Center. It disables the webcam.

There is a Windows key and Fn key. There is some sort of option in Dragon Center for them. I never use it, but I assume it does what all MSI laptop does.

Also, a dmidecode output can be useful for future improves in this module.

Dmidecode attachment ``` $ sudo dmidecode # dmidecode 3.3 Getting SMBIOS data from sysfs. SMBIOS 3.2.0 present. Table at 0x9980C000. Handle 0x0000, DMI type 11, 5 bytes OEM Strings String 1: String 2: $BIOSE1110000100000000200 String 3: String 4: String 5: Handle 0x0001, DMI type 0, 26 bytes BIOS Information Vendor: American Megatrends Inc. Version: E16W2IMS.103 Release Date: 01/08/2021 Address: 0xF0000 Runtime Size: 64 kB ROM Size: 16 MB Characteristics: PCI is supported BIOS is upgradeable BIOS shadowing is allowed Boot from CD is supported Selectable boot is supported EDD is supported 5.25"/1.2 MB floppy services are supported (int 13h) 3.5"/720 kB floppy services are supported (int 13h) 3.5"/2.88 MB floppy services are supported (int 13h) Print screen service is supported (int 5h) 8042 keyboard services are supported (int 9h) Serial services are supported (int 14h) Printer services are supported (int 17h) ACPI is supported USB legacy is supported BIOS boot specification is supported Targeted content distribution is supported UEFI is supported BIOS Revision: 1.3 Handle 0x0002, DMI type 1, 27 bytes System Information Manufacturer: Micro-Star International Co., Ltd. Product Name: GF65 Thin 10UE Version: REV:1.0 Serial Number: 9S716W212204ZL2000237 UUID: bea83783-37d8-3e4a-b1a8-b970b770d4d2 Wake-up Type: Power Switch SKU Number: 16W2.1 Family: GF Handle 0x0003, DMI type 2, 15 bytes Base Board Information Manufacturer: Micro-Star International Co., Ltd. Product Name: MS-16W2 Version: REV:1.0 Serial Number: BSS-0123456789 Asset Tag: Default string Features: Board is a hosting board Board is replaceable Location In Chassis: Default string Chassis Handle: 0x0004 Type: Motherboard Contained Object Handles: 0 Handle 0x0004, DMI type 3, 22 bytes Chassis Information Manufacturer: Micro-Star International Co., Ltd. Type: Notebook Lock: Not Present Version: N/A Serial Number: 21PN002690 Asset Tag: No Asset Tag Boot-up State: Safe Power Supply State: Safe Thermal State: Safe Security Status: None OEM Information: 0x00000000 Height: Unspecified Number Of Power Cords: 1 Contained Elements: 0 SKU Number: Default string Handle 0x0005, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J1A1 Internal Connector Type: None External Reference Designator: PS2Mouse External Connector Type: PS/2 Port Type: Mouse Port Handle 0x0006, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J1A1 Internal Connector Type: None External Reference Designator: Keyboard External Connector Type: PS/2 Port Type: Keyboard Port Handle 0x0007, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J2A1 Internal Connector Type: None External Reference Designator: TV Out External Connector Type: Mini Centronics Type-14 Port Type: Other Handle 0x0008, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J2A2A Internal Connector Type: None External Reference Designator: COM A External Connector Type: DB-9 male Port Type: Serial Port 16550A Compatible Handle 0x0009, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J2A2B Internal Connector Type: None External Reference Designator: Video External Connector Type: DB-15 female Port Type: Video Port Handle 0x000A, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J3A1 Internal Connector Type: None External Reference Designator: USB1 External Connector Type: Access Bus (USB) Port Type: USB Handle 0x000B, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J3A1 Internal Connector Type: None External Reference Designator: USB2 External Connector Type: Access Bus (USB) Port Type: USB Handle 0x000C, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J3A1 Internal Connector Type: None External Reference Designator: USB3 External Connector Type: Access Bus (USB) Port Type: USB Handle 0x000D, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J9A1 - TPM HDR Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x000E, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J9C1 - PCIE DOCKING CONN Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x000F, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J2B3 - CPU FAN Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x0010, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J6C2 - EXT HDMI Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x0011, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J3C1 - GMCH FAN Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x0012, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J1D1 - ITP Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x0013, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J9E2 - MDC INTPSR Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x0014, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J9E4 - MDC INTPSR Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x0015, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J9E3 - LPC HOT DOCKING Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x0016, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J9E1 - SCAN MATRIX Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x0017, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J9G1 - LPC SIDE BAND Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x0018, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J8F1 - UNIFIED Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x0019, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J6F1 - LVDS Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x001A, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J2F1 - LAI FAN Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x001B, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J2G1 - GFX VID Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x001C, DMI type 8, 9 bytes Port Connector Information Internal Reference Designator: J1G6 - AC JACK Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None Port Type: Other Handle 0x001D, DMI type 9, 17 bytes System Slot Information Designation: J6B2 Type: x16 PCI Express Current Usage: In Use Length: Long ID: 0 Characteristics: 3.3 V is provided Opening is shared PME signal is supported Bus Address: 0000:00:01.0 Handle 0x001E, DMI type 9, 17 bytes System Slot Information Designation: J6B1 Type: x1 PCI Express Current Usage: In Use Length: Short ID: 1 Characteristics: 3.3 V is provided Opening is shared PME signal is supported Bus Address: 0000:00:1c.3 Handle 0x001F, DMI type 9, 17 bytes System Slot Information Designation: J6D1 Type: x1 PCI Express Current Usage: In Use Length: Short ID: 2 Characteristics: 3.3 V is provided Opening is shared PME signal is supported Bus Address: 0000:00:1c.4 Handle 0x0020, DMI type 9, 17 bytes System Slot Information Designation: J7B1 Type: x1 PCI Express Current Usage: In Use Length: Short ID: 3 Characteristics: 3.3 V is provided Opening is shared PME signal is supported Bus Address: 0000:00:1c.5 Handle 0x0021, DMI type 9, 17 bytes System Slot Information Designation: J8B4 Type: x1 PCI Express Current Usage: In Use Length: Short ID: 4 Characteristics: 3.3 V is provided Opening is shared PME signal is supported Bus Address: 0000:00:1c.6 Handle 0x0022, DMI type 10, 6 bytes On Board Device Information Type: Video Status: Enabled Description: To Be Filled By O.E.M. Handle 0x0023, DMI type 12, 5 bytes System Configuration Options Option 1: Default string Handle 0x0024, DMI type 32, 20 bytes System Boot Information Status: No errors detected Handle 0x0025, DMI type 34, 11 bytes Management Device Description: LM78-1 Type: LM78 Address: 0x00000000 Address Type: I/O Port Handle 0x0026, DMI type 26, 22 bytes Voltage Probe Description: LM78A Location: Motherboard Status: OK Maximum Value: Unknown Minimum Value: Unknown Resolution: Unknown Tolerance: Unknown Accuracy: Unknown OEM-specific Information: 0x00000000 Nominal Value: Unknown Handle 0x0027, DMI type 36, 16 bytes Management Device Threshold Data Lower Non-critical Threshold: 1 Upper Non-critical Threshold: 2 Lower Critical Threshold: 3 Upper Critical Threshold: 4 Lower Non-recoverable Threshold: 5 Upper Non-recoverable Threshold: 6 Handle 0x0028, DMI type 35, 11 bytes Management Device Component Description: Default string Management Device Handle: 0x0025 Component Handle: 0x0026 Threshold Handle: 0x0027 Handle 0x0029, DMI type 28, 22 bytes Temperature Probe Description: LM78A Location: Motherboard Status: OK Maximum Value: Unknown Minimum Value: Unknown Resolution: Unknown Tolerance: Unknown Accuracy: Unknown OEM-specific Information: 0x00000000 Nominal Value: Unknown Handle 0x002A, DMI type 36, 16 bytes Management Device Threshold Data Lower Non-critical Threshold: 1 Upper Non-critical Threshold: 2 Lower Critical Threshold: 3 Upper Critical Threshold: 4 Lower Non-recoverable Threshold: 5 Upper Non-recoverable Threshold: 6 Handle 0x002B, DMI type 35, 11 bytes Management Device Component Description: Default string Management Device Handle: 0x0025 Component Handle: 0x0029 Threshold Handle: 0x002A Handle 0x002C, DMI type 27, 15 bytes Cooling Device Temperature Probe Handle: 0x0029 Type: Power Supply Fan Status: OK Cooling Unit Group: 1 OEM-specific Information: 0x00000000 Nominal Speed: Unknown Or Non-rotating Description: Cooling Dev 1 Handle 0x002D, DMI type 36, 16 bytes Management Device Threshold Data Lower Non-critical Threshold: 1 Upper Non-critical Threshold: 2 Lower Critical Threshold: 3 Upper Critical Threshold: 4 Lower Non-recoverable Threshold: 5 Upper Non-recoverable Threshold: 6 Handle 0x002E, DMI type 35, 11 bytes Management Device Component Description: Default string Management Device Handle: 0x0025 Component Handle: 0x002C Threshold Handle: 0x002D Handle 0x002F, DMI type 27, 15 bytes Cooling Device Temperature Probe Handle: 0x0029 Type: Power Supply Fan Status: OK Cooling Unit Group: 1 OEM-specific Information: 0x00000000 Nominal Speed: Unknown Or Non-rotating Description: Not Specified Handle 0x0030, DMI type 36, 16 bytes Management Device Threshold Data Lower Non-critical Threshold: 1 Upper Non-critical Threshold: 2 Lower Critical Threshold: 3 Upper Critical Threshold: 4 Lower Non-recoverable Threshold: 5 Upper Non-recoverable Threshold: 6 Handle 0x0031, DMI type 35, 11 bytes Management Device Component Description: Default string Management Device Handle: 0x0025 Component Handle: 0x002F Threshold Handle: 0x0030 Handle 0x0032, DMI type 29, 22 bytes Electrical Current Probe Description: ABC Location: Motherboard Status: OK Maximum Value: Unknown Minimum Value: Unknown Resolution: Unknown Tolerance: Unknown Accuracy: Unknown OEM-specific Information: 0x00000000 Nominal Value: Unknown Handle 0x0033, DMI type 36, 16 bytes Management Device Threshold Data Handle 0x0034, DMI type 35, 11 bytes Management Device Component Description: Default string Management Device Handle: 0x0025 Component Handle: 0x0032 Threshold Handle: 0x0033 Handle 0x0035, DMI type 26, 22 bytes Voltage Probe Description: LM78A Location: Power Unit Status: OK Maximum Value: Unknown Minimum Value: Unknown Resolution: Unknown Tolerance: Unknown Accuracy: Unknown OEM-specific Information: 0x00000000 Nominal Value: Unknown Handle 0x0036, DMI type 28, 22 bytes Temperature Probe Description: LM78A Location: Power Unit Status: OK Maximum Value: Unknown Minimum Value: Unknown Resolution: Unknown Tolerance: Unknown Accuracy: Unknown OEM-specific Information: 0x00000000 Nominal Value: Unknown Handle 0x0037, DMI type 27, 15 bytes Cooling Device Temperature Probe Handle: 0x0036 Type: Power Supply Fan Status: OK Cooling Unit Group: 1 OEM-specific Information: 0x00000000 Nominal Speed: Unknown Or Non-rotating Description: Cooling Dev 1 Handle 0x0038, DMI type 29, 22 bytes Electrical Current Probe Description: ABC Location: Power Unit Status: OK Maximum Value: Unknown Minimum Value: Unknown Resolution: Unknown Tolerance: Unknown Accuracy: Unknown OEM-specific Information: 0x00000000 Nominal Value: Unknown Handle 0x0039, DMI type 39, 22 bytes System Power Supply Power Unit Group: 1 Location: To Be Filled By O.E.M. Name: To Be Filled By O.E.M. Manufacturer: To Be Filled By O.E.M. Serial Number: To Be Filled By O.E.M. Asset Tag: To Be Filled By O.E.M. Model Part Number: To Be Filled By O.E.M. Revision: To Be Filled By O.E.M. Max Power Capacity: Unknown Status: Present, OK Type: Switching Input Voltage Range Switching: Auto-switch Plugged: Yes Hot Replaceable: No Input Voltage Probe Handle: 0x0035 Cooling Device Handle: 0x0037 Input Current Probe Handle: 0x0038 Handle 0x003A, DMI type 43, 31 bytes TPM Device Vendor ID: INTC Specification Version: 2.0 Firmware Revision: 500.14 Description: INTEL Characteristics: Family configurable via platform software support OEM-specific Information: 0x00000000 Handle 0x003B, DMI type 16, 23 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: None Maximum Capacity: 32 GB Error Information Handle: Not Provided Number Of Devices: 2 Handle 0x003C, DMI type 17, 84 bytes Memory Device Array Handle: 0x003B Error Information Handle: Not Provided Total Width: 64 bits Data Width: 64 bits Size: 8 GB Form Factor: SODIMM Set: None Locator: ChannelA-DIMM0 Bank Locator: BANK 0 Type: DDR4 Type Detail: Synchronous Speed: 3200 MT/s Manufacturer: SK Hynix Serial Number: 22FF4F13 Asset Tag: 9876543210 Part Number: HMA81GS6DJR8N-XN Rank: 1 Configured Memory Speed: 2933 MT/s Minimum Voltage: 1.2 V Maximum Voltage: 1.2 V Configured Voltage: 1.2 V Memory Technology: DRAM Memory Operating Mode Capability: Volatile memory Firmware Version: Not Specified Module Manufacturer ID: Bank 1, Hex 0xAD Module Product ID: Unknown Memory Subsystem Controller Manufacturer ID: Unknown Memory Subsystem Controller Product ID: Unknown Non-Volatile Size: None Volatile Size: 8 GB Cache Size: None Logical Size: None Handle 0x003D, DMI type 17, 84 bytes Memory Device Array Handle: 0x003B Error Information Handle: Not Provided Total Width: Unknown Data Width: Unknown Size: No Module Installed Form Factor: Unknown Set: None Locator: ChannelB-DIMM0 Bank Locator: BANK 2 Type: Unknown Type Detail: None Speed: Unknown Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Rank: Unknown Configured Memory Speed: Unknown Minimum Voltage: Unknown Maximum Voltage: Unknown Configured Voltage: Unknown Memory Technology: Memory Operating Mode Capability: Volatile memory Firmware Version: Not Specified Module Manufacturer ID: Unknown Module Product ID: Unknown Memory Subsystem Controller Manufacturer ID: Unknown Memory Subsystem Controller Product ID: Unknown Non-Volatile Size: None Volatile Size: None Cache Size: None Logical Size: None Handle 0x003E, DMI type 19, 31 bytes Memory Array Mapped Address Starting Address: 0x00000000000 Ending Address: 0x001FFFFFFFF Range Size: 8 GB Physical Array Handle: 0x003B Partition Width: 1 Handle 0x003F, DMI type 20, 35 bytes Memory Device Mapped Address Starting Address: 0x00000000000 Ending Address: 0x001FFFFFFFF Range Size: 8 GB Physical Device Handle: 0x003C Memory Array Mapped Address Handle: 0x003E Partition Row Position: Unknown Handle 0x0040, DMI type 221, 26 bytes OEM-specific Type Header and Data: DD 1A 40 00 03 01 00 09 00 2D 50 00 02 00 00 00 00 E2 00 03 00 01 07 02 00 00 Strings: Reference Code - CPU uCode Version TXT ACM version Handle 0x0041, DMI type 221, 26 bytes OEM-specific Type Header and Data: DD 1A 41 00 03 01 00 09 00 2D 50 00 02 00 00 00 00 00 00 03 04 0E 00 1F 60 04 Strings: Reference Code - ME MEBx version ME Firmware Version Consumer SKU Handle 0x0042, DMI type 221, 54 bytes OEM-specific Type Header and Data: DD 36 42 00 07 01 00 09 00 2D 50 00 02 03 FF FF FF FF FF 04 00 FF FF FF 00 00 05 00 FF FF FF 00 00 06 00 FF FF FF FF FF 07 00 1A FF FF FF FF 08 00 00 FF FF FF FF Strings: Reference Code - CML PCH PCH-CRID Status Disabled PCH-CRID Original Value PCH-CRID New Value OPROM - RST - RAID ChipsetInit Base Version ChipsetInit Oem Version Handle 0x0043, DMI type 221, 54 bytes OEM-specific Type Header and Data: DD 36 43 00 07 01 00 09 00 2D 50 00 02 00 00 00 00 43 00 03 00 09 00 2D 50 00 04 05 FF FF FF FF FF 06 00 00 00 00 02 00 07 00 00 00 00 02 00 08 00 FF FF FF FF FF Strings: Reference Code - SA - System Agent Reference Code - MRC SA - PCIe Version SA-CRID Status Disabled SA-CRID Original Value SA-CRID New Value OPROM - VBIOS Handle 0x0044, DMI type 221, 12 bytes OEM-specific Type Header and Data: DD 0C 44 00 01 01 00 04 00 00 00 00 Strings: FSP Binary Version Handle 0x0045, DMI type 7, 27 bytes Cache Information Socket Designation: L1 Cache Configuration: Enabled, Not Socketed, Level 1 Operational Mode: Write Back Location: Internal Installed Size: 256 kB Maximum Size: 256 kB Supported SRAM Types: Synchronous Installed SRAM Type: Synchronous Speed: Unknown Error Correction Type: Parity System Type: Unified Associativity: 8-way Set-associative Handle 0x0046, DMI type 7, 27 bytes Cache Information Socket Designation: L2 Cache Configuration: Enabled, Not Socketed, Level 2 Operational Mode: Write Back Location: Internal Installed Size: 1 MB Maximum Size: 1 MB Supported SRAM Types: Synchronous Installed SRAM Type: Synchronous Speed: Unknown Error Correction Type: Single-bit ECC System Type: Unified Associativity: 4-way Set-associative Handle 0x0047, DMI type 7, 27 bytes Cache Information Socket Designation: L3 Cache Configuration: Enabled, Not Socketed, Level 3 Operational Mode: Write Back Location: Internal Installed Size: 8 MB Maximum Size: 8 MB Supported SRAM Types: Synchronous Installed SRAM Type: Synchronous Speed: Unknown Error Correction Type: Multi-bit ECC System Type: Unified Associativity: 16-way Set-associative Handle 0x0048, DMI type 4, 48 bytes Processor Information Socket Designation: U3E1 Type: Central Processor Family: Core i5 Manufacturer: Intel(R) Corporation ID: 52 06 0A 00 FF FB EB BF Signature: Type 0, Family 6, Model 165, Stepping 2 Flags: FPU (Floating-point unit on-chip) VME (Virtual mode extension) DE (Debugging extension) PSE (Page size extension) TSC (Time stamp counter) MSR (Model specific registers) PAE (Physical address extension) MCE (Machine check exception) CX8 (CMPXCHG8 instruction supported) APIC (On-chip APIC hardware supported) SEP (Fast system call) MTRR (Memory type range registers) PGE (Page global enable) MCA (Machine check architecture) CMOV (Conditional move instruction supported) PAT (Page attribute table) PSE-36 (36-bit page size extension) CLFSH (CLFLUSH instruction supported) DS (Debug store) ACPI (ACPI supported) MMX (MMX technology supported) FXSR (FXSAVE and FXSTOR instructions supported) SSE (Streaming SIMD extensions) SSE2 (Streaming SIMD extensions 2) SS (Self-snoop) HTT (Multi-threading) TM (Thermal monitor supported) PBE (Pending break enabled) Version: Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz Voltage: 0.8 V External Clock: 100 MHz Max Speed: 8300 MHz Current Speed: 2376 MHz Status: Populated, Enabled Upgrade: Other L1 Cache Handle: 0x0045 L2 Cache Handle: 0x0046 L3 Cache Handle: 0x0047 Serial Number: To Be Filled By O.E.M. Asset Tag: To Be Filled By O.E.M. Part Number: To Be Filled By O.E.M. Core Count: 4 Core Enabled: 4 Thread Count: 8 Characteristics: 64-bit capable Multi-Core Hardware Thread Execute Protection Enhanced Virtualization Power/Performance Control Handle 0x0049, DMI type 131, 64 bytes OEM-specific Type Header and Data: 83 40 49 00 31 00 00 00 00 00 00 00 00 00 00 00 F8 00 8D 06 00 00 00 00 01 00 00 00 00 00 0E 00 60 04 1F 00 00 00 00 00 FE 00 FF FF 00 00 00 00 00 00 00 00 22 00 00 00 76 50 72 6F 00 00 00 00 Handle 0x004A, DMI type 41, 11 bytes Onboard Device Reference Designation: Onboard - Other Type: Other Status: Enabled Type Instance: 1 Bus Address: 0000:00:00.0 Handle 0x004B, DMI type 41, 11 bytes Onboard Device Reference Designation: Onboard - Video Type: Video Status: Enabled Type Instance: 1 Bus Address: 0000:00:02.0 Handle 0x004C, DMI type 41, 11 bytes Onboard Device Reference Designation: Onboard - Other Type: Other Status: Enabled Type Instance: 2 Bus Address: 0000:00:12.0 Handle 0x004D, DMI type 41, 11 bytes Onboard Device Reference Designation: Onboard - Other Type: Other Status: Enabled Type Instance: 3 Bus Address: 0000:00:14.0 Handle 0x004E, DMI type 41, 11 bytes Onboard Device Reference Designation: Onboard - Other Type: Other Status: Enabled Type Instance: 4 Bus Address: 0000:00:14.2 Handle 0x004F, DMI type 41, 11 bytes Onboard Device Reference Designation: Onboard - Ethernet Type: Ethernet Status: Enabled Type Instance: 1 Bus Address: 0000:00:14.3 Handle 0x0050, DMI type 41, 11 bytes Onboard Device Reference Designation: Onboard - Other Type: Other Status: Enabled Type Instance: 5 Bus Address: 0000:00:15.0 Handle 0x0051, DMI type 41, 11 bytes Onboard Device Reference Designation: Onboard - Other Type: Other Status: Enabled Type Instance: 6 Bus Address: 0000:00:15.2 Handle 0x0052, DMI type 41, 11 bytes Onboard Device Reference Designation: Onboard - Other Type: Other Status: Enabled Type Instance: 7 Bus Address: 0000:00:16.0 Handle 0x0053, DMI type 41, 11 bytes Onboard Device Reference Designation: Onboard - Other Type: Other Status: Enabled Type Instance: 8 Bus Address: 0000:00:1f.0 Handle 0x0054, DMI type 41, 11 bytes Onboard Device Reference Designation: Onboard - Sound Type: Sound Status: Enabled Type Instance: 1 Bus Address: 0000:00:1f.3 Handle 0x0055, DMI type 41, 11 bytes Onboard Device Reference Designation: Onboard - Other Type: Other Status: Enabled Type Instance: 9 Bus Address: 0000:00:1f.4 Handle 0x0056, DMI type 41, 11 bytes Onboard Device Reference Designation: Onboard - Other Type: Other Status: Enabled Type Instance: 10 Bus Address: 0000:00:1f.5 Handle 0x0057, DMI type 221, 89 bytes OEM-specific Type Header and Data: DD 59 57 00 0C 01 00 FF FF FF FF FF 02 00 FF FF FF FF FF 03 04 FF FF FF FF FF 05 06 FF FF FF FF FF 07 08 FF FF FF FF FF 09 00 00 00 00 00 00 0A 00 FF FF FF FF FF 0B 00 FF FF 00 00 00 0C 00 00 09 00 02 11 0D 00 FF FF FF FF FF 0E 00 00 07 00 00 00 0F 00 00 02 00 0F 00 Strings: Lan Phy Version Sensor Firmware Version Debug Mode Status Disabled Performance Mode Status Disabled Debug Use USB(Disabled:Serial) Disabled ICC Overclocking Version UNDI Version EC FW Version GOP Version Royal Park Version Platform Version Client Silicon Version Handle 0x0058, DMI type 14, 8 bytes Group Associations Name: $MEI Items: 1 0x0000 (OEM-specific) Handle 0x0059, DMI type 219, 106 bytes OEM-specific Type Header and Data: DB 6A 59 00 01 04 01 45 02 00 A0 06 01 85 36 20 00 00 00 00 40 00 00 01 1F 00 00 C9 0B 40 44 02 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 03 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Strings: MEI1 MEI2 MEI3 MEI4 Handle 0x005A, DMI type 136, 6 bytes OEM-specific Type Header and Data: 88 06 5A 00 00 00 Handle 0x005B, DMI type 14, 23 bytes Group Associations Name: Firmware Version Info Items: 6 0x0040 (OEM-specific) 0x0041 (OEM-specific) 0x0042 (OEM-specific) 0x0043 (OEM-specific) 0x0044 (OEM-specific) 0x0057 (OEM-specific) Handle 0x005C, DMI type 13, 22 bytes BIOS Language Information Language Description Format: Long Installable Languages: 3 en|US|iso8859-1 zh|CN|unicode zh|TW|unicode Currently Installed Language: en|US|iso8859-1 Handle 0x005D, DMI type 127, 4 bytes End Of Table ```

I am testing many different OS today, and this was generated from a Ubuntu 22.04 LTS USB live boot, if that matters at all. My previous comment was on a properly installed Ubuntu 22.04 LTS.

BeardOverflow commented 1 year ago

Ok, I need know the decimal value given when:

Path On Off
/sys/devices/platform/msi-ec/webcam 9 ?
Path Left Right
/sys/devices/platform/msi-ec/win_key ? ?
/sys/devices/platform/msi-ec/fn_key ? ?

For example, in your first post, /sys/devices/platform/msi-ec/webcam returns 9 when is enabled, right? Also, you can test them easily editing the constant.h file and recompiling the module.

constructor-s commented 1 year ago

Camera off:

$ cat /sys/devices/platform/msi-ec/webcam
unknown (9)

Camera on:

$ cat /sys/devices/platform/msi-ec/webcam
unknown (75)

I am actually not sure what the win/fn key switch is doing. It seems right now all the keys on my keyboard is doing what it is labelled to do, so whatever the "default" is. The bottom row of my key board is: ctrl, win, alt, space, \, alt, fn, ctrl, left arrow, bottom arrow, right arrow. In this state I have:

$ cat /sys/devices/platform/msi-ec/win_key
unknown (40)
$ cat /sys/devices/platform/msi-ec/fn_key
unknown (40)

Is there anyway I can toggle this function in Linux? For the camera I could do Fn+F6.

BeardOverflow commented 1 year ago

Change the constants for the webcam to:

#define MSI_EC_WEBCAM_ON 0x9
#define MSI_EC_WEBCAM_OFF 0x4b

Compile it and try it:

echo on > /sys/devices/platform/msi-ec/webcam
echo off > /sys/devices/platform/msi-ec/webcam

Win and Fn key should be swappable from Dragon Center/Bios settings. But if you don't find this option, maybe it won't be available for laptop model.

constructor-s commented 1 year ago

Win and Fn key should be swappable from Dragon Center/Bios settings. But if you don't find this option, maybe it won't be available for laptop model.

Normal default behavior, Windows on the left, Fn on the right:

$ for f in /sys/devices/platform/msi-ec/*_key; do echo $f; cat $f; echo; done
/sys/devices/platform/msi-ec/fn_key
unknown (40)

/sys/devices/platform/msi-ec/win_key
unknown (40)

In Windows Dragon Center, swap Win and FN keys (Fn on left side of spacebar, Win on right side), reboot into Ubuntu.

/sys/devices/platform/msi-ec/fn_key
unknown (56)

/sys/devices/platform/msi-ec/win_key
unknown (56)

Then reboot into Windows, keeping the swap, disable Win key, which I am quite sure took effect in Windows (couldn't open the start menu). Then reboot into Ubuntu, the Win key still works in Ubuntu, msi-ec values doesn't change.

/sys/devices/platform/msi-ec/fn_key
unknown (56)

/sys/devices/platform/msi-ec/win_key
unknown (56)

Finally, reboot into Windows, removing the swap (back to original), disable Win key, which again took effect in Windows. Then reboot into Ubuntu, the Win key still works in Ubuntu:

/sys/devices/platform/msi-ec/fn_key
unknown (40)

/sys/devices/platform/msi-ec/win_key
unknown (40)

So it looks like decimal 40 is default behavior. Decimal 56 for both means swap. No way to disable Win key in Linux (why does anyone want this anyways...)?

I didn't find anything relevant in BIOS.

constructor-s commented 1 year ago

Change the constants for the webcam to:

#define MSI_EC_WEBCAM_ON 0x9
#define MSI_EC_WEBCAM_OFF 0x4b

I did:

#define MSI_EC_WEBCAM_ON 0x09 // 0x4a
#define MSI_EC_WEBCAM_OFF 0x4b // 0x48

then make and sudo make install

Webcam disabled:

$ cat /sys/devices/platform/msi-ec/webcam
unknown (8)

Webcam enabled:

$ cat /sys/devices/platform/msi-ec/webcam
unknown (10)

I changed it to

#define MSI_EC_WEBCAM_ON 0x0a // 0x4a
#define MSI_EC_WEBCAM_OFF 0x08 // 0x48

and then make and sudo make install, but got the exact same output unknown (8) and unknown (10).

During make it says: Skipping BTF generation for /home/USERNAME/Documents/msi-ec/msi-ec.ko due to unavailability of vmlinux if it means anything.

BeardOverflow commented 1 year ago

The module seems the previous one. Uninstall it and clear the staging folder before repeating the steps.

constructor-s commented 1 year ago

The module seems the previous one. Uninstall it and clear the staging folder before repeating the steps.

OK I ran sudo make uninstall first and now it works.

#define MSI_EC_WEBCAM_ON 0x0a // 0x4a
#define MSI_EC_WEBCAM_OFF 0x08 // 0x48
$ cat /sys/devices/platform/msi-ec/webcam
off
$ cat /sys/devices/platform/msi-ec/webcam
on

I wonder maybe only the last byte matters though. Do you think it is just a coincidence that my MSI_EC_WEBCAM_ON and MSI_EC_WEBCAM_OFF ends in the same byte as your original?

BeardOverflow commented 1 year ago

In both cases, the address is correct, but the value is slightly different. It seems that the same address is shared and only a bit of the value is needed.

Webcam-On 7-bit 6-bit 5-bit 4-bit 3-bit 2-bit 1-bit 0-bit
0xa 0 0 0 0 1 0 1 0
0x4a 0 1 0 0 1 0 1 0
Webcam-Off 7-bit 6-bit 5-bit 4-bit 3-bit 2-bit 1-bit 0-bit
0x8 0 0 0 0 1 0 0 0
0x48 0 1 0 0 1 0 0 0
Win-Key-L 7-bit 6-bit 5-bit 4-bit 3-bit 2-bit 1-bit 0-bit
0x38 (56) 0 0 1 1 1 0 0 0
0x50 0 1 0 1 0 0 0 0
Win-Key-R 7-bit 6-bit 5-bit 4-bit 3-bit 2-bit 1-bit 0-bit
0x28 (40) 0 0 1 0 1 0 0 0
0x40 0 1 0 0 0 0 0 0

I must refactor the code to support bitwise operations because I have already seen the same problem with other laptop models. Thanks for your help!

Any other wrong value pending to review?

constructor-s commented 1 year ago

Yes bitwise (instead of byte) was what I was thinking of. Again I have no idea how these kernel/drivers work, but that was my thought.

I think I am happy with the web cam value.

It sounds like maybe my model has a different set of fn and win key options available in Dragon Center, but honestly selfishly speaking I don't really care about that option.

If you wish to clean the repo up a bit I think this issue can be closed.

Again thank you for your generous contribution. Sorry for the delay in replying.

griha266 commented 12 months ago

Hello everyone, I have same model of laptop with Fedora on it. Try to do same thing and getting this error. I just starting to use linux, try to disable Secure Boot and still not worked. Tried to sign module msi-ec.ko, but still dont work. ERROR: could not insert 'msi_ec': Operation not supported