2025-06-04

<hogliux_> Maybe a software update fixed it in Windows, but maybe I'm just unlucky and if I would use Windows more (I hardly use it) it would happen there as well again. As it is so rare it's really hard to diagnose. I thought I had fixed it a few times in the past already.
<hogliux_> It also happens with Wifi disabled for me. It used to happen in Windows for me too - for others on this channel as well. Exactly the same symptoms. Even after swapping in back the old SSD. But I haven't been able to reproduce the issue anymore in Windows for a while now.
<hogliux_> Would would be really good to know, if x elite users on this channel have this issue and have *NOT* swapped their SSD. As a reminder: the symptoms of this issue is that your laptop completely freezes and then automatically reboots after 30-40 seconds
<hogliux> JensGlathe[m]: I really don't think so either. Most of the day I'm just editing code/writing e-mails etc. Up until now it's always occured during one of these light weight tasks. Occasionally I recompile the entire ubuntu kernel and I've never had it happen then.
<hogliux> valpackett: Another pointer on why I think it's not directly the SSD (but maybe indirectly): to debug the issue, I route all my kernel logs to my home server in realtime. There is nothing in the kernel logs when the issue occurs. So definitely not directly a SSD I/O error.
<hogliux> valpackett: only these people see it happening.
<hogliux> valpackett: But the SSD might also be a red herring: I'd assume that people who swap their SSD probably have the intention to use their laptops more for serious work. Maybe this groups just tends to use their laptops more and because the issue is so rare
<hogliux> valpackett: If I would have to guess, I think it may be something ESD or EMI issue: just because of the randomness where the issue might not show up for months but then sometimes happens a few times a day. Maybe replacing the SSD breaks some kind of ESD protection in the case?
<hogliux> valpackett: I don't think it's the SSD directly. Due to the issue, I swapped in the original SSD again but the freezes still happen. There is absolutely no correlation between IO load and the freezes so I don't think it's the temp of the SSD.
<valpackett> hogliux: oh, shit, i did swap the ssd. not a 7x btw.

2025-06-03

<hogliux> valpackett: kcxt: continued to play even though the laptop was otherwise not responding. It continued to stream and play audio from the web until the laptop's watchdog timer reset the laptop. Nothing in the logs after the reboot though. So super super strange bug.
<hogliux> valpackett: kcxt: It does to seem to happen slightly more often when something audio related is running (either bluetooth or USB). But in rare occasions it also happens without audio running. Once or twice I had the same thing happening but audio
<hogliux> valpackett: kcxt: Did any of you exchange your SSD by any chance? That might be a common thing that people who have this issue have done.
<hogliux> valpackett: kcxt: So you can never be really sure that you've fixed it. It also doesn't seem to be affecting all the slim 7x users here. I'm starting to suspect that it may be a hardware issue only affecting some batches and only affecting linux.
<hogliux> valpackett: kcxt: I've tried everything to get a log message on what's going on. The annoying thing is that it is super rare and random. I use my slim 7x fulltime, sometimes I go weeks without it happening and sometimes it happens 2-3x a day.
<hogliux> valpackett: kcxt: I've had the same issue with my slim 7x since I bought it in August 2024. Search for my username in this IRC: https://oftc.catirclogs.org/aarch64-laptops/search?q=hogliux

2025-05-27

<kuruczgy[m]> hogliux: if I had to guess it depends on if your lighting has a 50/60Hz flicker or not.
<hogliux> I don't seem to have the flickering problem - neither in firefox nor in gnome-snapshot
<hogliux> kurzugy[m]: Once zoom is streaming the camera feed you can close the first one again. For some reason that works around the cropping issue for me.
<hogliux> kurzugy[m]: For some reason after a few seconds the cropping issue resolves itself on that site. Then, I open Zoom on a second tab and keep the first one open.
<hogliux> kurzugy[m]: To fix the cropping issue (really bad in zoom for example), I first open this site on one tab: https://de.webcamtests.com/

2025-05-26

<hogliux> It wasn't in 6.14. Sorry I know this is a bit off-topic, but I'm a kernel newbie, after I've bisect'd the issue how would I report it?
<hogliux> Looks like there is a regression since at least 6.15-rc6 where a simple `epoll_pwait2` blocks forever if the timeout is small enough (i.e. 1us). The following code should endlessly print `enter`, `exit`, but the poll blocks forever on 6.15-rc6:

2025-05-23

<macc24> hogliux_: technically it wasn't bricked, it still booted fine, it just was draining battery 24/7
<hogliux> Not working for me is speaker protection and USB4 PCIe tunneling
<hogliux> When kvm virtualization is enabled then hw assisted video deciding and some USB features stop working as you are forced to use the same adsp firmware that bios is using during boot
<hogliux> Webcam (with pronounced green tint), battery monitoring and kvm virtualization
<hogliux> nirik: On the slim 7x I have the following working: GPU acceleration, suspend (albeit only s2idle), Bluetooth, wifi, USB, DP Alt mode, hw assisted video deciding (h264 only),
<hogliux> And apparently not only your speakers. I think macc24 managed to brick the entire mainboard.
<hogliux> nirik: be *very* careful with the speakers on the 7x. The missing speaker protection can break stuff permanently.
<hogliux> The list also includes EC patches which are necessary for suspend

