Skip to content

framework_tool segfaults on framework 13 Core Ultra 125H running kubuntu 24.04.2 lts #153

@stuart-nolan

Description

@stuart-nolan

I can build and partially run framework_tool on a framework 13 Intel Core Ultra Series 1 125H running kubuntu 24.04.2 LTS, kernel 6.11.0-25-generic:

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

However I get seg faults for many args. For example:

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

The charge limit is currently set to 60% via bios.

I can 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

I followed the building instructions but if I've done something silly to get here, please let me know. I am unfamiliar with rust and the inner workings of the framework bios so will be of little use fixing this. That said, I can provide additional troubleshooting and testing.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions