xmm7360 / xmm7360-usb-modeswitch

Tools for the Fibocom L850-GL / Intel XMM7360 LTE modem
122 stars 21 forks source link

Here is how to do it without the acpi_call kernel module #34

Open tuxor1337 opened 2 months ago

tuxor1337 commented 2 months ago

Under Fedora 40 (kernel 6.9.6) running on a ThinkPad X1 Carbon (7th generation), I found that the use of acpi_call can be replaced by using the following line:

        echo "1" > "${path}/reset" || \
        die "Could not reset PCI"

instead of

    printf "%s" "${acpi_path}._RST" > /proc/acpi/call || \
        die "Could not reset PCI"

Obviously, you can then also skip the lines with modprobe acpi_call and you don't need to extract the $acpi_path.

jweickm commented 1 month ago

Thank you for pointing this out! I also want to get it to work on a ThinkPad X1 Carbon 7 gen and Fedora 40. However, I could not find the line you're indicating. Where in the project is the line?

tuxor1337 commented 1 month ago

See here: https://github.com/xmm7360/xmm7360-usb-modeswitch/blob/224e60c6c2147b32f4fdb09cc98259ca39dab3bd/xmm2usb#L37-L38

jweickm commented 1 month ago

Wow, thanks for the quick response. I found it now. So if understood correctly, these lines should also be deleted?

        modprobe acpi_call || \
                die "Could not load acpi_call module. Is it missing?"

and

        modem_id=${path##*/}
        read -r acpi_path < "${path}/firmware_node/path" || \
                die "Cannot read firmware node path"

        printf "Found XMM7360 modem at %s (%s)\n" "${modem_id}" "${acpi_path}" >&2
jweickm commented 1 month ago

I disabled the references to acpi_call and the acpi_path. However, when running the script as sudo ./xmm2usb on Fedora 40 (6.9.12), I get the following permission error:

Found XMM7360 modem at 0000:02:00.0 ()
Parent port is at 0000:00:1c.0
Disabling PCIe link...
pcilib: sysfs_write: write failed: Operation not permitted
OK!

Did you have to take additional steps to get it to work?

tuxor1337 commented 1 month ago

For me it just works, so I can only guess. According to this, one possible cause might be secure boot. Is secure boot enabled in your BIOS? It's disabled for me.