UB
Universal Blueβ€’2mo ago
68x

Testing USB4 and Mainline kernel

I am creating this help thread so @antheas can help me step through setting up EndavourOS w/ the mainline kernel. This is to test my USB4 Egpu and LeGo's sleep/wake failures.
97 Replies
antheas
antheasβ€’2mo ago
you have endeavor os? how many logical cores do you have?
68x
68xOPβ€’2mo ago
I just got it installed nad booting into I got the Z1E should be 8 Cores/16 Threads
antheas
antheasβ€’2mo ago
wget https://git.kernel.org/torvalds/t/linux-6.12-rc4.tar.gz and extract it somewhere
68x
68xOPβ€’2mo ago
I got the archvie downloaded and extracted Want me to run a make -j 8?
antheas
antheasβ€’2mo ago
no first, plug in everything you will want to use second make localmodconfig then make random choices make pacman-pkg -j 16 then finally this which will spit the kernel sudo pacman -U linux-upstream and if you have dkms linux-headers-upstream thats it should take around 5-10min
68x
68xOPβ€’2mo ago
got it
antheas
antheasβ€’2mo ago
also reconfigure grub to see linux-upstream so you can boot it (i dont have the command with me for that)
68x
68xOPβ€’2mo ago
I'll figure out the arch bits I have to step out for a bit, let me get back to you in a couple of hours πŸ˜…
antheas
antheasβ€’2mo ago
i will be asleep in 4 hours
68x
68xOPβ€’2mo ago
Got it, let me get the build going BTW my USB4 enclosure should be connected, right?
antheas
antheasβ€’2mo ago
before running localmodconfig after that it doesnt matter otherwise anything needed to run it wont be built
68x
68xOPβ€’2mo ago
It looks like the thunderbolt/usb authorization is not popping up 😦
antheas
antheasβ€’2mo ago
you might need to install a package connect it first, make it crash then, connect it again and reboot run localmodconfig and compile the kernel
68x
68xOPβ€’2mo ago
got it I just needed the plasma-thunderbolt aur package, let me get the build going now I don't the upstream package exists for the 6.12 rc4 kernel
antheas
antheasβ€’2mo ago
the way i told you is faster there is no prebuilt 6.12 rc4 building the full arch config take 45min
68x
68xOPβ€’2mo ago
I mean this is what I am getting when I run make pacman-pkg -j 16:
[kprinssu@kishor-legion linux-6.12-rc4]$ make pacman-pkg -j 16
UPD include/config/kernel.release
BUILDDIR="/home/kprinssu/Desktop/linux-6.12-rc4/pacman" \
CARCH="x86_64" \
KBUILD_MAKEFLAGS="rR -j16 --jobserver-auth=fifo:/tmp/GMfifo3270 --no-print-directory" \
KBUILD_REVISION="1" \
makepkg
==> Making package: linux-upstream 6.12.0_rc4-1 (Mon 21 Oct 2024 11:44:14 AM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Missing dependencies:
-> bc
==> ERROR: Could not resolve all dependencies.
make[2]: *** [scripts/Makefile.package:150: pacman-pkg] Error 8
make[1]: *** [/home/kprinssu/Desktop/linux-6.12-rc4/Makefile:1557: pacman-pkg] Error 2
make: *** [Makefile:224: __sub-make] Error 2
[kprinssu@kishor-legion linux-6.12-rc4]$ make pacman-pkg -j 16
UPD include/config/kernel.release
BUILDDIR="/home/kprinssu/Desktop/linux-6.12-rc4/pacman" \
CARCH="x86_64" \
KBUILD_MAKEFLAGS="rR -j16 --jobserver-auth=fifo:/tmp/GMfifo3270 --no-print-directory" \
KBUILD_REVISION="1" \
makepkg
==> Making package: linux-upstream 6.12.0_rc4-1 (Mon 21 Oct 2024 11:44:14 AM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Missing dependencies:
-> bc
==> ERROR: Could not resolve all dependencies.
make[2]: *** [scripts/Makefile.package:150: pacman-pkg] Error 8
make[1]: *** [/home/kprinssu/Desktop/linux-6.12-rc4/Makefile:1557: pacman-pkg] Error 2
make: *** [Makefile:224: __sub-make] Error 2
I am an idiot, let me look at the missing depednency πŸ˜…
antheas
antheasβ€’2mo ago
yeah depenencies is the one thing i cant help with did it once and was over with
68x
68xOPβ€’2mo ago
All good, it's going after a installing bc This is going to take a while so see you in an hour or so lol
antheas
antheasβ€’2mo ago
i told you it takes 5-10 min if you do localmodconfig
68x
68xOPβ€’2mo ago
(I have to head back to work 😦 )
antheas
antheasβ€’2mo ago
in my OXP X1 making a config for the Ally X it takes 2-4min after doing a build or something i think
68x
68xOPβ€’2mo ago
Gotcha, I'll wait for the build to finish BTW the localmodconfig took < 1 min on my device
antheas
antheasβ€’2mo ago
that just makes a config
68x
68xOPβ€’2mo ago
So sudo pacman -U linux-upstream will install the built package
antheas
antheasβ€’2mo ago
yea uname -r to check after you reboot well you need the filename full filename for it just press tab
68x
68xOPβ€’2mo ago
πŸ‘ I'll be back in an hour or so, need to head back to work πŸ˜… @antheas It got built lol Do you know doing sudo pacman -U linux-upstream says that the package is not found
antheas
antheasβ€’2mo ago
i told you full file name it has a bunch of stuff after upstream hit tab
68x
68xOPβ€’2mo ago
Gotcha, sorry I am bouncing three computers I got the 6.12 kernel booted but it's stuck at looking for non-existent drivers 😦
68x
68xOPβ€’2mo ago
No description
antheas
antheasβ€’2mo ago
something something localmodconfig will only capture what was in your system if you want to wait an hour for the full kernel
68x
68xOPβ€’2mo ago
Got it, it's probably my thunderbolt encolsure's external SSD
antheas
antheasβ€’2mo ago
rm .config
68x
68xOPβ€’2mo ago
I'll re-configure and build again without the SSD installed
antheas
antheasβ€’2mo ago
zcat /proc/config.gz > .config or yea do that unplug the ssd seems like its fstab the build will take 45m if you run the commands i sent
68x
68xOPβ€’2mo ago
Ugh got it, I'll run the longer build, hold on I got the big kernel built @antheas The sleep/wake works just fine on the latest 6.12 rc4 kernel Multiple times in a row
antheas
antheasβ€’2mo ago
ok jump on bazzite unstable then, with a fresh kernel that fixes my issue and check out if it sleeps there too
68x
68xOPβ€’2mo ago
will do, I need another few mins to switch over to there
antheas
antheasβ€’2mo ago
then if it does not work send mario this and kindly ask what patches are missing
68x
68xOPβ€’2mo ago
I will I'll continue to play around with the 6.12 kernel few more times Ny sample size of 4-5 sleep/wake cycles is a bit small πŸ˜… I also have no luck with Bazzite unstable 😦 It seems to not wake successfully
antheas
antheasβ€’2mo ago
Did you try endeavor os stock kernel? And uname -r it?
68x
68xOPβ€’2mo ago
It was running 6.12 rc4 when on Endeavour when it was working Do you want me to run the stock 6.11 kernel?
antheas
antheasβ€’2mo ago
Use the Linux package Uname -r should say 6.11.4
68x
68xOPβ€’2mo ago
Will do, let me get a Google Sheet doc going to write out the test cases here
antheas
antheasβ€’2mo ago
If it doesn't work we're cookrd
68x
68xOPβ€’2mo ago
πŸ˜… @antheas The package should be linux-mainline?
antheas
antheasβ€’2mo ago
Just Linux If it does work we're cooked I mean If it doesn't it's Mario's problem
68x
68xOPβ€’2mo ago
Got it My egpu and sleep/wake works on the default 6.11.4-arch2-1 kernel πŸ˜…
antheas
antheasβ€’2mo ago
Rip Was it ever broken? In endeavor
68x
68xOPβ€’2mo ago
I think I never tested the 6.11 kernel on Endeavour
antheas
antheasβ€’2mo ago
What's the stock one
68x
68xOPβ€’2mo ago
Stock would be the 6.11 kernel no?
antheas
antheasβ€’2mo ago
You never tested the built in kernel?
68x
68xOPβ€’2mo ago
*The built-in kernel is 6.11.4-arch2-1, this works
antheas
antheasβ€’2mo ago
So everything works in endeavoros? Did you find a broken kernel there?
68x
68xOPβ€’2mo ago
No, not thus far, everything works it looks like Bazzite has a breaking change 😦
antheas
antheasβ€’2mo ago
Did you sleep bazzite in kde or gamemode?
68x
68xOPβ€’2mo ago
It's flaky in gamemode/gamescope, let me re-test on KDE
antheas
antheasβ€’2mo ago
I thought you did kde
68x
68xOPβ€’2mo ago
I am unsure now, let me re-test this a few more times
antheas
antheasβ€’2mo ago
Does bazzite work rn? In kde
68x
68xOPβ€’2mo ago
I am hopping b/w work and Discord, let me follow up in 5 mins It works on stable, but it freezes after a few times Few times being, where I repeatedly and consecutively sleep/wake the device. It failed on the 3rd try
antheas
antheasβ€’2mo ago
Try unstable also That's kind of expected if you don't wait at least 10 seconds You will probably find endeavoros is the same
68x
68xOPβ€’2mo ago
Yep, I noticed that too
antheas
antheasβ€’2mo ago
So we're back at the question of whether it ever worked
68x
68xOPβ€’5w ago
At least we figured out the test cases, let me go through it out all, this will take a bit
antheas
antheasβ€’5w ago
You can't run gamescope in endeavoros and even if you can you're probably cooked Because it won't work Unless you wanna play with cachyos too Although there everything is lto fancy compiled And everything is broken It's probably gamescope tbh
68x
68xOPβ€’5w ago
I don't want to spend more time going down the rabbit hole πŸ˜… It looks like so
antheas
antheasβ€’5w ago
Tell Mario KDE works in bazzite too and to tell you how to get a log And get one from unstable I'll try to make some vanilla kernels
68x
68xOPβ€’5w ago
I am noticing the freezes on Bazzite stable build 😦
antheas
antheasβ€’5w ago
Well stable is an ancient kernel Go to unstable it's better for now, other than the selinux issues Classic fedora transition
68x
68xOPβ€’5w ago
Will do I am able to reproduce the hard lock on unstable with the 6.11 kernel 😦
antheas
antheasβ€’5w ago
On kde
68x
68xOPβ€’5w ago
Yeah, I also waited 10s and repeated and reproduced across two boots
antheas
antheasβ€’5w ago
And on endeavor it's rock solid?
68x
68xOPβ€’5w ago
Let me re-test on Endeavour to be more certain I am able to reproduce the hard lock on Endeavour w/ 6.11 I am also able to reproduce this on 6.12 rc4 too What changed was I disabled the screen lock on sleep/wake πŸ˜…
antheas
antheasβ€’5w ago
I don't understand why that helped
68x
68xOPβ€’5w ago
Me neither πŸ˜… I'll boot into Endeavour and attempt another round of testing errr it's consisntently working now, I am going to say user error It's hard to pin this down without logs @antheas any chance I can just buy and donate to you a thunderbolt gpu enclosure?
antheas
antheasβ€’5w ago
with what gpu lmao i dont have space for it its not user error its inconsistent you need logs to debug it
68x
68xOPβ€’5w ago
I'll reach out to Mario then
antheas
antheasβ€’5w ago
tell him gamescope is completely busted and 6.11, 6.12, and bazzite 6.11 are equally semi-busted
68x
68xOPβ€’5w ago
anything particular than busted? Honestly, I was hoping if you could supply your own GPU πŸ˜…
antheas
antheasβ€’5w ago
pray oxp gets interested and sends something but for now lets fix these handhelds
68x
68xOPβ€’5w ago
GitLab
Hard lock with External GPU on sleep/wake cycle (#3706) Β· Issues Β· ...
Brief summary of the problem: My current device is a Lenovo Legion Go with an external GPU (egpu) connected over USB...
68x
68xOPβ€’5w ago
I got some logs πŸ”₯
68x
68xOPβ€’5w ago
No description
antheas
antheasβ€’5w ago
nice
68x
68xOPβ€’5w ago
It looks like the device is inaccessible The GPU is probably disconnected while the driver is being unloaded. It’s probably a race condition?
antheas
antheasβ€’5w ago
seems like a series of errors i know nothing about
68x
68xOPβ€’5w ago
I’ll ask Mario upstream, thanks for the troubleshooting help
antheas
antheasβ€’5w ago
well since you tagged me im part of that conversation anyway oh you have the fancy oxp gpu thats nice
68x
68xOPβ€’5w ago
Yeah, I just got it a few weeks back
antheas
antheasβ€’5w ago
oxp makes nice devices x1 is better than the legion go, except its controllers its controllers are kinda sad
68x
68xOPβ€’5w ago
I really wanted the X1 mini but it's like $1500-1800 CAD πŸ˜…
antheas
antheasβ€’5w ago
x1 mini i think has the screen of the legion go or very similar the big screen is the nice one
68x
68xOPβ€’2w ago
yeah and it has connector for a proper detachable keyboard I am waiting for the new Strix point APUs It looks like I found an upstream kernel bug @antheas Is there an way for an end user like me to raise awareness on the Linux kernel bugzilla?
antheas
antheasβ€’2w ago
Do you know a kernel version where it works?
68x
68xOPβ€’2w ago
None as far as I can tell, I can roll some older kernels to troubleshoot (e.g. 6.5 to 6.8) I also tried the eGPU on another device and I ran into the same error 😦 BTW it's an issue with the USB/TB kernel modules
Want results from more Discord servers?
Add your server