Framework_tool segmentation fault kubuntu 24.04.2 LTS

A brand new (received and installed the os today) framework 13 laptop running kubuntu 24.04.2 lts.

I can install and build a partially working framework_tool

sudo ./target/debug/framework_tool --info
[sudo] password for ul: 
Summary
  Is Framework: true
  Platform:     IntelCoreUltra1
BIOS Information
  Vendor:       INSYDE Corp.
  Version:      03.04
  Release Date: 10/09/2024
System Information
  Version:      Some(MassProduction) (A2)
  Manufacturer: Framework
  Product Name: Laptop 13 (Intel Core Ultra Series 1)
  Wake-Up-Type: PowerSwitch
  SKU Number:   FRANDJCP02
  Serial Number:<redacted>
  Family:       Laptop
BaseBoard Information
  Version:      Some(MassProduction) (A2)
  Manufacturer: Framework
  Product:      FRANMECP02
  Serial Number:<redacted>
System Chassis Information
  Type:         Notebook

but I’m getting seg faults for most options. For example:

sudo ./target/debug/framework_tool --charge-limit
Segmentation fault

(charge limit is currently set to 60% via bios)

Is this a good question for the forums (if so where?) or should I post on framework-system github issues?

EDIT I managed to get the following back trace:

sudo rust-gdb --args ./target/debug/framework_tool --charge-limit

...

(gdb) r
Starting program: /home/ul/tmp/framework-system/target/debug/framework_tool --charge-limit
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
warning: could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libcap.so.2

Program received signal SIGSEGV, Segmentation fault.
0x00005555556807f3 in hwio::pio::{impl#2}::write (self=0x7fffffff9a52, value=288)
    at /home/ul/.cargo/git/checkouts/rust-hwio-1ba602c57f8be0b1/9bcff42/src/pio.rs:228
228                 asm!("out dx, ax", in("ax") value, in("dx") self.port, options(nostack));
(gdb) bt
#0  0x00005555556807f3 in hwio::pio::{impl#2}::write (self=0x7fffffff9a52, value=288)
    at /home/ul/.cargo/git/checkouts/rust-hwio-1ba602c57f8be0b1/9bcff42/src/pio.rs:228
#1  framework_lib::chromium_ec::portio_mec::transfer_read (address=288, size=2)
    at framework_lib/src/chromium_ec/portio_mec.rs:173
#2  0x0000555555664f99 in framework_lib::chromium_ec::portio::init ()
    at framework_lib/src/chromium_ec/portio.rs:95
#3  0x000055555566693f in framework_lib::chromium_ec::portio::send_command (
    command=15875, command_version=0, data=&[u8](size=3) = {...})
    at framework_lib/src/chromium_ec/portio.rs:242
#4  0x00005555556acecd in framework_lib::chromium_ec::{impl#2}::send_command (
    self=0x7fffffffb7ed, command=15875, command_version=0, data=&[u8](size=3) = {...})
    at framework_lib/src/chromium_ec/mod.rs:1457
#5  0x00005555555fffe0 in framework_lib::chromium_ec::command::EcRequestRaw::send_command_vec_extra<framework_lib::chromium_ec::commands::EcRequestChargeLimitControl, framework_lib::chromium_ec::commands::EcResponseChargeLimitControl> (self=0x555555aeb97e, 
    ec=0x7fffffffb7ed, extra_data=&[u8](size=0))
    at framework_lib/src/chromium_ec/command.rs:156
#6  0x000055555561a1cc in framework_lib::chromium_ec::command::EcRequestRaw::send_command_extra<framework_lib::chromium_ec::commands::EcRequestChargeLimitControl, framework_lib::chromium_ec::commands::EcResponseChargeLimitControl> (self=0x555555aeb97e, 
    ec=0x7fffffffb7ed, extra_data=&[u8](size=0))
    at framework_lib/src/chromium_ec/command.rs:178
#7  0x00005555556159e5 in framework_lib::chromium_ec::command::EcRequestRaw::send_command<framework_lib::chromium_ec::commands::EcRequestChargeLimitControl, framework_lib::chromium_ec::commands::EcResponseChargeLimitControl> (self=0x555555aeb97e, ec=0x7fffffffb7ed)
    at framework_lib/src/chromium_ec/command.rs:170
#8  0x000055555569febe in framework_lib::chromium_ec::CrosEc::get_charge_limit (
    self=0x7fffffffb7ed) at framework_lib/src/chromium_ec/mod.rs:428
#9  0x00005555555d6e78 in framework_lib::commandline::handle_charge_limit (
    ec=0x7fffffffb7ed, maybe_limit=...) at framework_lib/src/commandline/mod.rs:1489
#10 0x00005555555cd954 in framework_lib::commandline::run_with_args (
    args=0x7fffffffdc78, _allupdate=false) at framework_lib/src/commandline/mod.rs:817
#11 0x00005555555c4f83 in framework_tool::main () at framework_tool/src/main.rs:40

Reported and resolved (at least for me) here.

kubuntu 24.04.2 lts use v6.11 kernels. The framework_tool needs >=v6.12 kernels or an appropriately patched cros_ec_lpc 6.11 lkm to function.

Apparently, 24.04 lts is scheduled to get kernel 6.14 in August with the 24.04.2 → 24.04.3 update so best wait for that or go through the pain of compiling a patched cros_ec_lpc, DKMS compliant, 6.11 loadable kernel module (and then undoing that when the kernel updates to 6.14).

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.