-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Do not work on Lenovo P52 with Ubuntu 18.04 #2
Comments
Hmm, I wonder where this is going wrong.
Then after running the script, the output of When you're pasting the output in the issue here, please fence the output of each command with three backticks on each side, so that it makes a nice readable code block:
That will avoid having Github interpret the text in there as formatting codes. |
Same issue here (HP Elitebook 840 G5, Ubuntu 18.04):
Running the script:
Checking the result:
|
No changes after upgrade to Ubuntu 19.10 |
Hi, I just got Lenovo p53 with the XMM7360 , tried your code , no real luck, though different setpci managed to get the PCI device to dissappear, but no USB device appears. As an aside, Intel might be adding an official way of suspending a PCI link related to their FPGA group leaving just the ACPI call - check out : https://patchwork.kernel.org/patch/10966775/ Here is my lsusb -t and -v, I'm getting a sim soon, incase that stops it working. lsusb -t lsusb -v Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 06cb:00bd Synaptics, Inc. Bus 001 Device 002: ID 13d3:56bc IMC Networks Integrated Camera Bus 001 Device 005: ID 8087:0029 Intel Corp. Bus 001 Device 004: ID 056a:51e9 Wacom Co., Ltd Pen and multitouch sensor Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub |
There are two things this might be:
I'm assuming it's not the former - the P52 is available with an L830 modem, right? Which is USB only. On my T490, there is more than one way to affect the card: there are also ACPI methods to turn the power on and off. For example, the reset method is
When I screwed up my card so my laptop wouldn't boot, I had to pull the card, then boot the laptop. After that, when I hotplugged the card, it wasn't detected. By calling the So maybe try calling those on your machine, eg.
Keep an eye on dmesg whilst doing so - if the methods don't exist you will get a helpful error. They may be somewhere else or under another name. I also had |
The RP07 call passes acpi_call Running _SB.PCI0.RP07.PXSX._RST does seem to "pause" , so I think it must be doing something
real 0m0.958s I have the windows driver from HP I "unwrapped", though not sure what to look for, ndiswrapper did recover the USB ids. |
You need to use the correct ACPI path for your actual modem. RPxx is which
PCIe root port the modem is connected to. What does the xmm2usb script print?
|
Well once the PCI disappears the script doesn't find it. I did save the output initially.
ignore the "write failed" , I have since used sysrq+x to disable the lockdown stuff... I dumped my DSDT so that key is present in some form. Been a few years since I hacked ACPI...
|
These seem to be wired up: |
here is the relevant decompiled dsl from the lenovo p53: |
Cool. If you cruise down the tables you'll find
```
Scope (\_SB.PCI0.RP07)
{
```
Have a look inside there. I see `PON` and `POFF` methods, and nested
a bit deeper there are `PXP._ON` and `PXP._OFF` methods as well.
The `PXSX._RST` method looks (to a quick eyeball) very similar to
that in the T490, I wonder if maybe they just didn't bother to
connect the physical reset line? In which case power-cycling via
`POFF`/`PON` may be what you need.
|
I tried resetting my T490's modem by issuing:
```
echo '\_SB.PCI0.RP07.POFF' | sudo tee /proc/acpi/call
echo '\_SB.PCI0.RP07.PON' | sudo tee /proc/acpi/call
```
But nothing happened.
I was then successful in resetting it like this:
```
echo '\_SB.PCI0.RP07.PXP._OFF' | sudo tee /proc/acpi/call
echo '\_SB.PCI0.RP07.PXP._ON' | sudo tee /proc/acpi/call
```
I don't know if the former incantation is necessary - I'm not able to
reboot it right now to try from cold.
…On Mon, Nov 04, 2019 at 01:59:53AM -0800, neurotensin wrote:
here is the relevant decompiled dsl from the lenovo p53:
[Lenovo-P53-XMM3760-DSDT.TXT](https://github.com/abrasive/xmm7360/files/3803400/Lenovo-P53-XMM3760-DSDT.TXT)
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#2 (comment)
|
Hmm ok I rebooted to clean state - disabled sysrq-x, ran your script. and added the above. Thing is my PCI device is still present, and so I might have to wait for it to go away... I'm assuming the device will disappear, is this correct? |
ahh , so it is off: Still no joy with the USB. I've tried "knocking" on a few of those handles. |
I put my Google Fi sim in , activated it online, enter the APN info incase the device appears, reboot and retried - no luck so far, even though it looks as if it should behave the same as yours. There's another device in the DSDT , RP01 that has PIN args, so a few Q's:
|
This is my pci state of the device after boot. You setpci command, I think, changed this: Anyway, compare this with yours incase there's some funky PCI/USB thing going on. I doubt there's a PCI driver, I looked in HP's driver and it is USB as well. |
There's another device in the DSDT , RP01 that has PIN args, so a few Q's:
1) is it possible to send args and get a response via acpi_call? There are some diag calls.
Yeah, you can `sudo cat /proc/acpi/call` to get the response, for
certain types of response.
2) what is RP01 for?
Depends on your machine! Try this to get a map:
```
cd /sys/bus/pci/devices
for dev in *
do
if [ -f $dev/firmware_node/path ]
then
echo -n "$dev: "
cat $dev/firmware_node/path
fi
done
```
…
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#2 (comment)
|
0000:00:01.0: _SB_.PCI0.PEG0 |
RP01 is on one of the thunderbolt bridges - so that might mean it is how its routed. |
ok _ON returns 0x1 , as does STA , so I have not yet disconnected the PCI link but we know it is up. |
_RST returns 0x1 as well, which in the DSDT is passed back via: |
It seems there are some tests for device presence: So I don't get whats wrong since _ON returns 0x1. Any thoughts on how to narrow this down? |
i made a discovery - using disables the PCI link in a reversible manner. It becomes unresponsive (i.e. !!! Unknown header type 7f ), but when I applied echo '_SB.PCI0.RP07.PXP._ON' | sudo tee /proc/acpi/call , it reappeared. using your setpci it never reappears changing back =0x42. What do you think is going on here? |
I probed the VDID and this is what I got (!=0xFFFFFFFF) - since the DSDT is specifically looking for "VDID == 0x73608086" , I wonder if that appears when the USB gets activated. Since you have working system , could you scan your devices VDID please? |
I manged to Boot the modem after boot, using Fn-8 to toggle the wireless and then issue acpi_call: '_SB.PCI0.RP07.PXP._ON' Proof the modem has started, the subsystem appears (8086:0020), and the config changes:
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- SERR- I then tried running "xmm2usb" but no further progress, usb was not activated. This seems like progress, not sure where to go next.... |
@abrasive I have the Fibrocom 850-GL hardware manual - your approach is definitely (no PCIe, USB is setup) right but we need to do it before the PCIe port is setup. It's possible that it is sufficient to power of the device, disable the link, then power it on with PCIe off. Does this seem plausible? |
It does. You should try it.
… |
I already did - I made it a DKMS modules (like your ACPI_CALL) so it can stay locked down , but no joy. I tried to put the setpci in grub, but I think the secure boot is stopping it - I might have to try a UEFI disabled boot , but that is far from ideal - this is a business laptop and must stay secure. |
Would you please post your " lspci -vvnn" of the bridge when the modem is working? I'd like to rule out the PCI flags before I chase down a) -UEFI b) Lenvo BIOS block. |
On the topic of bios whitelists I just added P52 to the list of bioses I checked over here: #3 (comment) Lenovo ThinkPad P52/P72 System Firmware N2CET46W, version 1.29Bios Link: https://support.lenovo.com/us/en/downloads/ds504024 (n2cet46w.cab) Whitelist entities: 2
1802 Message String: Vendor ID:
1802 Message String: Vendor ID: I hope it helps! |
I just upgrade my P53 to N2NET31P (1.16) , but as far as I know the modem is supported - it shows both 8086:7360 and the 8086:0020, and is in the BIOS to be deactivated by IOPORTs. I just cant get the USB interface active - I think the link being deactivated might need something else - I'm pretty sure the acpi off/on are working, as it disables the PCI interface too - but of course, the device isn't active. |
Ah, you said P52 above a couple of times.. P53 is different. I can't speak to the ACPI issue, but here's the whitelist: Lenovo ThinkPad P53/P73 System Firmware N2NET31P, version 1.16Bios Link: https://support.lenovo.com/us/en/downloads/ds540999 (n2nul06w.zip) Whitelist entities: 3
1802 Message String: Vendor ID:
1802 Message String: Vendor ID:
1802 Message String: Vendor ID: |
yep. That's what I have! The Bios supports the modem as it is sold this way - I have the hardware manual and the modem supports Linux/Android but only when the PCIe is dead on boot, otherwise it wipes the USB away. Clearly this is supposed to be a bios mod, however we can restart the device via ACPI and may the link trick will work. In the P53 Bios there is an option to disable "IOports" for WWAN, but that seems to kill the upstream device (00:1c.6 in my machine - (PCI device 8086:a338 for topology) |
DKMS - need to build properly for "UEFI/LockDown" Make sure the source is in /usr/src/$MODULE_NAME-$MODULE_VERSION Here's the dkms.conf for "acpi_call" - it's really generic. MAKE="make -C./ KERNELDIR=/lib/modules/${kernelver}/build" |
Lenovo P52
And nothing shows up in dmesg or lsusb Also, how exactly are you sending at commands? I don't think I have the program installed for that. |
@abrasive I've discovered a bit more about the DSDT. The variable in LCTL is the link control from the modem to the bridge. When I did setpci -s 0000:53:00 CAP_EXP+10.w it replied 0x142 If you look at my DSDT it returns that on variable NEXP, which I am guessing is "PCIE connected?". Else is Could you please try the equivalent setpci on your machine when the modem is visible and working and see value it yields? If this is how the machine survives power suspect/wake without disrupting the modem, it may be possible to do the reverse. |
Here's that block:
The simplest , and safest thing todo would be to copy the ==0 block as the default. Hence, the LCTL is never set to that value ,but is instead kept off. This is why the P53 doesn't survive the sleep-wake that works for the P52. The PCI link is refreshed on wake up - which is fine when you want the wifi , not so good when you need it to stay off!! Any thoughts? |
@neurotensin @abrasive Hi guys, |
Hello,
here is the output of the command:
ar@reinhards-P52:
/xmm7360$ sudo ./xmm2usb/xmm7360$Found XMM7360 modem at 0000:03:00.0 (_SB_.PCI0.RP21.PXSX)
Parent port is at 0000:00:1b.4
Disabling PCIe link...
Resetting modem...
OK!
ar@reinhards-P52:
Here is, what dmesg -w says:
[ 110.188938] No Local Variables are initialized for Method [_PLD]
[ 110.188940] No Arguments are initialized for method [_PLD]
[ 110.188943] ACPI Error: Method parse/execution failed _SB.UBTC.CR01.PLD, AE_NOT_FOUND (20170831/psparse-550)
[ 110.188953] ACPI Error: Method parse/execution failed _SB.UBTC.RUCC, AE_NOT_FOUND (20170831/psparse-550)
[ 110.188962] ACPI Error: Method parse/execution failed _SB.PCI0.RP01.PXSX.TBDU.XHC.RHUB.FPCP, AE_NOT_FOUND (20170831/psparse-550)
[ 110.188972] ACPI Error: Method parse/execution failed _SB.PCI0.RP01.PXSX.TBDU.XHC.RHUB.SS01.PLD, AE_NOT_FOUND (20170831/psparse-550)
[ 110.189274] ACPI Error: [_SB.PCI0.XHC.RHUB.HS07._PLD] Namespace lookup failure, AE_NOT_FOUND (20170831/psargs-364)
[ 110.189292] No Local Variables are initialized for Method [_PLD]
[ 110.189295] No Arguments are initialized for method [_PLD]
[ 110.189298] ACPI Error: Method parse/execution failed _SB.UBTC.CR02._PLD, AE_NOT_FOUND (20170831/psparse-550)
[ 110.189310] ACPI Error: Method parse/execution failed _SB.UBTC.RUCC, AE_NOT_FOUND (20170831/psparse-550)
[ 110.189324] ACPI Error: Method parse/execution failed _SB.PCI0.RP01.PXSX.TBDU.XHC.RHUB.FPCP, AE_NOT_FOUND (20170831/psparse-550)
[ 110.189338] ACPI Error: Method parse/execution failed _SB.PCI0.RP01.PXSX.TBDU.XHC.RHUB.SS02._PLD, AE_NOT_FOUND (20170831/psparse-550)
[ 110.326655] pci_bus 0000:05: Allocating resources
[ 150.198278] dpc 0000:00:1c.0:pcie010: DPC containment event, status:0x1f00 source:0x0000
[ 150.198283] pciehp 0000:00:1c.0:pcie004: Slot(0-1): Link Down
[ 150.198996] xhci_hcd 0000:3b:00.0: remove, state 4
[ 150.199001] usb usb4: USB disconnect, device number 1
[ 150.199200] xhci_hcd 0000:3b:00.0: USB bus 4 deregistered
[ 150.199212] xhci_hcd 0000:3b:00.0: xHCI host controller not responding, assume dead
[ 150.199214] xhci_hcd 0000:3b:00.0: remove, state 4
[ 150.199217] usb usb3: USB disconnect, device number 1
[ 150.199363] xhci_hcd 0000:3b:00.0: Host halt failed, -19
[ 150.199364] xhci_hcd 0000:3b:00.0: Host not accessible, reset failed.
[ 150.199424] xhci_hcd 0000:3b:00.0: USB bus 3 deregistered
[ 150.699990] thunderbolt 0000:06:00.0: stopping RX ring 0
[ 150.700003] thunderbolt 0000:06:00.0: disabling interrupt at register 0x38200 bit 12 (0xffffffff -> 0xffffefff)
[ 150.700011] thunderbolt 0000:06:00.0: stopping TX ring 0
[ 150.700029] thunderbolt 0000:06:00.0: disabling interrupt at register 0x38200 bit 0 (0xffffffff -> 0xfffffffe)
[ 150.700032] thunderbolt 0000:06:00.0: control channel stopped
[ 150.700095] thunderbolt 0000:06:00.0: freeing RX ring 0
[ 150.700104] thunderbolt 0000:06:00.0: freeing TX ring 0
[ 150.700111] thunderbolt 0000:06:00.0: shutdown
[ 150.700560] pci_bus 0000:06: busn_res: [bus 06] is released
[ 150.700603] pci_bus 0000:07: busn_res: [bus 07-3a] is released
[ 150.714204] pci_bus 0000:3b: busn_res: [bus 3b] is released
[ 150.714303] pci_bus 0000:3c: busn_res: [bus 3c-6e] is released
[ 150.714368] pci_bus 0000:05: busn_res: [bus 05-6e] is released
The text was updated successfully, but these errors were encountered: