You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ 407.185520] r8152-cfgselector 5-1: USB disconnect, device number 2
[ 407.216411] firmware_class:__free_fw_priv: firmware_class: __free_fw_priv: fw-rtl_nic/rtl8153a-3.fw fw_priv=000000006b97e10a data=00000000803d95d2 size=1440
[ 407.240122] firmware_class:fw_name_devm_release: firmware_class: fw_name_devm_release: fw_name-rtl_nic/rtl8153a-3.fw devm-000000005ee3e6a4 released
[ 442.194004] usb 5-1: new full-speed USB device number 3 using xhci-hcd
[ 442.362830] usb 5-1: not running at top speed; connect to a high speed hub
[ 442.389990] usb 5-1: New USB device found, idVendor=25a4, idProduct=9311, bcdDevice= 2.01
[ 442.390029] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 442.390041] usb 5-1: Product: USB C Video Adaptor
[ 442.390052] usb 5-1: Manufacturer: USB C
[ 442.390061] usb 5-1: SerialNumber: 000000000001
[ 457.509207] usb 5-1: USB disconnect, device number 3
[ 467.314754] usb 5-1: new full-speed USB device number 4 using xhci-hcd
[ 467.482770] usb 5-1: not running at top speed; connect to a high speed hub
[ 467.511212] usb 5-1: New USB device found, idVendor=25a4, idProduct=9311, bcdDevice= 2.01
[ 467.511254] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 467.511267] usb 5-1: Product: USB C Video Adaptor
[ 467.511277] usb 5-1: Manufacturer: USB C
[ 467.511286] usb 5-1: SerialNumber: 000000000001
[ 481.143084] usb 5-1: USB disconnect, device number 4
[ 496.696187] usb 5-1: new high-speed USB device number 5 using xhci-hcd
[ 496.851861] usb 5-1: New USB device found, idVendor=0bda, idProduct=8153, bcdDevice=30.00
[ 496.851901] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[ 496.851914] usb 5-1: Product: USB 10/100/1000 LAN
[ 496.851924] usb 5-1: Manufacturer: Realtek
[ 496.851932] usb 5-1: SerialNumber: 000001000000
[ 497.061800] r8152-cfgselector 5-1: reset high-speed USB device number 5 using xhci-hcd
[ 497.224598] firmware_class:__allocate_fw_priv: firmware_class: __allocate_fw_priv: fw-rtl_nic/rtl8153a-3.fw fw_priv=0000000005c09bb9
[ 497.224736] firmware_class:fw_get_filesystem_firmware: r8152 5-1:1.0: loading /lib/firmware/updates/6.7.1-gd7da5073ce3d/rtl_nic/rtl8153a-3.fw failed for no such file or directory.
[ 497.224809] firmware_class:fw_get_filesystem_firmware: r8152 5-1:1.0: loading /lib/firmware/updates/rtl_nic/rtl8153a-3.fw failed for no such file or directory.
[ 497.224835] firmware_class:fw_get_filesystem_firmware: r8152 5-1:1.0: loading /lib/firmware/6.7.1-gd7da5073ce3d/rtl_nic/rtl8153a-3.fw failed for no such file or directory.
[ 497.227767] firmware_class:fw_get_filesystem_firmware: r8152 5-1:1.0: loading /lib/firmware/rtl_nic/rtl8153a-3.fw failed for no such file or directory.
[ 497.227794] firmware_class:fw_get_filesystem_firmware: r8152 5-1:1.0: loading /lib/firmware/updates/6.7.1-gd7da5073ce3d/rtl_nic/rtl8153a-3.fw.zst failed for no such file or directory.
[ 497.227810] firmware_class:fw_get_filesystem_firmware: r8152 5-1:1.0: loading /lib/firmware/updates/rtl_nic/rtl8153a-3.fw.zst failed for no such file or directory.
[ 497.227823] firmware_class:fw_get_filesystem_firmware: r8152 5-1:1.0: loading /lib/firmware/6.7.1-gd7da5073ce3d/rtl_nic/rtl8153a-3.fw.zst failed for no such file or directory.
[ 497.239634] firmware_class:fw_get_filesystem_firmware: r8152 5-1:1.0: Loading firmware from /lib/firmware/rtl_nic/rtl8153a-3.fw.zst
[ 497.239648] firmware_class:fw_get_filesystem_firmware: r8152 5-1:1.0: f/w decompressing rtl_nic/rtl8153a-3.fw
[ 497.239788] firmware_class:fw_set_page_data: firmware_class: fw_set_page_data: fw-rtl_nic/rtl8153a-3.fw fw_priv=0000000005c09bb9 data=000000007f121b56 size=1440
[ 497.239868] firmware_class:fw_log_firmware_info: r8152 5-1:1.0: Loaded FW: rtl_nic/rtl8153a-3.fw, sha256: c7099a1b0fc80e02ff7276aacbb08b5771e2f5c763fb76a7a8df3a89d58d8208
[ 497.261019] r8152 5-1:1.0: load rtl8153a-3 v2 02/07/20 successfully
[ 497.290504] r8152 5-1:1.0 eth0: v1.12.13
[ 497.313277] usbcore: registered new interface driver r8153_ecm
[ 497.319984] r8152 5-1:1.0 enxa0cec80839bf: renamed from eth0
[ 499.917878] r8152 5-1:1.0 enxa0cec80839bf: carrier on
This was taken by first removing USB-RJ45 adapter. Then connecting USB-HDMI adapter. Removing and connecting it second time. Then removing USB-HDMI and connecting USB-RJ45 again.
You can execute sudo fetch_sc8280xp_fw.sh, fetches the firmwares to /usr/lib/firmware/updates. Every time you think they should be refreshed. @JeromeDeBretagne how about setting up a separate dts file like sc8280xp-microsoft-arcata.dts ? There will be some differences I'm sure, DP use for example and WWAN. Maybe a good idea to declare a separate firmware path, too.
how about setting up a separate dts file like sc8280xp-microsoft-arcata.dts ? There will be some differences I'm sure, DP use for example and WWAN. Maybe a good idea to declare a separate firmware path, too.
How are these made? Does it need dtb compiled again using the arcata dts? I have not been compiling linux kernel for some years. I don't even know which cross-compiler it takes.
Need to look into the dmesg. The fun part is, after copying the firmwares they are also integrated into the initrd 😁 So they will be loaded, but they also should load. Yes it is a grub parameter.
How are these made? Does it need dtb compiled again using the arcata dts? I have not been compiling linux kernel for some years. I don't even know which cross-compiler it takes.
You can compile on the sp9, no prob. Tthe separate dts file is given as boot parameter, usually by providing a link before update-grub. Thanks for the dmesg. I have created the new dts and a new branch.
Need to look into the dmesg. The fun part is, after copying the firmwares theay are also integrated into the initrd :grin So they will be loaded, but they also should load.
Thats weird. How could removing one of the firmware files from userspace FS effect booting then.
You can execute sudo fetch_sc8280xp_fw.sh, fetches the firmwares to /usr/lib/firmware/updates. Every time you think they should be refreshed. @JeromeDeBretagne how about setting up a separate dts file like sc8280xp-microsoft-arcata.dts ? There will be some differences I'm sure, DP use for example and WWAN. Maybe a good idea to declare a separate firmware path, too.
Yes, I just did in fact :-) You can find my update here, I can copy & past it here if you want.
If this was the right assumption, do you have any other suggestions to find out the correct one? From the ACPI table again? From the Windows drivers somehow?
It should be specified in ACPI. I doubt that the driver somehow hard-codes it, so that will just look it up from ACPI as well.
It should be specified in ACPI. I doubt that the driver somehow hard-codes it, so that will just look it up from ACPI as well.
Got it, that makes sense. Sadly I'm struggling with ACPI...
Earlier, you had mentioned this approach:
And you can actually also verify the GPIO: There's a command to tell the EC that the device is suspended (without actually suspending it). If you send that to the EC it will stop sending messages, but it will start pulling on the GPIO. So you can add a print statement to the IRQ handler. And with that you can then check that e.g. when you plug in/out a charger you actually trigger that IRQ.
Is there an easy way to send this command to the EC?
And you can actually also verify the GPIO: There's a command to tell the EC that the device is suspended (without actually suspending it). If you send that to the EC it will stop sending messages, but it will start pulling on the GPIO. So you can add a print statement to the IRQ handler. And with that you can then check that e.g. when you plug in/out a charger you actually trigger that IRQ.
Is there an easy way to send this command to the EC?
You would have to set up the pin in the driver first.
Then you can modprobe surface_aggregator_cdev and use this script to run
./scripts/ssam/ctrl.py 0x01 0x01 0x15 0x00 0x01
to send the "display off" notification which should disable events and
./scripts/ssam/ctrl.py 0x01 0x01 0x16 0x00 0x01
to send the "display on" notification and enable events again.
When it's in "display-off state", events should be disabled, and the EC should pull on the GPIO instead. You'll also need to enable debug logging (or change the respective log level in the IRQ handler here).
What I forgot to mention: When it's in display off mode, you can trigger events by connecting/disconnecting the AC cable.
Also: I think you can't really break or brick anything by sending commands to the EC (at least so far I haven't managed to do any permanent harm and I've poked at it quite a bit...). Worst case, you have to do a hard-reset by holding the power + volume up button until it reboots into UEFI.
I have a Windows Dev Kit 2023 gathering dust (Windows bloat is horrible) and would love to put Linux on it, do you know if your project has got Linux working on the dev kit?
Yes, there is a devicetree working for the MS Windows Dev Kit from 2023, it hasn't been submitted upstream to the mainline Linux kernel though AFAIK. Look for Volterra or Blackrock, it's the codename of this device.
The repo for wdk2023 is here. Also, there are pre-installed desktop images available here, and installable kernel packages here. I guess I will create one new image for Ubuntu 24.04, which is on par with flash-kernel and can handle newly installed kernel packages well. Maybe for 6.10, it's out now.
So it looks like it can't configure the GPIO you set as wakeup pin (gpio85). I guess this likely means [...] that it has been configured for something else wrongly before (maybe check the DT and its includes that you don't specify it twice).
I've finally found the issue: the dmesg error message was not pointing explicitly to it, but I've realised that this gpio was blocked because it was within the gpio-reserved-ranges of the &tlmm entry... I had reused the ranges from the CRD but I should have used the ranges from the ThinkPad X13s as it had been fixed in this patch: https://lore.kernel.org/all/20230803-topic-x13s_pin-v1-1-fae792274e89@linaro.org/
Ahh that makes sense now. I think I loosely remember having to deal with the reserved ranges on the SPX in the early days as well... sorry I didn't remember that earlier.
I've just seen that some patches [1] based on your work are being proposed / discussed on the kernel mailing list to get the support upstream, that's excellent news, congratulations.
Yeah, @konradybcio has picked those up (and significantly improved them). Now I just need to find some time to clean up and break down the SPX tree and prep it for sumission...
Activity
tilator commentedon Mar 4, 2024
Deleting qcadsp8280.mbn makes it boot again. Other files are allowed.
Attached is dmesg after this modification.
dmesg_2.txt
tilator commentedon Mar 4, 2024
Here is some addition to the dmesg:
This was taken by first removing USB-RJ45 adapter. Then connecting USB-HDMI adapter. Removing and connecting it second time. Then removing USB-HDMI and connecting USB-RJ45 again.
jglathe commentedon Mar 4, 2024
You can execute
sudo fetch_sc8280xp_fw.sh, fetches the firmwares to/usr/lib/firmware/updates. Every time you think they should be refreshed. @JeromeDeBretagne how about setting up a separate dts file likesc8280xp-microsoft-arcata.dts? There will be some differences I'm sure, DP use for example and WWAN. Maybe a good idea to declare a separate firmware path, too.jglathe commentedon Mar 4, 2024
Do you get a screen with the USB-C video adapter? Not impossible.
jglathe commentedon Mar 4, 2024
For debugging dp operation, please add
drm.debug=0x100to your boot command line.tilator commentedon Mar 4, 2024
How are these made? Does it need dtb compiled again using the arcata dts? I have not been compiling linux kernel for some years. I don't even know which cross-compiler it takes.
tilator commentedon Mar 4, 2024
Nothing come up. I tried cold booting and connecting adapter while it was already up.
tilator commentedon Mar 4, 2024
This is grub parameter, I suppose.
tilator commentedon Mar 4, 2024
How about this qcadsp8280.mbn preventing it booting up. Might it be just some kind of loading order issue?
jglathe commentedon Mar 4, 2024
Need to look into the dmesg. The fun part is, after copying the firmwares they are also integrated into the initrd 😁 So they will be loaded, but they also should load. Yes it is a grub parameter.
tilator commentedon Mar 4, 2024
Here is dmesg with grub debug option as you wished.
dmesg_3.txt
jglathe commentedon Mar 4, 2024
You can compile on the sp9, no prob. Tthe separate dts file is given as boot parameter, usually by providing a link before update-grub. Thanks for the dmesg. I have created the new dts and a new branch.
tilator commentedon Mar 4, 2024
Thats weird. How could removing one of the firmware files from userspace FS effect booting then.
jglathe commentedon Mar 4, 2024
No idea yet. But many of these are actually loaded.
JeromeDeBretagne commentedon Mar 4, 2024
Yes, I just did in fact :-) You can find my update here, I can copy & past it here if you want.
170 remaining items
JeromeDeBretagne commentedon Jun 28, 2024
I have added the 2 commits to this branch for reference:
https://github.com/JeromeDeBretagne/linux_surface_pro_9_5G/commits/surface/sp9-5G/surface-keyboard-wip/
With these latest hacks, I'm getting very close to a usable Surface Pro 9 5G running Linux.
qzed commentedon Jun 28, 2024
It should be specified in ACPI. I doubt that the driver somehow hard-codes it, so that will just look it up from ACPI as well.
JeromeDeBretagne commentedon Jun 28, 2024
Got it, that makes sense. Sadly I'm struggling with ACPI...
Earlier, you had mentioned this approach:
Is there an easy way to send this command to the EC?
qzed commentedon Jun 28, 2024
You would have to set up the pin in the driver first.
Then you can
modprobe surface_aggregator_cdevand use this script to runto send the "display off" notification which should disable events and
to send the "display on" notification and enable events again.
When it's in "display-off state", events should be disabled, and the EC should pull on the GPIO instead. You'll also need to enable debug logging (or change the respective log level in the IRQ handler here).
JeromeDeBretagne commentedon Jun 29, 2024
Thanks, not for the faint of heart !
qzed commentedon Jun 30, 2024
What I forgot to mention: When it's in display off mode, you can trigger events by connecting/disconnecting the AC cable.
Also: I think you can't really break or brick anything by sending commands to the EC (at least so far I haven't managed to do any permanent harm and I've poked at it quite a bit...). Worst case, you have to do a hard-reset by holding the power + volume up button until it reboots into UEFI.
rthorntn commentedon Jul 17, 2024
Just checking if this work changes anything:
https://www.phoronix.com/news/ASUS-Vivbook-S-15-Elite-X-Linux
I have a Windows Dev Kit 2023 gathering dust (Windows bloat is horrible) and would love to put Linux on it, do you know if your project has got Linux working on the dev kit?
Thanks.
JeromeDeBretagne commentedon Jul 17, 2024
Yes, there is a devicetree working for the MS Windows Dev Kit from 2023, it hasn't been submitted upstream to the mainline Linux kernel though AFAIK. Look for Volterra or Blackrock, it's the codename of this device.
jglathe commentedon Jul 17, 2024
The repo for wdk2023 is here. Also, there are pre-installed desktop images available here, and installable kernel packages here. I guess I will create one new image for Ubuntu 24.04, which is on par with flash-kernel and can handle newly installed kernel packages well. Maybe for 6.10, it's out now.
rthorntn commentedon Jul 24, 2024
Thanks!
Add device tree node for SAM
JeromeDeBretagne commentedon Aug 19, 2024
I've finally found the issue: the dmesg error message was not pointing explicitly to it, but I've realised that this gpio was blocked because it was within the gpio-reserved-ranges of the &tlmm entry... I had reused the ranges from the CRD but I should have used the ranges from the ThinkPad X13s as it had been fixed in this patch:
https://lore.kernel.org/all/20230803-topic-x13s_pin-v1-1-fae792274e89@linaro.org/
Now I don't need my two commits "hack:" anymore!
qzed commentedon Aug 20, 2024
Ahh that makes sense now. I think I loosely remember having to deal with the reserved ranges on the SPX in the early days as well... sorry I didn't remember that earlier.
JeromeDeBretagne commentedon Aug 20, 2024
No worries at all, you've been of fantastic help!
I've just seen that some patches [1] based on your work are being proposed / discussed on the kernel mailing list to get the support upstream, that's excellent news, congratulations.
[1] https://lore.kernel.org/lkml/20240814-topic-sam-v3-0-a84588aad233@quicinc.com/
qzed commentedon Aug 20, 2024
Yeah, @konradybcio has picked those up (and significantly improved them). Now I just need to find some time to clean up and break down the SPX tree and prep it for sumission...