2025-05-22

<hogliux> nirik: I built and ran the tool on Windows but the GitHub website of the tool also claims it runs on Linux. So worth a try.
<hogliux> nirik: I installed updates with `fwuptool install-blob` from within Linux. The reddit post I shared above has a link to a tool to download bios updates from Windows update.
<hogliux> kuruczgy[m]: deathmist: So the only thing needed from windows seems to be the iris firmware. That's progress with V57.
<hogliux> kuruczgy[m]: deathmist: The cdsp firmware file is missing in the LENOVO/83ED (<- slim 7x) folder in upstream linux-firmware. But copying the one from LENOVO/21N1 (Thinkpad T14) works.
<hogliux> kuruczgy[m]: deathmist: Unfortunately, the iris firmware still needs to be copied from the windows partition. The linux-firmware one doesn't work.
<hogliux> kuruczgy[m]: deathmist: Updated to V57 and everything worked after nuking my /lib/firmware folder and replacing it with upstream linux-firmware (minus the currently broken ath12k firmware)
<hogliux> deathmist: and everything good? Laptop still works ;-) ?
<deathmist> hogliux: I did the v57 BIOS update manually on my Slim 7x previously and it also seemed to be shipping through Canary insider Windows update channel to users too already a month ago
<hogliux> kuruczgy[m]: But I'm too scared to install. There is probably a reason why they are holding back the update.
<hogliux> kuruczgy[m]: Have you tried BIOS version V57? Apparently it doesn't require Lenovo signed firmware anymore. It's not coming down via Windows Update for me but I downloaded the .cab file by following the instructions here: https://www.reddit.com/r/snapdragon/comments/1imx4qb/comment/mmbaryd/
<hogliux> kuruczgy[m]: Yes, I copied the firmware from windows.
<kuruczgy[m]> hogliux_: I think my camera kernel branch has iris stuff because that was also merged into bryanodonoghue's branch. I just did a rebase and flattened the merge.

2025-05-21

<hogliux> You'll also need to add `rotation = <180>;` to the `camera@36` device-tree entry if you don't want to be flipped upside down
<hogliux> Then both camera and video acceleration work for me on the slim 7x
<hogliux> If you have jhovold's 6.15.0-rc6 release, you can cherry-pick commits 45e9d9c123e6bd20cc7eac2baea272c5074b2b26..716646768cc96832d68b51c510ced054e0b24407 from https://github.com/kuruczgy/linux/commits/cam-rebased-6.15-rc6/
<hogliux> kuruczgy did all the work of rebasing it on top of 6.15.0-rc6
<hogliux> bryanodonoghue is the author of those patches
<hogliux> valpackett: so check `dmesg` if you see a firmware load error
<hogliux> valpackett: you also need to copy firmware from windows
<hogliux> valpackett: but I thought I saw it being mentioned here that it would be part of 6.15.0. Do you have `qcom_iris` module loaded?
<hogliux> valpackett: ahh then it actually might be part of the webcam patches I added. It was definitely also touching the iris stuff
<valpackett> hogliux: huh. i'm on latest linux-next and i didn't see any v4l in /dev..
<hogliux> kuruczgy[m]: so you can add that checkmark to your readme
<hogliux> kuruczgy[m]: btw: Not sure if you realised but video acceleration does work with you nix config. It's part of 6.15.0-rc6 (probably earlier). No other patches needed for the kernel at least. You can try `mpv -v path-to-h264-video` with `vd=h264_v4l2m2m` in `~/.config/mpv/mpv.conf`
<hogliux> JosDehaes[m]: kuruczgy[m]: I was only testing qcam. With `rotation = <180>;` it *is* correct in gnome-snapshot and in firefox

2025-05-20

<hogliux> kuruczgy[m]: Here are my changes: https://imgur.com/a/4oSkoXO
<hogliux> ?
<hogliux> does do the trick=does *not* do the trick
<hogliux> kuruczgy[m]: Anything I'm missing
<hogliux> kuruczgy[m]: Thanks to your nix camera branch, I've got a (fairly greenish) camera working. But I can't get it to flip the orientation. In your issue you mention "rotation = <180>;" but that does do the trick.

2025-05-03

