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

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

Open
tuxor1337 opened this issue Jun 30, 2024 · 5 comments
Open

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

tuxor1337 opened this issue Jun 30, 2024 · 5 comments

Comments

@tuxor1337
Copy link

tuxor1337 commented Jun 30, 2024

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.

@tuxor1337 tuxor1337 changed the title Here is how to do it without acpi_call module Here is how to do it without the acpi_call kernel module Jun 30, 2024
@jweickm
Copy link

jweickm commented Aug 8, 2024

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
Copy link
Author

See here:

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

@tuxor1337 tuxor1337 reopened this Aug 8, 2024
@jweickm
Copy link

jweickm commented Aug 8, 2024

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
Copy link

jweickm commented Aug 8, 2024

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
Copy link
Author

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.

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

2 participants