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

USB device not working after restart, but appears after the laptop is suspended and woken up #5

Open
kamilsamaj-accolade opened this issue Nov 7, 2019 · 10 comments

Comments

@kamilsamaj-accolade
Copy link

Hi @juhovh ,
first and foremost, BIG thanks for your project, my WWAN is finally working! I'm just having issues of not seeing the USB device right after reboot, but I have to suspend the laptop and wake it up.

That's what I did:

I followed the steps from @DDvO's issue:

make
sudo make install
sudo depmod -A
sudo modprobe xmm7360_usb
echo xmm7360_usb | sudo tee -a /etc/modules

After restart, the module gets loaded correctly, I can see it with:

$ sudo lsmod | grep xmm
xmm7360_usb            16384  0

But I still see the device being in PCI mode:

$ lspci -nnvd 8086:7360
02:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem [8086:7360] (rev ff) (prog-if ff)
	!!! Unknown header type 7f

After I suspend and wake up the laptop, the USB device appears:

$ lsusb | grep Fibocom
Bus 001 Device 007: ID 2cb7:0007 Fibocom MBIM + 3 CDC-ACM

and of course the lspci doesn't see the device anymore:

$ lspci -nnvd 8086:7360
$

Just for clarity, I unlocked the FCC and switched to USB with:

at@nvm:fix_cat_fcclock.fcclock_mode?
at@nvm:fix_cat_fcclock.fcclock_mode=0
at@store_nvm(fix_cat_fcclock)
AT+GTUSBMODE?
AT+GTUSBMODE=7
AT+CFUN?
AT+CFUN=15

Would you know why I don't see it immediately after the restart, please? I'm guessing it's a wrong order of loading modules but I don't know how to troubleshoot that.

Thanks a lot.
Kamil

@DDvO
Copy link

DDvO commented Nov 8, 2019

I'm confused.
After normal startup and also after resume after suspend or hibernate, I get the following:
lspci -nnvd 8086:7360 says

3b:00.0 Wireless controller [0d40]: Intel Corporation Device [8086:7360] (rev ff) (prog-if ff)
	!!! Unknown header type 7f
	Kernel driver in use: xmm7360_usb

while lsusb | grep -E "Fibocom|Intel" just gives

Bus 001 Device 004: ID 8087:0aaa Intel Corp. 

so the modem appears via its PCI interface (only)?

On the other hand ls /dev/{ttyA*,cdc*} shows

/dev/cdc-wdm0  /dev/ttyACM0  /dev/ttyACM1  /dev/ttyACM2

which means that the modem is usable.

@DDvO
Copy link

DDvO commented Nov 8, 2019

I have a possibly related issue:
After a fresh startup and after resume from suspend I get a connection immediately,
yet after resume from hibernate the ModemManager shows it as 'disabled'.
sudo mmcli -m 2 --enable enables it, but then the ModemManager shows it just as 'registered' (not: connected) and the NetworkManager menu shows my bearer (Vodafone.de LTE) greyed out.
nmcli conn up UMTS fails with the rather silly message

Error: Connection activation failed: No suitable device found for this connection (device cdc-wdm0 not available because device is not available).

even when /dev/cdc-wdm0 is still there, while sometimes it changes to /dev/cdc-wdm1.
When I then suspend & resume, the modem appears as disabled again.
It looks like there is a hick-up, e.g., in the ModemManager. The modem itself can be used to connect, e.g., using wvdial.

@kamilsamaj-accolade
Copy link
Author

kamilsamaj-accolade commented Nov 8, 2019

Thanks @DDvO for sharing details. After fresh reboot, I don't see the USB device, so I'm not even seeing the modem devices:

After fresh reboot:

sudo ls /dev/{ttyA*,cdc*}
ls: cannot access '/dev/ttyA*': No such file or directory
ls: cannot access '/dev/cdc*': No such file or directory

But I see the WWAN as the PCI device still:

lspci -nnvd 8086:7360
02:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem [8086:7360] (rev ff) (prog-if ff)
	!!! Unknown header type 7f

My kernel also complains about a missing signing certificate during sudo make install but eventually the module gets loaded. SecureBoot is disabled btw.