<hogliux> Is the ps883x connected via i2c or similar? If there is some kind of way to record i2c messages in Windows then I could record what happens when a thunderbolt device is plugged in and experiment with replaying that on Linux
<hogliux> Hmmm maybe. Multiple thunderbolt devices list the same chip though. But possible.
<hogliux> (It surprised me btw that for the USB4 PCIe tunneling, Qualcomm seems to be relying on Intel chips, i.e. Alpine Ridge. See second screenshot above)
<hogliux> But I think I'd probably also need patches to the ps883x driver to actually pass-through the PCI signals. Are there any datasheets for the ps883x anywhere (I couldn't find any). Any ideas from anybody else on how I could go about to try to add linux support for PCIe passthrough?
<hogliux> I can see in device manager that the thunderbolt root bridge is attached to the PCI root bus at ACPI\PNP0A08\0. So I could look at the ACPI tables to figure out which PCI bus that is and enable it in the slim 7x dts
<hogliux> and here is a screenshot with a thunderbolt network device plugged in Windows (obviously there are no arm64 drivers for windows for this device): https://pasteboard.co/NDB0EdySTvPe.png
<hogliux> Here is a screenshot of all the PCI devices when I don't have a thunderbolt device plugged in: https://pasteboard.co/BgR4n6J58PTr.png
<hogliux> Will there ever be any chance of getting USB4 PCIe tunneling working on linux for slim 7x? It definitely works on Windows.

2025-05-02

<steev> hogliux: check the debian/patches directory in the ubuntu concept kernel sources (or the debian/patches/series file)
<hogliux> I've used Ubuntu concepts and your work as a starting point before, but the git history is a bit confusing to me, so I don't know exactly which kernel the ubuntu concepts kernel is based on and if any ubuntu specific patches are applied.
<hogliux> @tobhe: I have my own kernel image based on jhovold's kernel with a bunch of extra patches for slim 7x and some other patches specific to my work. I like to create a ppa and ubuntu package for that kernel. Apart from kernel config, are there any Ubuntu specific patches that get applied to upstream linux kernels?

2025-04-16

<bryanodonoghue> hogliux alexVinarskis[m] have you pulled the clock fixes in my tree ?
<JosDehaes[m]> hogliux: Oh, ok
<hogliux> JosDehaes[m]: JensGlathe[m]: My camera patches do **not** work. It's actually using the completely wrong chipset. I don't think anyone has camera working on slim 7x yet, but anthony25 with Bryan's help is very close I think.
<JosDehaes[m]> Jens Glathe: could you add the camera patches for the yoga 7x that hogliux posted above to your tree pretty please? 🙏 With your tree almost everything works (sound still distorted though)

2025-04-15

<hogliux> Most of the patches on my branch are from Bryan. I just added the dtb stuff I think.
<hogliux> OK I remember also getting errors in dmesg. Then ignore my branch.
<alexVinarskis[m]> hogliux im getting lots of `/dev/video*`, but from dmesg its obvious that camss isn't starting. Wrt to userspace - it seems apps need to support pipewire video, and not directly attach to v4l2 device. On XPS where `qcam` does work, I still didn't manage to get pipewire to pick up the source, so until then other userpsace apps wont work. Quickly checking your branch seems you have different sensor than on Bryan's branch btw.
<hogliux> @alexVinarskis[m]: Your link doesn't seem to work
<hogliux> These were my camera patches from three months ago: https://github.com/hogliux/yogalinux7x/tree/hogliux_kernel_camera
<hogliux> @anthony25 @bryanodonoghue With bryanodonoghue's camera patches, are you seeing the `/dev/video/*` devices appear? Because three months back I also experimented with the cameras on slim 7x and the video device files did appear, but I couldn't get any userspace apps to communicate with them.

2025-03-19

