Exploring the Embedded Controller

Tested last night on an intel 11th gen, arch 6.12.6, no crashes.

1 Like

Hope this is helpfull. (I yeeted my asset tag, but i might have posted it before? not sure if that would be a key detail)

$ grep -r . /sys/class/dmi/id/
/sys/class/dmi/id/bios_date:12/25/2023
grep: /sys/class/dmi/id/board_serial: Permission denied
/sys/class/dmi/id/uevent:MODALIAS=dmi:bvnINSYDECorp.:bvr03.08:bd12/25/2023:br3.8:svnFramework:pnLaptop(12thGenIntelCore):pvrA4:rvnFramework:rnFRANMACP04:rvrA4:cvnFramework:ct10:cvrA4:skuFRANDACP04:
grep: /sys/class/dmi/id/product_serial: Permission denied
/sys/class/dmi/id/product_name:Laptop (12th Gen Intel Core)
/sys/class/dmi/id/chassis_vendor:Framework
/sys/class/dmi/id/chassis_asset_tag: redacted?
/sys/class/dmi/id/sys_vendor:Framework
/sys/class/dmi/id/power/runtime_active_time:0
/sys/class/dmi/id/power/runtime_status:unsupported
grep: /sys/class/dmi/id/power/autosuspend_delay_ms: Input/output error
/sys/class/dmi/id/power/runtime_suspended_time:0
/sys/class/dmi/id/power/control:auto
/sys/class/dmi/id/bios_version:03.08
/sys/class/dmi/id/bios_release:3.8
/sys/class/dmi/id/product_version:A4
/sys/class/dmi/id/board_vendor:Framework
/sys/class/dmi/id/chassis_version:A4
/sys/class/dmi/id/product_sku:FRANDACP04
/sys/class/dmi/id/chassis_type:10
grep: /sys/class/dmi/id/chassis_serial: Permission denied
/sys/class/dmi/id/product_family:13in Laptop
grep: /sys/class/dmi/id/product_uuid: Permission denied
/sys/class/dmi/id/bios_vendor:INSYDE Corp.
/sys/class/dmi/id/board_asset_tag:*
/sys/class/dmi/id/board_version:A4
/sys/class/dmi/id/modalias:dmi:bvnINSYDECorp.:bvr03.08:bd12/25/2023:br3.8:svnFramework:pnLaptop(12thGenIntelCore):pvrA4:rvnFramework:rnFRANMACP04:rvrA4:cvnFramework:ct10:cvrA4:skuFRANDACP04:
/sys/class/dmi/id/board_name:FRANMACP04

/sys/class/dmi/id/product_name:Laptop (12th Gen Intel Core)

Crap.

https://patchwork.kernel.org/project/chrome-platform/patch/20240806-platform-chrome-cros_ec_lpcs-change-the-default-disposition-of-the-framework-laptop-v1-1-09e0d602b215@howett.net/

I introduced exact product name matching for the cros_ec driver to differentiate all the Intel Core programs from the other ones.
I don’t know how I missed that the product name contains Laptop ().

4 Likes

@DHowett Will you send a fix for it? I can do so too, but have no devices to test it on besides an unaffected 13 inch AMD.

1 Like

If it helps, here are the two generations of mainboard that I have in use:

i5-11th:

/sys/class/dmi/id/product_name:Laptop

i5-13th:

/sys/class/dmi/id/product_name:Laptop (13th Gen Intel Core)
1 Like