sudo make install

make -C /lib/modules/5.3.0-19-generic/build M=/home/kamil.samaj/git_sources/xmm7360_usb modules_install
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-19-generic'
  INSTALL /home/accprod1.local/kamil.samaj/git_sources/xmm7360_usb/xmm7360_usb.ko
At main.c:160:
- SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:72
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:79
sign-file: certs/signing_key.pem: No such file or directory
  DEPMOD  5.3.0-19-generic
Warning: modules_install: missing 'System.map' file. Skipping depmod.
make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-19-generic'

From my dmesg:

[   14.073905] xmm7360_usb: loading out-of-tree module taints kernel.
[   14.073920] xmm7360_usb: module verification failed: signature and/or required key missing - tainting kernel
[   14.073998] xmm7360_usb: Found a PCI device 8086:7360
[   14.074001] xmm7360_usb: Link status changed, trying to reset the device
[   14.074006] xmm7360_usb: Failed to reset the ACPI companion device
[   14.074010] xmm7360_usb: probe of 0000:02:00.0 failed with error -1

First I was wondering if my ACPI works, but it seems ok:
dmesg | grep -i 'acpi'

[    0.000000] BIOS-e820: [mem 0x000000006fac2000-0x000000006fca9fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x000000006fcaa000-0x000000006fd0efff] ACPI data
[    0.000000] efi:  TPMFinalLog=0x6fca2000  SMBIOS=0x6de55000  SMBIOS 3.0=0x6de48000  ACPI=0x6fd0e000  ACPI 2.0=0x6fd0e014  MEMATTR=0x6890e018  ESRT=0x6c241000 
[    0.013787] ACPI: Early table checksum verification disabled
[    0.013791] ACPI: RSDP 0x000000006FD0E014 000024 (v02 LENOVO)
[    0.013796] ACPI: XSDT 0x000000006FD0C188 000114 (v01 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013804] ACPI: FACP 0x000000006DC63000 000114 (v06 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013811] ACPI: DSDT 0x000000006DC36000 028AA8 (v02 LENOVO CFL      20170001 INTL 20160422)
[    0.013815] ACPI: FACS 0x000000006FB07000 000040
[    0.013819] ACPI: SSDT 0x000000006DCB8000 001B26 (v02 LENOVO CpuSsdt  00003000 INTL 20160527)
[    0.013823] ACPI: SSDT 0x000000006DCB7000 00056D (v02 LENOVO CtdpB    00001000 INTL 20160527)
[    0.013827] ACPI: SSDT 0x000000006DC7F000 003ED3 (v02 LENOVO DptfTabl 00001000 INTL 20160527)
[    0.013831] ACPI: SSDT 0x000000006DC68000 00330A (v02 LENOVO SaSsdt   00003000 INTL 20160527)
[    0.013834] ACPI: SSDT 0x000000006DC67000 000612 (v02 LENOVO Tpm2Tabl 00001000 INTL 20160527)
[    0.013838] ACPI: TPM2 0x000000006DC66000 000034 (v04 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013842] ACPI: UEFI 0x000000006FB24000 000042 (v01 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013845] ACPI: SSDT 0x000000006DC64000 000530 (v02 LENOVO PerfTune 00001000 INTL 20160527)
[    0.013849] ACPI: HPET 0x000000006DC62000 000038 (v01 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013853] ACPI: APIC 0x000000006DC61000 00012C (v03 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013857] ACPI: MCFG 0x000000006DC60000 00003C (v01 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013860] ACPI: ECDT 0x000000006DC5F000 000053 (v01 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013864] ACPI: SSDT 0x000000006DC35000 000024 (v02 LENOVO PID1Ssdt 00000010 INTL 20160527)
[    0.013868] ACPI: SSDT 0x000000006DC33000 0014C0 (v02 LENOVO ProjSsdt 00000010 INTL 20160527)
[    0.013871] ACPI: BOOT 0x000000006DC32000 000028 (v01 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013875] ACPI: SLIC 0x000000006DC31000 000176 (v01 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013879] ACPI: SSDT 0x000000006DC2F000 000EF6 (v02 LENOVO UsbCTabl 00001000 INTL 20160527)
[    0.013886] ACPI: LPIT 0x000000006DC2E000 000094 (v01 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013891] ACPI: WSMT 0x000000006DC2D000 000028 (v01 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013897] ACPI: SSDT 0x000000006DC2B000 001983 (v02 LENOVO TbtTypeC 00000000 INTL 20160527)
[    0.013902] ACPI: DBGP 0x000000006DC2A000 000034 (v01 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013905] ACPI: DBG2 0x000000006DC29000 000054 (v00 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013909] ACPI: MSDM 0x000000006DC28000 000055 (v03 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013913] ACPI: BATB 0x000000006DA4B000 00004A (v02 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013916] ACPI: DMAR 0x000000006C244000 0000A8 (v01 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013920] ACPI: NHLT 0x000000006C242000 00184A (v00 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013924] ACPI: FPDT 0x000000006C240000 000044 (v01 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013927] ACPI: UEFI 0x000000006FB01000 00013E (v01 LENOVO TP-N2H   00001230 PTEC 00000002)
[    0.013931] ACPI: BGRT 0x000000006C23F000 000038 (v01 LENOVO TP-N2H   00001230 PTEC 00001230)
[    0.013942] ACPI: DMI detected: Lenovo ThinkPad X1 Carbon
[    0.013945] ACPI: Local APIC address 0xfee00000
[    0.116775] ACPI: PM-Timer IO Port: 0x1808
[    0.116777] ACPI: Local APIC address 0xfee00000
[    0.116787] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[    0.116788] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
[    0.116789] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1])
[    0.116789] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1])
[    0.116790] ACPI: LAPIC_NMI (acpi_id[0x05] high edge lint[0x1])
[    0.116791] ACPI: LAPIC_NMI (acpi_id[0x06] high edge lint[0x1])
[    0.116792] ACPI: LAPIC_NMI (acpi_id[0x07] high edge lint[0x1])
[    0.116793] ACPI: LAPIC_NMI (acpi_id[0x08] high edge lint[0x1])
[    0.116794] ACPI: LAPIC_NMI (acpi_id[0x09] high edge lint[0x1])
[    0.116794] ACPI: LAPIC_NMI (acpi_id[0x0a] high edge lint[0x1])
[    0.116795] ACPI: LAPIC_NMI (acpi_id[0x0b] high edge lint[0x1])
[    0.116796] ACPI: LAPIC_NMI (acpi_id[0x0c] high edge lint[0x1])
[    0.116797] ACPI: LAPIC_NMI (acpi_id[0x0d] high edge lint[0x1])
[    0.116798] ACPI: LAPIC_NMI (acpi_id[0x0e] high edge lint[0x1])
[    0.116799] ACPI: LAPIC_NMI (acpi_id[0x0f] high edge lint[0x1])
[    0.116800] ACPI: LAPIC_NMI (acpi_id[0x10] high edge lint[0x1])
[    0.116852] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.116853] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.116855] ACPI: IRQ0 used by override.
[    0.116856] ACPI: IRQ9 used by override.
[    0.116859] Using ACPI (MADT) for SMP configuration information
[    0.116861] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[    0.218856] ACPI: Core revision 20190703
[    0.273740] PM: Registering ACPI NVS region [mem 0x6fac2000-0x6fca9fff] (1998848 bytes)
[    0.275647] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[    0.275647] ACPI: bus type PCI registered
[    0.275647] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[    0.279592] ACPI: Added _OSI(Module Device)
[    0.279592] ACPI: Added _OSI(Processor Device)
[    0.279592] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.279592] ACPI: Added _OSI(Processor Aggregator Device)
[    0.279592] ACPI: Added _OSI(Linux-Dell-Video)
[    0.279592] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    0.279592] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
[    0.279592] ACPI: Deleted _OSI(Windows 2012)
[    0.378950] ACPI: 11 ACPI AML tables successfully acquired and loaded
[    0.381237] ACPI: EC: EC started
[    0.381238] ACPI: EC: interrupt blocked
[    0.384201] ACPI: \: Used as first EC
[    0.384203] ACPI: \: GPE=0x16, EC_CMD/EC_SC=0x66, EC_DATA=0x62
[    0.384204] ACPI: EC: Boot ECDT EC used to handle transactions
[    0.386684] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[    0.466378] ACPI: Dynamic OEM Table Load:
[    0.466398] ACPI: SSDT 0xFFFF985BADF4D300 0000F4 (v02 PmRef  Cpu0Psd  00003000 INTL 20160527)
[    0.468581] ACPI: \_SB_.PR00: _OSC native thermal LVT Acked
[    0.470319] ACPI: Dynamic OEM Table Load:
[    0.470330] ACPI: SSDT 0xFFFF985BADF59800 000400 (v02 PmRef  Cpu0Cst  00003001 INTL 20160527)
[    0.472696] ACPI: Dynamic OEM Table Load:
[    0.472707] ACPI: SSDT 0xFFFF985BAE335000 00053F (v02 PmRef  Cpu0Ist  00003000 INTL 20160527)
[    0.475207] ACPI: Dynamic OEM Table Load:
[    0.475216] ACPI: SSDT 0xFFFF985BADF62E00 000149 (v02 PmRef  Cpu0Hwp  00003000 INTL 20160527)
[    0.477429] ACPI: Dynamic OEM Table Load:
[    0.477441] ACPI: SSDT 0xFFFF985BAE336000 000724 (v02 PmRef  HwpLvt   00003000 INTL 20160527)
[    0.480184] ACPI: Dynamic OEM Table Load:
[    0.480196] ACPI: SSDT 0xFFFF985BAE332000 0005FC (v02 PmRef  ApIst    00003000 INTL 20160527)
[    0.482702] ACPI: Dynamic OEM Table Load:
[    0.482711] ACPI: SSDT 0xFFFF985BADF5E000 000317 (v02 PmRef  ApHwp    00003000 INTL 20160527)
[    0.485261] ACPI: Dynamic OEM Table Load:
[    0.485272] ACPI: SSDT 0xFFFF985BAE95F000 000AB0 (v02 PmRef  ApPsd    00003000 INTL 20160527)
[    0.488806] ACPI: Dynamic OEM Table Load:
[    0.488817] ACPI: SSDT 0xFFFF985BADF5F400 00030A (v02 PmRef  ApCst    00003000 INTL 20160527)
[    0.496178] ACPI: Interpreter enabled
[    0.496259] ACPI: (supports S0 S3 S4 S5)
[    0.496263] ACPI: Using IOAPIC for interrupt routing
[    0.498529] PCI: MMCONFIG at [mem 0xf0000000-0xf7ffffff] reserved in ACPI motherboard resources
[    0.498545] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.499447] ACPI: Enabled 8 GPEs in block 00 to 7F
[    0.505385] ACPI: Power Resource [PUBS] (on)
[    0.510356] ACPI: Power Resource [USBC] (on)
[    0.527047] ACPI: Power Resource [V0PR] (on)
[    0.527381] ACPI: Power Resource [V1PR] (on)
[    0.527711] ACPI: Power Resource [V2PR] (on)
[    0.534787] ACPI: Power Resource [WRST] (on)
[    0.540028] ACPI: Power Resource [PIN] (off)
[    0.540070] ACPI: Power Resource [PINP] (off)
[    0.541016] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-7e])
[    0.541025] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI HPX-Type3]
[    0.541403] acpi PNP0A08:00: _OSC: platform does not support [PCIeHotplug SHPCHotplug PME AER PCIeCapability]
[    0.541583] acpi PNP0A08:00: _OSC: not requesting control; platform does not support [PCIeCapability]
[    0.541586] acpi PNP0A08:00: _OSC: OS requested [PCIeHotplug SHPCHotplug PME AER PCIeCapability LTR]
[    0.541587] acpi PNP0A08:00: _OSC: platform willing to grant [LTR]
[    0.541588] acpi PNP0A08:00: _OSC failed (AE_SUPPORT); disabling ASPM
[    0.586214] ACPI: EC: interrupt unblocked
[    0.586238] ACPI: EC: event unblocked
[    0.586256] ACPI: \_SB_.PCI0.LPCB.EC__: GPE=0x16, EC_CMD/EC_SC=0x66, EC_DATA=0x62
[    0.586258] ACPI: \_SB_.PCI0.LPCB.EC__: Boot DSDT EC used to handle transactions and events
[    0.586358] ACPI: bus type USB registered
[    0.607651] PCI: Using ACPI for IRQ routing
[    0.636401] pnp: PnP ACPI init
[    0.636601] system 00:00: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.637179] system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.637693] system 00:02: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.638359] system 00:03: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.638569] system 00:04: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active)
[    0.638600] pnp 00:05: Plug and Play ACPI device, IDs LEN0071 PNP0303 (active)
[    0.638626] pnp 00:06: Plug and Play ACPI device, IDs LEN0300 PNP0f13 (active)
[    0.638772] system 00:07: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.640875] system 00:08: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.641984] system 00:09: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.642579] system 00:0a: Plug and Play ACPI device, IDs PNP0c01 (active)
[    0.642758] pnp: PnP ACPI: found 11 devices
[    0.648935] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[    0.963670] ACPI: AC Adapter [AC] (on-line)
[    0.963796] ACPI: Sleep Button [SLPB]
[    0.963848] ACPI: Lid Switch [LID]
[    0.963906] ACPI: Power Button [PWRF]
[    0.970075] ACPI: Thermal Zone [THM0] (67 C)
[    0.998268] battery: ACPI: Battery Slot [BAT0] (battery present)
[    1.100909] acpi device:3f: hash matches
[    1.194196] acpi PNP0C14:02: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:01)
[    1.194267] acpi PNP0C14:03: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:01)
[    1.194413] acpi PNP0C14:04: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:01)
[    1.194507] acpi PNP0C14:05: duplicate WMI GUID 05901221-D566-11D1-B2F0-00A0C9062910 (first instance was on PNP0C14:01)
[    1.354420] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
[   14.074006] xmm7360_usb: Failed to reset the ACPI companion device
[   14.312544] thinkpad_acpi: ThinkPad ACPI Extras v0.26
[   14.312545] thinkpad_acpi: http://ibm-acpi.sf.net/
[   14.312546] thinkpad_acpi: ThinkPad BIOS N2HET40W (1.23 ), EC N2HHT27W
[   14.312546] thinkpad_acpi: Lenovo ThinkPad X1 Carbon 7th, model 20QDS0T800
[   14.314967] thinkpad_acpi: radio switch found; radios are enabled
[   14.315041] thinkpad_acpi: Tablet mode switch found (type: GMMS), currently in laptop mode
[   14.315054] thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver
[   14.315054] thinkpad_acpi: Disabling thinkpad-acpi brightness events by default...
[   14.336638] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is unblocked
[   14.337870] thinkpad_acpi: rfkill switch tpacpi_wwan_sw: radio is blocked
[   14.361642] thinkpad_acpi: Standard ACPI backlight interface available, not loading native one
[   14.374715] thinkpad_acpi: battery 1 registered (start 70, stop 85)
[   14.374753] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input10

