Bug 218045 - sysfs: cannot create duplicate filename .../system76_acpi::kbd_backlight/color
Summary: sysfs: cannot create duplicate filename .../system76_acpi::kbd_backlight/color
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Platform_x86 (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: drivers_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-25 16:13 UTC by Johannes Penßel
Modified: 2023-12-11 00:44 UTC (History)
3 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
6.6-rc7 kernel log (80.91 KB, text/plain)
2023-10-25 16:13 UTC, Johannes Penßel
Details

Description Johannes Penßel 2023-10-25 16:13:20 UTC
Created attachment 305292 [details]
6.6-rc7 kernel log

Loading the system76-acpi kernel module fails on linux 6.6-rc7. This does not seem to be an issue with system76-acpi itself, because reverting commit #5d36931f0fe51665c04f56c027613d22e6a03411, which is the only change made to this driver across the 6.6 development cycle, does not fix the issue. On 6.5.8, everything works fine. My hardware is a Clevo-based Alder Lake laptop running coreboot, roughly similar to the System76 Darter Pro 8.

backtrace:
[  266.399036] sysfs: cannot create duplicate filename '/devices/LNXSYSTM:00/LNXSYBUS:00/17761776:00/leds/system76_acpi::kbd_backlight/color'
[  266.399045] CPU: 1 PID: 2896 Comm: modprobe Not tainted 6.6.0-rc7 #1
[  266.399050] Hardware name: Notebook NS5x_NS7xPU/NS5x_NS7xPU, BIOS Dasharo (coreboot+UEFI) v1.6.0 03/30/2023
[  266.399053] Call Trace:
[  266.399057]  <TASK>
[  266.399063]  dump_stack_lvl+0x36/0x50
[  266.399080]  sysfs_warn_dup+0x5a/0x70
[  266.399088]  sysfs_add_file_mode_ns+0x11a/0x130
[  266.399094]  internal_create_group+0x125/0x3b0
[  266.399101]  internal_create_groups+0x42/0xa0
[  266.399107]  device_add+0x5b1/0x8a0
[  266.399113]  ? kstrdup+0x4c/0x70
[  266.399119]  device_create_groups_vargs+0xce/0xf0
[  266.399124]  device_create_with_groups+0x4b/0x70
[  266.399129]  led_classdev_register_ext+0x1d2/0x470 [led_class]
[  266.399149]  ? devm_led_classdev_register_ext+0x3a/0x90 [led_class]
[  266.399162]  devm_led_classdev_register_ext+0x50/0x90 [led_class]
[  266.399173]  system76_add+0x18b/0x460 [system76_acpi]
[  266.399186]  acpi_device_probe+0x47/0x130
[  266.399193]  really_probe+0x19b/0x3e0
[  266.399199]  ? __pfx___driver_attach+0x10/0x10
[  266.399205]  __driver_probe_device+0x78/0x160
[  266.399211]  driver_probe_device+0x1f/0x90
[  266.399217]  __driver_attach+0xd2/0x1c0
[  266.399222]  bus_for_each_dev+0x85/0xd0
[  266.399227]  bus_add_driver+0x116/0x220
[  266.399233]  driver_register+0x59/0x100
[  266.399242]  ? __pfx_system76_driver_init+0x10/0x10 [system76_acpi]
[  266.399252]  do_one_initcall+0x5a/0x300
[  266.399260]  do_init_module+0x60/0x240
[  266.399267]  init_module_from_file+0x86/0xc0
[  266.399275]  __x64_sys_finit_module+0x18a/0x350
[  266.399282]  do_syscall_64+0x5d/0x90
[  266.399289]  ? syscall_exit_to_user_mode+0x26/0x40
[  266.399295]  ? do_syscall_64+0x6c/0x90
[  266.399300]  ? do_syscall_64+0x6c/0x90
[  266.399305]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[  266.399314] RIP: 0033:0x7f5c11b38d7d
[  266.399360] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 7b d0 0b 00 f7 d8 64 89 01 48
[  266.399364] RSP: 002b:00007ffe30e15b88 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[  266.399370] RAX: ffffffffffffffda RBX: 000055a8d48d6c10 RCX: 00007f5c11b38d7d
[  266.399372] RDX: 0000000000000000 RSI: 000055a8d3077d8b RDI: 0000000000000003
[  266.399375] RBP: 000055a8d3077d8b R08: 00007f5c11bf6b00 R09: 00007ffe30e15bd0
[  266.399376] R10: 0000000000000050 R11: 0000000000000246 R12: 0000000000040000
[  266.399378] R13: 000055a8d48d6c90 R14: 000055a8d48d6390 R15: 000055a8d48d7090
[  266.399382]  </TASK>
[  266.399410] System76 ACPI Driver: probe of 17761776:00 failed with error -17
Comment 1 Bagas Sanjaya 2023-10-26 03:22:43 UTC
(In reply to Johannes Penßel from comment #0)
> Created attachment 305292 [details]
> 6.6-rc7 kernel log
> 
> Loading the system76-acpi kernel module fails on linux 6.6-rc7. This does
> not seem to be an issue with system76-acpi itself, because reverting commit
> #5d36931f0fe51665c04f56c027613d22e6a03411, which is the only change made to
> this driver across the 6.6 development cycle, does not fix the issue. On
> 6.5.8, everything works fine. My hardware is a Clevo-based Alder Lake laptop
> running coreboot, roughly similar to the System76 Darter Pro 8.
> 

Then can you find the proper culprit by bisection?
Comment 2 Johannes Penßel 2023-10-28 15:29:37 UTC
The culprit seems to be commit c7d80059b086c4986cd994a1973ec7a5d75f8eea, which introduces a new 'color' attribute for led sysfs class devices. The problem is that the system76-acpi platform driver tries to create the exact same sysfs attribute itself for the system76_acpi::kbd_backlight device, leading to the conflict. For testing purposes, I've just rebuilt the kernel with the system76-apci color attribute renamed to kb_color, and that fixes the issue.
Comment 3 Arthur Borsboom 2023-11-10 22:10:20 UTC
Possibly related/similar problem for the Logitech G510s keyboard on kernel 6.6.1. Kernel 6.5.9 works fine.

[    7.990759] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:02.1/0000:03:00.0/0000:04:08.0/0000:07:00.0/0000:08:0c.0/0000:0c:00.0/usb1/1-3/1-3:1.1/0003:046D:C22D.000B/leds/g15::kbd_backlight/color'
[    7.990762] CPU: 4 PID: 451 Comm: (udev-worker) Tainted: G           OE      6.6.1-arch1-1 #1 be166a630cd909acf8820643140e9106c6ea80e6
[    7.990766] Hardware name: ASUS System Product Name/TUF GAMING X670E-PLUS WIFI, BIOS 1813 10/13/2023
[    7.990767] Call Trace:
[    7.990769]  <TASK>
[    7.990771]  dump_stack_lvl+0x47/0x60
[    7.990778]  sysfs_warn_dup+0x5a/0x70
[    7.990783]  sysfs_add_file_mode_ns+0x11a/0x130
[    7.990786]  internal_create_group+0x125/0x3b0
[    7.990789]  internal_create_groups+0x42/0xa0
[    7.990791]  device_add+0x5ad/0x8a0
[    7.990794]  ? srso_alias_return_thunk+0x5/0x7f
[    7.990798]  ? kstrdup+0x4c/0x70
[    7.990802]  device_create_groups_vargs+0xce/0xf0
[    7.990805]  device_create_with_groups+0x4b/0x70
[    7.990808]  led_classdev_register_ext+0x1d2/0x470
[    7.990812]  ? devm_led_classdev_register_ext+0x3a/0x90
[    7.990817]  devm_led_classdev_register_ext+0x50/0x90
[    7.990820]  lg_g15_probe+0x667/0x770 [hid_lg_g15 4a43fb61ec72c8e966287bea16924535918cb678]
[    7.990826]  hid_device_probe+0x10e/0x1a0
[    7.990829]  really_probe+0x19b/0x3e0
[    7.990833]  ? __pfx___device_attach_driver+0x10/0x10
[    7.990835]  __driver_probe_device+0x78/0x160
[    7.990838]  driver_probe_device+0x1f/0x90
[    7.990841]  __device_attach_driver+0x89/0x110
[    7.990844]  bus_for_each_drv+0x92/0xf0
[    7.990847]  __device_attach+0xb2/0x1b0
[    7.990850]  ? __pfx___hid_bus_reprobe_drivers+0x10/0x10
[    7.990853]  device_reprobe+0x4e/0x90
[    7.990855]  ? __hid_bus_reprobe_drivers+0x39/0x60
[    7.990857]  bus_for_each_dev+0x85/0xd0
[    7.990860]  ? __pfx___hid_bus_driver_added+0x10/0x10
[    7.990862]  __hid_bus_driver_added+0x2c/0x40
[    7.990865]  bus_for_each_drv+0x92/0xf0
[    7.990868]  __hid_register_driver+0x74/0x80
[    7.990871]  ? __pfx_ms_driver_init+0x10/0x10 [hid_microsoft a9a7eb35e2e5d1c3f68fd046c8c3a94730fe7fdb]
[    7.990876]  do_one_initcall+0x5a/0x320
[    7.990883]  do_init_module+0x60/0x240
[    7.990888]  init_module_from_file+0x89/0xe0
[    7.990894]  idempotent_init_module+0x120/0x2b0
[    7.990898]  __x64_sys_finit_module+0x5e/0xb0
[    7.990901]  do_syscall_64+0x5d/0x90
[    7.990904]  ? do_syscall_64+0x6c/0x90
[    7.990906]  ? srso_alias_return_thunk+0x5/0x7f
[    7.990908]  ? exit_to_user_mode_prepare+0x132/0x1f0
[    7.990911]  ? srso_alias_return_thunk+0x5/0x7f
[    7.990914]  ? syscall_exit_to_user_mode+0x2b/0x40
[    7.990916]  ? srso_alias_return_thunk+0x5/0x7f
[    7.990918]  ? do_syscall_64+0x6c/0x90
[    7.990920]  ? syscall_exit_to_user_mode+0x2b/0x40
[    7.990922]  ? srso_alias_return_thunk+0x5/0x7f
[    7.990924]  ? do_syscall_64+0x6c/0x90
[    7.990927]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8

Full kernel log: http://ix.io/4Lba
Comment 5 Arthur Borsboom 2023-12-10 11:40:38 UTC
I confirm that the Logitech G510s keyboard regression is fixed in Arch kernel 6.6.5.

Note You need to log in before you can comment on or make changes to this bug.