Would a combined ID of “chassis_vendor” + “product_sku” be more reliable?
Maybe not.
A non-framework desktop gives this:
grep -r . /sys/class/dmi/id/
/sys/class/dmi/id/bios_date:01/18/2024
grep: /sys/class/dmi/id/board_serial: Permission denied
/sys/class/dmi/id/
grep: /sys/class/dmi/id/product_serial: Permission denied
/sys/class/dmi/id/product_name:X570 Steel Legend
/sys/class/dmi/id/chassis_vendor:To Be Filled By O.E.M.
/sys/class/dmi/id/chassis_asset_tag:To Be Filled By O.E.M.
/sys/class/dmi/id/sys_vendor:To Be Filled By O.E.M.
/sys/class/dmi/id/power/runtime_active_time:0
/sys/class/dmi/id/power/runtime_active_kids:0
/sys/class/dmi/id/power/runtime_usage:0
/sys/class/dmi/id/power/runtime_status:unsupported
grep: /sys/class/dmi/id/power/autosuspend_delay_ms: Input/output error
/sys/class/dmi/id/power/async:disabled
/sys/class/dmi/id/power/runtime_suspended_time:0
/sys/class/dmi/id/power/runtime_enabled:disabled
/sys/class/dmi/id/power/control:auto
/sys/class/dmi/id/bios_version:P5.60
/sys/class/dmi/id/bios_release:5.17
/sys/class/dmi/id/product_version:To Be Filled By O.E.M.
/sys/class/dmi/id/board_vendor:ASRock
/sys/class/dmi/id/chassis_version:To Be Filled By O.E.M.
/sys/class/dmi/id/product_sku:To Be Filled By O.E.M.
/sys/class/dmi/id/chassis_type:3
grep: /sys/class/dmi/id/chassis_serial: Permission denied
/sys/class/dmi/id/product_family:To Be Filled By O.E.M.
grep: /sys/class/dmi/id/product_uuid: Permission denied
/sys/class/dmi/id/bios_vendor:American Megatrends Inc.
/sys/class/dmi/id/

I will :slight_smile:

1 Like

I have.

11 Likes

The patch has been selected for inclusion in the next stable release of 6.12, 6.12.8. Sorry again about the issue!

5 Likes

@DHowett Thanks, that was indeed it. i applied your patch to a custom 6.12.7 arch install and worked. regular version would solve this for most others soon enough. :star_struck:


(screenshot is made smaller, not all battery info is shown)

2 Likes

It works again with patch applied. the error looks different tho:

$ sudo ./ectool --interface=lpc battery
EC returned error result code 3
Battery info:
  OEM name:               NVT
  Model number:           Framewo
  Chemistry   :           LION

The same happens without --interface=lpc, correct?

1 Like

AFAIK, this is normal. ectool battery probes a couple things before producing any output, and the LPC backend eagerly prints errors received over the LPC interface.

2 Likes

yes in some way. and apparently thats normal :smiley:

In contrast to my Thinkpad, no osd (on screen display indicator) appears when changing the keyboard backlight with the keyboard (fn + space) on Linux. Besides, after changing the keyboard brightness with these keys, it does no longer correspond with Gnome settings.

Can someone tell me what is needed to fix this, how to enable the osd when changing the keyboard backlight with the fn+space keys. If possible?

I have asked this before, are there any updates on this? I believe that it would be nice to have. Thank in advance.

1 Like

isnt that “OSD” thing not just some application that draws on your screen? if you for example do this on windows, you need some windows application to draw on your screen. the embedded controller also doesnt have the power/rights/access to draw on the screen i think, so it needs to be either a resident bios/firmware thing thats running or again, a piece of software that comes along with your drivers.

A key code that notifies the OS that something has changed must be emitted by the embedded controller when pressing the Fn+Space so that the os is notified. I believe that that is not the case now.

1 Like

I found the other thread. and while its not a event send by the EC, its current brightness can be set and read, the reading part might help write a OSD to show a popup:

One could regularly read the vallue and use that to generate a popup. or indeed, alter the EC code to expose maybe a keyboard scan code. Im unfamiliar with real chromebooks. do they have a OSD and reading this status from where? maybe we can implement a similiar thing then. matching the EC basecode. I dont care too much for this to try myself atm, Hacking your Framework Laptop's EC for fun and profit :: HowettNET DHowett made some excelent blogposts about modifying ones EC.

Kinda sad ionotify only works when I change the brightness from the OS side, but when the EC does it (keyboard) it doesnt trigger ionotify

Microsoft Defender flagged this driver as a severe Trojan virus for me this morning and by default wants to quarantine it.

VulnerableDriver:WinNT/Winring0.G

Alert level: Severe
Status: Active
Date: 2025-09-18 5:34 AM
Category: Trojan
Details: This program is dangerous and executes commands from an attacker.

Learn more

Affected items:

file: C:\WINDOWS\system32\Drivers\WinRing0x64.sys

(Disclosure: my Framework is still in preorder)

There’s a couple ways OpenRGB did the same thing, meaning direct IO in Win11. Could PawnIO work?