Bug 493199

Summary: Thunderbolt device notifier requests authentication multiple times
Product: [Plasma] plasmashell Reporter: Lassi Väätämöinen <lassi.vaatamoinen>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: dvratil, kde, materka, nate
Priority: NOR    
Version First Reported In: 6.1.4   
Target Milestone: 1.0   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Lassi Väätämöinen 2024-09-16 13:33:00 UTC
I have an automatically authorized TB4 dock, but plasma-thunderbolt
notifies for authorization every time I plug it in. This is the
situation after the third plug-in of the dock today.

1. My dock authorizes automatically each time it is plugged in
2. Plasma shows notification "Thundebolt device needs authorization" -> Fails
3. Boltctl operations fail with "Authorization error: kernel error:
write error: Invalid argument"

But: device is already authorized. Is that the reason for "Invalid argument"?
Below is the boltctl and boltd outputs:

$ sudo boltctl

● Lenovo ThinkPad Thunderbolt 4 Dock
   ├─ type:          peripheral
   ├─ name:          ThinkPad Thunderbolt 4 Dock
   ├─ vendor:        Lenovo
   ├─ uuid:          05b18780-0062-c194-ffff-ffffffffffff
   ├─ generation:    USB4
   ├─ status:        authorization error
   │  ├─ domain:     3068094b-53b5-8780-ffff-ffffffffffff
   │  ├─ rx speed:   40 Gb/s = 2 lanes * 20 Gb/s
   │  ├─ tx speed:   40 Gb/s = 2 lanes * 20 Gb/s
   │  └─ authflags:  none
   ├─ authorized:    ma 16. syyskuuta 2024 12.16.14
   ├─ connected:     ma 16. syyskuuta 2024 12.10.39
   └─ stored:        no

$ sudo boltctl enroll --policy auto 05b18780-0062-c194-ffff-ffffffffffff


15:17:16 dbus: query_authorization returned:
15:17:16 dbus: authorization done: yes
15:17:16 [05b18780-0062-ThinkPad Thunderb] status changed: auth-error ->
15:17:16 probing: started [1000
15:17:16 dbus: prop Probing
15:17:16 dbus: emitted property 1
15:17:16 dbus: prop Status
15:17:16 dbus: emitted property 1
15:17:16 [05b18780-0062-ThinkPad Thunderb] authorize: authorization
prepared for 'none'
15:17:16 [05b18780-0062-ThinkPad Thunderb] authorize: writing
authorization 15:17:16 [05b18780-0062-ThinkPad Thunderb] authorize:
finished: FAIL (status: auth-error, flags: 0
15:17:16 [05b18780-0062-ThinkPad Thunderb] status changed: authorizing
-> auth-error 15:17:16 dbus: prop Status changed
15:17:16 dbus: prop AuthorizeTime changed
15:17:16 dbus: emitted property 2 changes


$ sudo boltctl authorize 05b18780-0062-c194-ffff-ffffffffffff

15:19:23 dbus: query_authorization returned: yes
15:19:23 dbus: authorization done: yes
15:19:23 [05b18780-0062-ThinkPad Thunderb] status changed: auth-error
-> authorizing
15:19:23 probing: started [1000]
15:19:23 dbus: prop Probing changed
15:19:23 dbus: emitted property 1 changes
15:19:23 dbus: prop Status changed
15:19:23 dbus: emitted property 1 changes
15:19:23 [05b18780-0062-ThinkPad Thunderb] authorize: authorization
prepared for 'none' level
15:19:23 [05b18780-0062-ThinkPad Thunderb] authorize: writing authorization
15:19:23 [05b18780-0062-ThinkPad Thunderb] authorize: finished: FAIL
(status: auth-error, flags: 0)
15:19:23 [05b18780-0062-ThinkPad Thunderb] status changed: authorizing
-> auth-error
15:19:23 dbus: prop Status changed
15:19:23 dbus: prop AuthorizeTime changed
15:19:23 dbus: emitted property 2 changes



SYSTEM INFORMATION
Operating System: openSUSE Tumbleweed-Slowroll 20240803
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.8-1-default (64-bit)
Graphics Platform: Wayland
Processors: 16 × 11th Gen Intel® Core™ i7-11850H @ 2.50GHz
Memory: 46,8 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: LENOVO
Product Name: 20YRS21300
System Version: ThinkPad P15 Gen 2i
Comment 1 Nate Graham 2024-09-16 16:56:41 UTC
Could be, yeah. Needs someone with Thunderbolt hardware and familiarity with the Thunderbolt software stack to debug it.
Comment 2 Lassi Väätämöinen 2024-09-17 09:39:22 UTC
(In reply to Nate Graham from comment #1)
> Needs someone with Thunderbolt hardware and familiarity with
> the Thunderbolt software stack to debug it.

Not sure, but maybe this guy behind plasma-thunderbolt ( https://invent.kde.org/plasma/plasma-thunderbolt ) should know it to some extent:

Daniel Vrátil dvratil@kde.org

I tried emailing him first, as there is no Bugzilla component for plasma-thunderbolt, but I got a "not delivered" -notification for some (corporate GMail?) reason.
Comment 3 Lassi Väätämöinen 2024-09-17 09:41:12 UTC
(In reply to Lassi Väätämöinen from comment #2)
> I tried emailing him first, as there is no Bugzilla component for
> plasma-thunderbolt, but I got a "not delivered" -notification for some
> (corporate GMail?) reason.

This is rather off-topic:

---- snip ----

This is the mail system at host letterbox.kde.org.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

------------------

No idea who the 'postmaster' is. There is no contact info, and the letterbox -address just says "I handle mail".