Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/dev/cros_ec does not exist #43

Open
jhpratt opened this issue Jun 5, 2024 · 12 comments
Open

/dev/cros_ec does not exist #43

jhpratt opened this issue Jun 5, 2024 · 12 comments

Comments

@jhpratt
Copy link

jhpratt commented Jun 5, 2024

Failed to open /dev/cros_ec. Because: Os { code: 2, kind: NotFound, message: "No such file or directory" }
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', framework_lib/src/chromium_ec/cros_ec.rs:70:34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Using Fedora 40 on my new FW16, the /dev/cros_ec file does not exist. As such, the program fails in the manner indicated for most of the commands.

Is there something that needs to be installed? The README indicates that it should work out of the box so long as Rust is installed (I'm a Rust programmer, so it very much is).

@zdcthomas
Copy link

I'm seeing the same issue

Tool Version Information
  Version:     0.1.0
  Built At:    Thu, 16 May 2024 17:17:50 +0000
  Git Commit:  ?
  Git Dirty:   ?

@julianneswinoga
Copy link

Same here, FW 16 with NixOS:

$ sudo framework_tool --test
Self-Test
  SMBIOS Platform:     Framework16
  SMBIOS is_framework: true
  Dump EC memory region
Failed to open /dev/cros_ec. Because: Os { code: 2, kind: NotFound, message: "No such file or directory" }
thread 'main' panicked at framework_lib/src/chromium_ec/cros_ec.rs:70:34:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@amstan
Copy link
Member

amstan commented Jul 8, 2024

Hmm, seems like your ec kernel driver is not loaded (for various reasons), can you do something like this:

alex@alex-framework:~% modprobe configs
alex@alex-framework:~% zcat /proc/config.gz|grep CROS_EC
CONFIG_KEYBOARD_CROS_EC=m
CONFIG_I2C_CROS_EC_TUNNEL=m
CONFIG_GPIO_CROS_EC=m
CONFIG_CROS_EC_WATCHDOG=m
CONFIG_MFD_CROS_EC_DEV=m
CONFIG_CEC_CROS_EC=m
CONFIG_SND_SOC_CROS_EC_CODEC=m
CONFIG_RTC_DRV_CROS_EC=m
CONFIG_CROS_EC=m
CONFIG_CROS_EC_I2C=m
CONFIG_CROS_EC_ISHTP=m
CONFIG_CROS_EC_SPI=m
CONFIG_CROS_EC_UART=m
CONFIG_CROS_EC_LPC=m
CONFIG_CROS_EC_PROTO=y
CONFIG_CROS_EC_CHARDEV=m
CONFIG_CROS_EC_LIGHTBAR=m
CONFIG_CROS_EC_DEBUGFS=m
CONFIG_CROS_EC_SENSORHUB=m
CONFIG_CROS_EC_SYSFS=m
CONFIG_CROS_EC_TYPEC=m
CONFIG_EXTCON_USBC_CROS_EC=m
CONFIG_IIO_CROS_EC_ACCEL_LEGACY=m
CONFIG_IIO_CROS_EC_SENSORS_CORE=m
CONFIG_IIO_CROS_EC_SENSORS=m
CONFIG_IIO_CROS_EC_SENSORS_LID_ANGLE=m
CONFIG_IIO_CROS_EC_LIGHT_PROX=m
CONFIG_IIO_CROS_EC_BARO=m
CONFIG_CROS_EC_MKBP_PROXIMITY=m
CONFIG_PWM_CROS_EC=m
alex@alex-framework:~% lsmod|grep cros_ec
cros_ec_lpcs           20480  0
cros_ec                20480  1 cros_ec_lpcs
alex@alex-framework:~% uname -a
Linux alex-framework 6.9.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 28 Jun 2024 04:32:50 +0000 x86_64 GNU/Linux

@jhpratt
Copy link
Author

jhpratt commented Jul 8, 2024

modprobe configs errors out: modprobe: FATAL: Module configs not found in directory /lib/modules/6.9.4-200.fc40.x86_64

And given that, perhaps unsurprisingly zcat /proc/config.gz says file not found.

@cawilliamson
Copy link

I don't have this working either - I can confirm the module is loaded but I get this:

[   15.536037] cros_ec_lpcs cros_ec_lpcs.0: EC ID not detected

@parkerlreed
Copy link

Nothing here either

[parker@parker-framework ~]$ lsmod | grep cros
cros_ec_lpcs           20480  0
cros_ec                20480  1 cros_ec_lpcs
[parker@parker-framework ~]$ sudo framework_tool --versions
UEFI BIOS
  Version:        03.03
  Release Date:   03/27/2024
EC Firmware
Failed to open /dev/cros_ec. Because: Os { code: 2, kind: NotFound, message: "No such file or directory" }
thread 'main' panicked at framework_lib/src/chromium_ec/cros_ec.rs:70:34:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Linux parker-framework 6.9.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 05 Jul 2024 22:11:24 +0000 x86_64 GNU/Linux

@kriba24
Copy link

kriba24 commented Jul 26, 2024

the issue is fixed with kernel 6.10, as it has the required cros_ec support

@parkerlreed
Copy link

Yep! Thanks.

[parker@parker-framework ~]$ sudo framework_tool --versions
[sudo] password for parker: 
UEFI BIOS
  Version:        03.04
  Release Date:   07/09/2024
EC Firmware
  Build version:  "lotus_v3.4.113353-ec:b4c1fb,os:7b88e1,cmsis:4aa3ff 2024-03-26 07:08:43 lotus@ip-172-26-3-226"
  RO Version:     "lotus_v3.4.113353-ec:b4c1fb,os:"
  RW Version:     "lotus_v3.4.113353-ec:b4c1fb,os:"
  Current image:  RO
PD Controllers
  Right (01)
    Main   App:     0.0.30 (Notebook)
    Backup App:     0.0.30 (Notebook)
  Left  (23)
    Main   App:     0.0.30 (Notebook)
    Backup App:     0.0.30 (Notebook)
Retimers
  Unknown
CSME
  Unknown

@jabcross
Copy link

Not working for me on my newly-bought FW 13 with Intel 125H

UEFI BIOS
  Version:        03.01
  Release Date:   07/08/2024
EC Firmware
Failed to open /dev/cros_ec. Because: Os { code: 2, kind: NotFound, message: "No such file or directory" }
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', framework_lib/src/chromium_ec/cros_ec.rs:70:34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

kernel 6.10.5-arch1-1

@basert
Copy link

basert commented Sep 11, 2024

Same for me, doesnt work for me on Intel Core Ultra 165H and Fedora 40 with kernel 6.10.7-200.fc40.x86_64.

@JMartJonesy
Copy link

JMartJonesy commented Oct 10, 2024

I am also seeing that this doesn't work on my newly setup Framework 16 with NixOS with Secure boot enabled.

uname -a

Linux nixos 6.6.54 #1-NixOS SMP PREEMPT_DYNAMIC Fri Oct  4 14:30:05 UTC 2024 x86_64 GNU/Linux

I have this tool imported through nixos-hardware

sudo framework_tool --version

Tool Version Information
  Version:     0.1.0
  Built At:    Fri, 06 Sep 2024 02:26:42 +0000
  Git Commit:  ?
  Git Dirty:   ?

Should this be working for Framework 16 at this point?
If not can someone link me an issue or discussion for tracking a fix.

Edit: I see above that someone mentioned linux kernel 6.10 fixes this issue. Anyone know if upgrading to that kernel on NixOS is stable?

@niggowai
Copy link

For me it didnt work either.
I tryed a bunch of different kernels, the newest were 6.10.14 and 6.11.5
I got a Framework 16 with NixOS on it.
@kriba24 do you have a 16 too?

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

No branches or pull requests