@kamilsamaj-accolade
Copy link
Author

I think the whole issue is in the ACPI reset call. Following the original xmm2usb script, I was able to issue successfully:
sudo setpci -s 0000:00:1c.0 "CAP_EXP+10.w=0052"

But the ACPI call is failing:
printf '\_SB_.PCI0.RP01.PXSX._RST' | sudo tee /proc/acpi/call

with this error in dmesg:
acpi_call: Cannot get handle: Error: AE_NOT_FOUND

So I think the suspect/resume basically does what this ACPI call should do. But I still don't know why, the acpi_call module seems to be working correctly:

$ lsmod | grep acpi_call
acpi_call              16384  0

@neurotensin
Copy link

@juhovh
A nice advance! I have a p53 and I have been working with @abrasive , but so far no luck.
I took your module and made it a dkms so that it passes secure boot and also "Lockdown" (Ubuntu/Debian)

I have tried suspending etc and banging on all sorts of the ACPI space with no luck. On the other thread [(https://github.com/xmm7360/xmm7360-usb-modeswitch/issues/2)] there is my DSDT decompiled.

I'll keep trying but if I've missed anything obvious it would be nice to know.

@juhovh
Copy link
Owner

juhovh commented Nov 10, 2019

@neurotensin Do you have a link to the DKMS scripts? I could add them here as well.

@kamilsamaj-accolade I'm not really that surprised if ACPI reset doesn't work for all systems, ACPI is occasionally a bit of a mess. The acpi_call module is just forwarding commands it receives to the ACPI interface, so if ACPI fails to send reset the module itself can still work just fine.

@neurotensin
Copy link

@juvoh I pasted my mini "tutorial" on the other thread - feel free to add it - I also did one for acpi_call ,simply regexp $MODULE_NAME and it works. All though both modules need to add "depmod -A" in the Makefile's "install" clause (after the install), as it's need to get the symbols into the kernel.

@neurotensin
Copy link

To make this module work correctly it needs to handle powerstates -I found a curious error message on the other thread

If you could add something to module so that when it sleeps/goes off , it doesn't wake up - the module keeps the PCI address but also propagates a wakeup cascade - ideally it would stay off and perhaps the USB interface would be activated as power is restored.

@paaland
Copy link

paaland commented Nov 10, 2019

Lenovo Thinkpad P53 here. Not having much luck:

[   21.865486] xmm7360_usb: Found a PCI device 8086:7360
[   21.865493] xmm7360_usb: Link status changed, trying to reset the device
[   22.883766] xmm7360_usb: Device reset successfully
[  122.508622] xmm7360_usb 0000:53:00.0: Refused to change power state, currently in D3
[  123.918674] xmm7360_usb: Found a PCI device 8086:7360
[  123.918685] xmm7360_usb: Link status changed, trying to reset the device
[  124.211456] xmm7360_usb: Device reset successfully
[  124.211742] pci 0000:53:00.0: Removing from iommu group 9
[  124.216845] pci 0000:53:00.0: [8086:7360] type 00 class 0x0d4000
[  124.216915] pci 0000:53:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]
[  124.216941] pci 0000:53:00.0: reg 0x18: [mem 0x00000000-0x000003ff 64bit]
[  124.216998] pci 0000:53:00.0: Max Payload Size set to 256 (was 128, max 256)
[  124.217147] pci 0000:53:00.0: runtime PM trying to activate child device 0000:53:00.0 but parent (0000:00:1c.6) is not active
[  124.217172] pci 0000:53:00.0: PME# supported from D0 D3hot D3cold
[  124.217393] pci 0000:53:00.0: Adding to iommu group 9
[  124.217403] pci 0000:53:00.0: DMAR: Device uses a private identity domain.
[  124.217836] pci 0000:53:00.0: BAR 0: assigned [mem 0xee200000-0xee200fff 64bit]
[  124.217863] pci 0000:53:00.0: BAR 2: assigned [mem 0xee201000-0xee2013ff 64bit]
[  124.217976] xmm7360_usb: Found a PCI device 8086:7360
[  124.217981] xmm7360_usb: Link status changed, trying to reset the device
[  124.955359] xmm7360_usb: Device reset successfully

Device only shows as PCI device. Not /dev/ttyAMA devices found. Suspend/resume not help.

$ lspci|grep -i xmm
53:00.0 Wireless controller [0d40]: Intel Corporation XMM7360 LTE Advanced Modem (rev ff)

@neurotensin
Copy link

@paaland I have the same results - I suspect the P53 has a more enterprise devices has some hotplug/docking features that wakes everything up. But the good news is I have isolated the following:

  1. When going to sleep the xmm7360 definitely is turned off and on again - I have completely disable the PCI and it comes back to life - but - ONLY with the xmm7360_usb attached.

  2. The link gets re-established on suspect/resume, suggesting all devices get refreshed if xmm7360_usb is removed before suspend.

It might be possible to change the PCI routing in the DSDT to permanently disconnect the 00:53 link so it survives a suspend, but I am no expert, though I know where to look (PD06 or AR06 depending on interrupt choices)

I've ordered some Kapton tape as a final backup...

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

5 participants