Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Thunderbolt on Artix, (renamed, was: "Help building an old kernel (5.19.0)") (Read 1771 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

Thunderbolt on Artix, (renamed, was: "Help building an old kernel (5.19.0)")

Hi,

in order to investigate some issue myself (https://forum.artixlinux.org/index.php/topic,4926.msg31528.html),
and knowing that a XUbuntu 22.10 with a kernel 5.19.0-28.generic was giving satisfying results (i.e. the eGPU being listed in lspci after a hotplug event), I decided to try a kernel 5.19.0 on Artix.

My aim is to see if the eGPU hotplug works on Artix too, with the 5.19.0, and from there try to narrow down which kind of commit has led to this regression.

So I built it and installed it (after a download from the kernel.org archive), using the "traditional method" (with mkinitcpio). I had to replace the pahole-flags.sh file by a newer one.
But in the end I had a kernel and an initram image.

But when I try to boot this new kernel, I'm stuck very early in the boot sequence, at "Starting udevd" or something like that.

I'm aware that this could have something to do with

Code: [Select]
HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck)

that is found in /etc/mkinitcpio.conf.

However I have no idea how to go from there.

Does that mean that autodetect has a problem?

By the way, the "fallback" initramfs 5.19.0 works (the boot sequence completes and I can use my system).
(and by the way, when using this fallback-5.19.0, the eGPU hotplugging does NOT work, which is a bit surprising)

Any hint welcome!

Re: Help building an old kernel (5.19.0)

Reply #1
as an idea, have you considered trying the lts kernel - that's on 5.15 and in the system repo.?

Re: Help building an old kernel (5.19.0)

Reply #2
How about using the old PKGBUILD for the last 5.19 kernel?
Linux 5.19.12 PKGBUILD
linux-5.19.12 config file

Though the issue with eGPU detection may be more like a udev rule to trigger the process or something  similar.
Maybe check out Xubuntu that you observed the hot plug function normally and see if there is an udev rule. If there is migrate it over to /etc/udev.d/rules/ with path and name modifications if required.

Re: Help building an old kernel (5.19.0)

Reply #3
How about using the old PKGBUILD for the last 5.19 kernel?
Linux 5.19.12 PKGBUILD
linux-5.19.12 config file

Though the issue with eGPU detection may be more like a udev rule to trigger the process or something  similar.
Maybe check out Xubuntu that you observed the hot plug function normally and see if there is an udev rule. If there is migrate it over to /etc/udev.d/rules/ with path and name modifications if required.

Nice idea, although, just by checking, there are only two files, /etc/udev/rules.d/70-snap.firefox.rules and /etc/udev/rules.d/70-snap.snapd.rules, the first one only deals with U2F, and in the second one there is no mention of NVidia GPUs or of Razer enclosures.

I'll try, though, but without great hopes!

Re: Help building an old kernel (5.19.0)

Reply #4
as an idea, have you considered trying the lts kernel - that's on 5.15 and in the system repo.?

Thank you for the idea, but I have already tried that, and it still does not work with the 5.15 LTS of Artix, unfortunately...

Although what is funny is that it DOES work for Ubuntu's 5.15.0-43-generic... (but IN UBUNTU, as I have not tried this particular one in Artix)

I have already tried to recompile a 5.15 on Artix, but it was the 5.15.85, and the result is that hotplug still does not work.

So there are two possibilities: either Ubuntu introduces fixes in their -43-generic patch set, or the mainline kernel itself breaks the feature between the 5.15.0 and 5.15.85!

 

Re: Help building an old kernel (5.19.0)

Reply #6

Yeh, thanks, well I had already read it many times, but I'd point out that from the first paragraphes of the wiki I feel already hopeless, as my problem is precisely that my eGPU does not appear at all in lspci when hotplugged.

(although all works well when the eGPU is plugged-before-boot)

EDIT: I am now seeing that there is something about Thunderbolt authorization. You may be onto something there!! If so, really really thank you...

Re: Help building an old kernel (5.19.0)

Reply #7
Yeh, thanks, well I had already read it many times,

Have you read this too?

https://wiki.archlinux.org/title/Thunderbolt#User_device_authorization
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "

Re: Help building an old kernel (5.19.0)

Reply #8

Nope, I hadn't read it!!

You beat me of a few seconds but I had added an edit to my previous message just to say that exactly!!

Thank you, I think this is the solution!

By the way I'm pretty sure this is a recent addition to the wiki. I swear I've read this wiki hundred of times!

Aaaand no, it is not a recent addition. I must be stupid!!

Re: Help building an old kernel (5.19.0)

Reply #9
@lq And THERE IT IS!!! I just added the rule

Code: [Select]
ACTION=="add", SUBSYSTEM=="thunderbolt", ATTR{authorized}=="0", ATTR{authorized}="1"

to my udev files, loaded

Code: [Select]
sudo udevadm control --reload

plugged the eGPU in, and it appears in lspci!!!

Thank you so much!!! And thinking I was getting lost in recompiling kernels dozens of times!!

Re: Help building an old kernel (5.19.0)

Reply #10
Now the really weird situation, forum-wise, is that the solution of the other topic is here, although the title of this one is unrelated...

Re: Help building an old kernel (5.19.0)

Reply #11
Now the really weird situation, forum-wise, is that the solution of the other topic is here, although the title of this one is unrelated...

I'm pretty sure it's not really a problem for you.  ;D
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "

Re: Help building an old kernel (5.19.0)

Reply #12
No udev rule exists, hmmm well it was worth a shot.

Re: Help building an old kernel (5.19.0)

Reply #13
Quote
Code: [Select]
ACTION=="add", SUBSYSTEM=="thunderbolt", ATTR{authorized}=="0", ATTR{authorized}="1"
I guess I was right about it being an udev rule.

Re: Help building an old kernel (5.19.0)

Reply #14
@jspaces Maybe! However there is no trace of this kind of rule in the two files I found in Ubuntu...

Moreover this rule is too wide, I want to narrow it down, but I failed.

For example I tried:

Code: [Select]
ACTION=="add", SUBSYSTEM=="thunderbolt", ATTR{vendor}=="0x10de", ATTR{authorized}=="0", ATTR{authorized}="1"
ACTION=="add", SUBSYSTEM=="thunderbolt", ATTR{vendor}=="0x8086", ATTR{authorized}=="0", ATTR{authorized}="1"

with 8086 being Intel and 10de being NVidia, but when I do this it does not work...

I think it is a bad idea, security-wise, to keep a rule this lenient...