<anthony25> hogliux: no, in my case the laptop can stay this way indefinitely, just the video output is frozen
<hogliux> I'll need to figure out a way to more reliably reproduce this
<hogliux> Yeah but anthony25's bug definitely looks different
<hogliux> firmware crashes with qemu
<hogliux> Thanks. Yeah not really insta. More like after 30 seconds. It's exactly the same kind of freeze and reboot when f
<hogliux> @robclark: I don't have an external display so not sure if it's an issue you there.
<hogliux> @robclark: and dpu devcoredump would not write something to dmesg first? I'm seeing nothing in dmesg.
<hogliux> @robclark: hmmm i think i've hit that issue separately i think on wayland with chrome. But it didn't lockup the whole machine. Just super sluggish. Is there a way to manyally trigger dpu devcoredump to confirm that this is the type of crash I'm seeing?
<hogliux> @anthony25: this is not the type of crash you are seeing?
<hogliux> For me it's the same type of lockup I get if I run qemu without the kernel cmdline argument `id_aa64mmfr0.ecv=1`. maz mentioned that this indicates it's a firmware crash.
<hogliux> Then often the next code completion will lock everything up. @anthony25 do you get dmesg'es when your GPU locks up? Does your laptop also force reboot after about 30 seconds?
<hogliux> Nothing shows up. It's a complete lockup. I can get it to happen more often if I stress switch between virtual consoles and then switch back to vscode and start typing.
<hogliux> Nope. I even tried streaming dmesg'es to a remote computer.
<hogliux> I can't get to the dmesg because the whole machine is frozen
<robclark> hogliux: got dmesg?
<hogliux> The only workaround I've found so far is to open VS code under Xnest
<hogliux> The whole machine freezes and will force reboot after 20-30 seconds
<hogliux> @anthony25: if you search my name on IRC you'll find me complaining about this every now and then. It's only GPU lockups. I mostly have WiFi disabled (i have an ethernet dongle).
<hogliux> @anthony25: It's been driving me insane. I'm on tobhe's Ubuntu 6.14.0-20-qcom-x1e kernel. But it's happened on all other kernels (jhovold's etc.).
<hogliux> @anthony25: I've had the same issue with the GPU freeze that you're having. For me it happens randomly (about 1-2 a week) in VS code when VS code attempts to open a code completion popup.

2025-02-27

<anthony25> but whatever, hogliux should try with this patch
<anthony25> in that case = what hogliux describes

2025-02-26

<hogliux> I can upload a patch to launchpad to put the EC driver back in if that would help you
<hogliux> Also it seems like the EC driver no longer works on the slim 7x. This was already with 6.14.0-13. Not sure from which version onward it stopped working.
<hogliux> I experience random hard reboots when I stress the GPU which I think would be solved by the GPU throttling
<hogliux> Indeed, it works if I use the dtb of 6.14.0-13. Any idea why GPU thermal throttling doesn't work on slim 7x?
<hogliux> @tobhe_ Thanks for your response over at launchpad on 6.14.0-14 not working on slim 7x

2025-02-08

<anthony25> the patch I'm using, written by hogliux, doesn't ship the regulators: https://git.launchpad.net/~ubuntu-concept/ubuntu/+source/linux/+git/oracular/commit/?h=x1e-6.12/203-yoga-slim&id=67158a13f60647bc99e5c45bbb38be73ca7dafb7

2025-02-07

<hogliux> Thanks anthony25!
<hogliux> Honestly the patch took me like 5 min to do
<hogliux> Ok if that's possible then cool. If not, don't sweat it.
<hogliux> Please don't go through the hassle. Honestly. Just submit it under your name.
<hogliux> It's more work submitting it. So you'll be doing all the really hard work anyway.
<hogliux> I don't mind at all
<hogliux> Nah it's so small. Just change it to yourself
<hogliux> anthony25: so if you want, feel free to submit yourself
<hogliux> anthony25: I'm not finding the time to do it myself. Soonest I might have some extra time is in two weeks.
<hogliux> anthony25: if you want to go ahead and submit the Bluetooth patches upstream for the slim 7x, then please go ahead

2025-02-06

<anthony25> I asked hogliux (the author) but they needed to look how to upstream, I don't know if I could do it for them but mark them as the author of the patch

2025-01-23

<hogliux> I have the lenovo slim 7x 32 GB model
<hogliux> ?
<hogliux> this is so strange, what is your exact laptop model
<landwork> hogliux: before the black screen I get a bunch of messages similar to this "qnoc-x1e80100 interconnect-0: sync_state() pending due to b9c000.i2c".
<landwork> hogliux: agreed, this is the first time I have seen it by memory.
<hogliux> kuruczgy[m]: send an automatic e-mail to Microsoft support asking for less AI bloat in Windows?
<hogliux> This is even after a fresh install of Ubuntu concept
<hogliux> I only ever see the boot messages even though splash and quiet are set in the grub command line
<hogliux> Interestingly, I actually never see the boot splash on Ubuntu Concept
<hogliux> landwork: and.... does it work?
<landwork> I installed hogliux's packages and updated the vpu30_p4.mbn from windows, so i'll reboot and see if I can get ffplay working now.
<hogliux> landwork: I'll pass that onto tobhe
<landwork> hogliux: is there a way to revert the packages if I installed them manually with "dpkg -i" ?
<hogliux> tobhe: Ahhh! I was editing all that manually. That was my first time creating a ppa package. So I'm a complete noob. Thanks for all your great work tobhe!
<tobhe> hogliux: if you clone https://git.launchpad.net/~ubuntu-concept/+git/linux-qcom-x1e-meta, update the changelog with `dch -i` to match your kernel version and upload it to your ppa you get all the meta packages needed to make it update automatically
<hogliux> Note that there is already a vpu30_p4.mbn in Ubuntu concept but that is was signed for the CRDs and not for the slim 7x. robclark knows more on this.
<hogliux> Yes, exactly, you'll need `qcom/vpu/vpu30_p4.mbn`. On Windows it's called `qcvss8380.mbn` and it's usually found in `Windows/System32/DriverStore/FileRepository/qcdx8380.inf_arm64_90c8f1c486fcba86/`
<hogliux> That's it
<hogliux> linux-headers-6.12.0-96-qcom-x1e_6.12.0-96.96_arm64.deb, linux-qcom-x1e-tools-6.12.0-96_6.12.0-96.96_arm64.deb, linux-tools-6.12.0-96-qcom-x1e_6.12.0-96.96_arm64.deb
<hogliux> then install packages in the following order: linux-modules-6.12.0-96-qcom-x1e_6.12.0-96.96_arm64.deb, linux-image-unsigned-6.12.0-96-qcom-x1e_6.12.0-96.96_arm64.deb, linux-modules-extra-6.12.0-96-qcom-x1e_6.12.0-96.96_arm64.deb, linux-qcom-x1e-headers-6.12.0-96_6.12.0-96.96_all.deb
<hogliux> landwork: easiest and safest is to download deb packages from here: https://github.com/hogliux/yogalinux7x/releases/tag/6.12.0-96
<hogliux> ahh sorry
<macc24> hogliux: SpieringsAE was just asking a semi-related question
<hogliux> macc24: what does hantro mean in this context? On x1e, the video decoder is called venus.
<hogliux> I don't have any udev rules in there. It's just the driver. It's exposed as a v4l m2m device at `/dev/v4l/by-path/platform-aa00000.video-codec-video-index0`
<hogliux> macc24: I'm the author of the ppa that landswipe was talking about

2025-01-22

<hogliux> anthony25: yes sorry I haven't done that yet. I had a few problems with my custom Ubuntu installation last week so needed to re-install Ubuntu first before I can tackle upstreaming the bluetooth support.
<anthony25> hogliux: if you want a neomutt config to send your patch that adds the bluetooth support for the slim 7x: https://github.com/aruhier/dotfiles/blob/desktop/neomutt%2Fneomuttrc
<hogliux> More info on the ppa can be found here: https://bugs.launchpad.net/ubuntu-concept/+bug/2084191/comments/164
<hogliux> For anyone using Ubuntu on the slim 7x: I have a ppa here which you can install on Ubuntu Concepts. It adds support for the EC, RTC and hardware accelerated video decoding: https://launchpad.net/~hogliux/+archive/ubuntu/yogaslim7x

2025-01-10

<hogliux> ;-)
<anthony25> hogliux: on an HDD maybe :D
<hogliux> Maybe it's normal. I have the 32GB variant of the slim 7x. Maybe it just takes that long to write it out to disk?!?
<hogliux> No I don't think so. Because during testing I always hibernated without removing the module. The computer will still resume then, but it will then crash after 2-3 minutes or so because it constantly tries to reboot the adsp.
<hogliux> But that's the only issue I have (apart from it taking pretty long)
<hogliux> But I use hibernation constantly and don't have any issues with it. Rarely the Wifi crashes after resuming and I need to rmmod/modprobe the wifi ath driver.
<hogliux> If you are using a lot of RAM it can take up to 6 minutes or so to hibernate. So be patient. If you hit any key during hibernation process, the laptop wakes up but the screen just turns blue. But even then, eventually it will turn off
<hogliux> both
<hogliux> You also need to be sure that efivars is working and that your EC works. When I type in `pm-hibernate` I see my laptop LED pulsing like it's gone into suspend. It then takes a good 2-3 minutes to then turn off.
<hogliux> One downside though is that hibernation takes really long, much longer than on my 7 year old laptop
<hogliux> And then I hibernate with `pm-hibernate`
<hogliux> Of course, you'll also need to have the relevant firmware in the initrd as well
<hogliux> And this is the modules_list.txt file: https://controlc.com/f4339fba
<hogliux> anthony25: kalebris: you need to `rmmod qcom_q6v5_pas`. This is how my initrd init script looks like: https://controlc.com/83bdaa9a
<kalebris_> hogliux_: do you have a list of modules on what needs to be disabled/re-enabled and the order of reenabling them?
<hogliux_> Hmmm hibernation works for me on my slim 7x. But it was fiddly to get working. I need to rmmod the adsp module for example and then reload some of them in the initrd in the right order.
<hogliux_> My old Intel laptop had so bad suspend power draw during suspend that I just got used to hibernating anyway
<hogliux_> :-)
<hogliux_> just use hibernation
<hogliux_> Now I only have three things missing from my slim 7x want list: 1) webcam 2) USB4 PCIe pass-through 3) get adsp working in EL2
<hogliux_> Thanks for getting the lid switch working!
<hogliux_> OK I'll read through that. I'll try to submit it later today.
<hogliux_> I wasn't sure if macc24's comment was related to my bluetooth patch? Honestly, all I did was take the same changes that were used on the think pad and applied it to the slim 7x
<hogliux_> Yes, I'll try to submit a patch for this. But just like you recently, it would be my first one. So need to read up on it.
<anthony25> hogliux_: (now that I see that you're here) I'm using your bluetooth patch for yoga slim 7x, and was wondering if you tried to upstream it? https://git.launchpad.net/~ubuntu-concept/ubuntu/+source/linux/+git/oracular/commit/?h=x1e-6.12/203-yoga-slim&id=67158a13f60647bc99e5c45bbb38be73ca7dafb7
<anthony25> hogliux: I'm using your bluetooth patch for yoga slim 7x, and was wondering if you tried to upstream it? https://git.launchpad.net/~ubuntu-concept/ubuntu/+source/linux/+git/oracular/commit/?h=x1e-6.12/203-yoga-slim&id=67158a13f60647bc99e5c45bbb38be73ca7dafb7

2025-01-09

<hogliux> robclark: anthony25: interesting! when booting in el2 on my slim 7x, the iris driver suddenly rejects the vpu30_p4.mbn firmware with the same error message I posted yesterday. Neither the linux-firmware nor the Windows version work.
<hogliux> kuruczgy: sorry for misspelling your name (I typed that on my phone yesterday)

2025-01-08

<kuruczgy> hogliux: sure, can you create an issue with links to the commits + dts patches + path and sha256 hash of the firmware file? not sure when I will have time for it, just don't want the info to get lost to the chat history.
<hogliux> kurzugy: you should add those commits to your nix recipes. I'm still "manually" ;-) following your nix recipes when building my own ubuntu images. So thank you for your work!
<hogliux> You can use `git cherry-pick 23ce8561e61a93f8b8e3770c20bf344629ba46c1..c82320532bc30bc4bf1265b69e787c3e5867de31`.
<hogliux> I just cherry-picked all commits from 23ce8561e61a93f8b8e3770c20bf344629ba46c1 to c82320532bc30bc4bf1265b69e787c3e5867de31
<anthony25> hogliux: if you adapted https://lore.kernel.org/lkml/CACPK8XeFbx_8mrvT4xi-WfQF+zHJYj1=EkH2tmnnxs1WThJ8ZQ@mail.gmail.com/ for x1e, can you share me your diff?
<hogliux> robclark: anthony25: Thank you! I know have working hardware accelerated h264 video decoding working. With ffplay it reduces top cpu usage from 26% to ~ 12%.
<anthony25> hogliux: how did you add iris in the slim 7x dts, btw?
<anthony25> hogliux: it's in Windows/System32/DriverStore/FileRepository/qcdx8380.inf_arm64_90c8f1c486fcba86/
<hogliux> robclark: thank you for the clarification on iris firmware. Unfortunately, I see no fw file named vpu30_p4.mbn on my Windows partition and the iris module is specifically looking for that file :-(
<robclark> hogliux, (if you see this), the vpu fw is signed, so dts would need to setup a firmware-path similar to gpu zap shader (ie. /lib/firmware/qcom/x1e80100/LENOVO/83ED/$something) and the fw file copied from windows
<macc24> @hogliux: where did you get that firmware from?
<hogliux> The firmware file `qcom/vpu/vpu30_p4.mbn` is there on my system so I don't think it's an issue of a missing firmware file
<hogliux> I tried the iris patches on lenovo slim 7x but I'm getting: https://pasteboard.co/htPkAYe2f5Kw.png

2025-01-07

<hogliux> What's the status of venus on x1e?
<hogliux> maz: makes sense. I just wasn't sure what you meant with "your kvm queue".
<maz> hogliux: *everything* is public.
<hogliux> maz: and I assume your kvm queue is not public?
<maz> hogliux: whatever is the current linux top-of-tree.
<hogliux> macc24: macOS requires TSO memory order mode for Rosetta. I don't think x1e supports this, right?
<hogliux> kuruczgy: I think gunyah may be better suited as a thin bare metal hypervisor than qemu for this sort of reverse engineering task
<kuruczgy> hogliux: nope, I have only tried a Linux guest so far. Nowdays games either run well enough under Proton or have some anti-cheat that makes VMs a non-starter anyway, so my interest in windows VMs has become quite low.

2025-01-06

<hogliux> And yes, I'm booting in EL2. I can boot linux images with kvm acceleration without any issues. It's only Windows.
<hogliux> maz: which kvm/kernel version are you using?
<hogliux> kurzugy: I'm on qemu version 8.2.2 (default debian version). Everything works if I use emulation/disable kvm (i.e. -cpu max etc.) but of course it's dead slow then
<hogliux> kurzugy: do you have windows 11 guest working in qemu with kvm acceleration? Other VMs work find for me but I can't get Windows 11 to work. It always just freezes when the Windows boot progress spinner appears.

2024-12-30

<hogliux> macc24: but haven't tested this with the newest Lenovo firmware version so maybe this is fixed already
<hogliux> macc24: with the lid switch working my slim 7x still randomly wakes up but then immediate goes back to sleep as the lid is still closed. Maybe you are seeing the same?

2024-12-22

<hogliux> anthony25: macc24: Thanks to you both. My slim 7x is now on NHCN53WW after upgrading with `fwupdtool install-blob`. Let's see if the system lock-ups go away...

2024-12-20

<hogliux> ahh ok thanks
<macc24> hogliux: you have acpi missing, enable it
<hogliux> macc24: what is the uefi firmware device-id for fwupdmgr? when I do `fwupdmgr get-devices` it only lists my ssd?
<hogliux> I would hope that the firmware checks if the firmware file can be applied for my model
<hogliux> anthony25: I'd assume the installer puts a firmware update file somewhere on a system partition and that the firmware does the actual updating, right?
<hogliux> Ahh ignore me. Seeing macc24's messages now.
<hogliux> anthony25: sorry if I'm being slow but where can I find the .cap file?
<anthony25> hogliux: I don't know if you can force to install the .cap file, otherwise if you want to try using fwupdmgr like macc24 described, you can do so
<hogliux> anthony25: that's spot on. I'm not getting any bios updates via Windows updates. I've definitely gotten 'Lenovo Platform Update' via Windows update. Always assumed that was for BIOS.
<kuruczgy[m]> (Mine is NHCN44WW and EC is NHEC53WW @hogliux, so yeah, you should probably try to update somehow)
<macc24> @hogliux: you have old "bios" firmware version, try updating it
<hogliux> TheBITLINK: you also seemed to have the random system freezes problem. Did you manage to find a fix for it? Did you replace your SSD?
<hogliux> kuruczgy: Version: NHCN36WW (BIOS Revision: 1.36, FW Revision 1.60, Release date: 05/23/2024)
<hogliux> kuruczgy: there seem to be different revisions of the slim 7x that behave slightly differently. Your slim sleeps fine on AC and anthony25/mine seem to have problems with this. Strange...
<hogliux> anthony25: so all in all, on battery, the laptop is deep sleeping "most of the time". I had kind of hoped that if the lid switch is on, that ubuntu would simply put the laptop straight back to sleep when it wakes up, but it doesn't.
<hogliux> anthony25: my slim 7x also randomly wakes-up for me on battery but it's much rarer than on AC (maybe once every 20-30 min or so). Ubuntu's lock screen seems to put the laptop right back to sleep when there is no password input for 30 sec or so.
<hogliux> Thanks @anthony25 that totally worked. Now I just need to write some script that sets `/sys/power/mem_sleep` to `s2idle` on ac and `deep` on battery.
<anthony25> hogliux: I switched to s2idle and it fixed the issue for me
<hogliux> ok interesting. not something i really need - i was just curious
<hogliux> ok
<hogliux> Ahh cool. Do I need to be on a special qemu branch for that? Or some kernel patches I need?
<maz> hogliux: yes, I have a win11 VM running.
<hogliux> maz: ok got it. Thanks. Also just wondering: I use linux vms a lot with qemu on this laptop. Just for fun I tried booting a Windows 11 setup iso. But it freezes shortly after the windows boot progress spinny thing is shown. Have you ever tried booting Windows in qemu on the snapdragon x elite?
<hogliux> max: I think the 7x has some kind of serial UART on the mainboard, but I'd rather just return it on warranty before I start messing around with that. I'm going to re-install the original SSD, then use lenovo's system restore tool and see if it still locks up in Windows. If yes, it's going back.
<hogliux> maz: hmmm anyway to debug this?
<maz> hogliux: if the symptom is the same as when running KVM without the cmdline hack, then it suggests that your FW is catching fire for a reason or another.
<hogliux> kuruczgy: I have maybe 10 seconds of time before it reboots and as it happens so rarely... I don't always have a second machine setup to ssh into. Also, it also freezes the same in Windows, so....
<hogliux> kuruczgy: I can't: same as with the qemu freeze, the watchdog timer seem to reboot the machine before I have a chance to debug
<hogliux> The only difference between our two machines that I can think of is that I replaced my SSD with a larger capacity SSD. Maybe it's drawing too much power or something. I'm going to try to put back the original SSD and see if it makes any difference before I try to get it replaced via my warranty.
<hogliux> Along with the random complete system freezes (exactly the same type of freeze that happens when running qemu without `id_aa64mmfr0.ecv=1`), I think my mainboard must be faulty. I get the same freezes in Windows just much more often.
<hogliux> kuruczgy; thanks, for me it definitely always wakes up after a minute or less on AC.
<kuruczgy> hogliux: Just tested, 10 minutes and it's still sleeping. But I never leave it plugged in for prolonged periods of time, being kept at 100% charge is not good for lithium batteries. (And we don't have charge limiting... yet?)
<hogliux> kuruczgy: does sleep work for you when your laptop is connected to AC power? It will always wake up after less than a minute but it shows the same behavior in Windows. So I guess suspend is just not expected to work with AC connected? Or my 7x is faulty?
<hogliux> anthony25: thank you for your work on lid-switch. Along with macc24 and kuruczgy, I also tried to find the correct gpio but failed. Your patch works great on my slim 7x.

2024-12-12

<macc24> @hogliux: you'll need to run mprime for far longer to be sure cpu cores are rock solid

2024-12-11

<kuruczgy> hogliux: Nope, I use the stock SSD
<hogliux> kuruczgy: TheBITLINK: did you swap out your ssd? I bought a 2 TB ssd and replaced the internal one. Maybe the slim 7x really doesn't like that and it uses too much power or something.
<hogliux> TheBITLINK: Like I said, in Linux it's a lot less common.
<hogliux> TheBITLINK: that aligns with what I'm experiencing in Windows. Usually shortly after boot when I start opening apps.
<hogliux> macc24: thanks for suggesting mprime. can't get it to repro with mprime. Tried all possible command line option combinations. As I said, it's quite rare for me - maybe once a week. And it never happend when the system is under load. Usually when I'm in vs code editing some code.
<macc24> hogliux: try running mprime to see if it's cpu cores weirding out
<TheBITLINK[m]> hogliux: I'm experiencing the same kind of hangs (I have an asus though), for me they usually happen within the first 5 minutes of booting into Windows, and it's annoying since I have to reboot multiple times until it randomly stops happening, the whole system freezes, after a while the fans ramp up to 100% then after a few seconds more it turns off by itself
<kuruczgy> hogliux: nope, for me it's very stable. The only crashes I have gotten was overheating (but that's on orderly shutdown by the kernel and not a crash), qemu without `id_aa64mmfr0.ecv=1`, and Portal 2.
<hogliux> kuruczgy: As I'm running a very similar kernel/setup as you: do you ever have your machine freeze and then reboot?
<hogliux> The rare times I've booted into Windows, I also get BSODs (much more frequently in Windows). So I'm starting to think this may be an issue with my motherboard.
<hogliux> The laptop will just freeze and then reboot after a few seconds. This also happens when I boot into EL2. I've not been able to figure out what is causing this.
<hogliux> A question for the yoga slim 7x folks out there: every since using linux on the device (6.11 rc days) up until now (6.12), I'm getting random laptop hangs about once a week.

2024-11-27

<maz> hogliux: nothing to do with QEMU, really. everything to do with a broken firmware, and KVM using the advertised features...
<hogliux> maz: thank you! I can confirm that fixes the issue with qemu
<maz> hogliux: make sure you pass 'id_aa64mmfr0.ecv=1' on the command-line. otherwise, you trip some firmware bug.
<hogliux> yes!
<hogliux> travmurav: I really like the solution with grub and efidriver. This way you can easily select if you want to boot into EL2 or not from the grub menu.
<kuruczgy> hogliux: I would try strace, see if there is maybe a specific KVM ioctl where it fails
<hogliux> kuruczgy: can't seem to get qemu working on EL2 - it always just immedietly reboots the laptop. I tried latest qemu master, 9.2.0 and the default version on ubuntu 24.04 - none of them seem to work. I wish I had some kind of error log to see why it failed
<hogliux> do you links to these patches?
<hogliux> so these are kernel patches to get KVM working?
<hogliux> maz: qemu patches?
<hogliux> jhovold: kuruczgy: Hmmmm - qemu installed via apt also locks up my machine. I've been using lxd with kvm just fine though. I wonder what's different in qemu.
<hogliux> Hmmm don't quote me on that. I've always had my init script in initrd and added pre-loading snd_soc_wsa884x pretty early on. So I can't really reliably say how often I saw it without the workaround
<hogliux> jhovold: oh without my workaround - I don't know: seemed like 50/50
<hogliux> jhovold: never
<jhovold> hogliux: how often did you hit it without your workaround?
<hogliux> exactly
<hogliux> jhovold: it seems to work for me
<hogliux> jhovold: as long as I load snd_soc_wsa884x in initrd and then let qcom_pd_mapper load later when udev starts properly when ubuntu is booting
<hogliux> jhovold: yeah, so I've got it sorted for me: I have an init bash script in my initrd which loads all the necessary kernel modules
<hogliux> jhovold: I've got slim 7x. So for me I had the same issue with the in kernel pd-mapper
<hogliux> jhovold: also my qemu runs just fine. I've been using linux in EL2 almost daily for a month now
<jhovold> hogliux: btw, audio sometimes not probing with the in-kernel pd-mapper is indeed still an issue
<hogliux> jhovold: yes, yes - not sure what I did wrong that bluetooth wasn't working
<jhovold> hogliux: bluetooth is controlled over uart so should indeed work fine also at el2
<hogliux> kuruczgy[m]: in EL2
<hogliux> kuruczgy[m]: I updated my EL2 kernel and now bluetooth also works for me
<kuruczgy[m]> hogliux: Bluetooth does work for me in EL2

2024-11-26

<JensGlathe[m]> hogliux sounds like the most straight forward way to do it. I guess I will convert my EL2 box to this when the day comes to redo it
<hogliux> kuruczgy[m]: this has the benefit that you can just have two dtbs - one for the EL1 kernel and one for the EL2 kernel
<hogliux> kuruczgy[m]: I then have two grub settings, one for normal boot in EL1 and one for EL2 which calls `efidriver` with slbounce before loading the kernel
<hogliux> kuruczgy[m]: I'm using this grub pacth: https://lore.kernel.org/grub-devel/20240924-cmd-efidriver-v2-1-59ea78e058ab@trvn.ru/T/#u which adds a new grub command called `efidriver`.

2024-11-25

<kuruczgy[m]> @hogliux: thx, good to know. Not having a battery indicator sounds like a big pain point... Are you sure about bluetooth? Isn't that a separate device over uart? Why does it need dsp?
<hogliux> kuruczgy[m]: but anything relying on DSP won't work: battery, Bluetooth etc.
<hogliux> kuruczgy[m]: I'm booting via slbounce. GPU acceleration also works as long as you remove the zap shader from the dtb
<hogliux> kuruczgy[m]: I have EL2 working on slim 7x. See my messages from yesterday.

2024-11-24

<hogliux> Yeah my previous laptop was a 7th gen Intel Dell XPS 13. So anything would feel fast for me.
<hogliux> kuruczgy[m]: My laptop before the 7x was ten years old and the battery so bad that I had the habit of always hibernating it instead of sleeping. So I don't really miss sleeping not working correctly yet on the slim 7x.