Linux bluetooth development
 help / color / mirror / Atom feed
* Firmware for MT7922 missing in initrd; bluetooth disabled after update
@ 2023-08-10 20:24 Jürgen Hofmann
  2023-08-12  9:02 ` Paul Menzel
  0 siblings, 1 reply; 5+ messages in thread
From: Jürgen Hofmann @ 2023-08-10 20:24 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: tiwai

Hi everybody,

I updated openSuse Tumbleweed 20230806 with a bluetooth keyboard 
attached to the PC. After the update to 20230808 and rebooting bluetooth 
was disabled and it was impossible to enable it again. Before the update 
bluetooth was working fine.

The attached bluetooth keyboard caused the bluetooth module being added 
to initrd. However, the corresponding firmware for MT7922 is not added.

dmesg shows:

[    4.368031] bluetooth hci0: Direct firmware load for 
mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin failed with error -2

In fact the file is present on the system

ls -l /usr/lib/firmware/mediatek/BT_RAM_CODE*
-rw-r--r-- 1 root root 512104  3. Aug 17:36 
/usr/lib/firmware/mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin.xz
-rw-r--r-- 1 root root 343052  3. Aug 17:36 
/usr/lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin.xz

but missing in initrd

lsinitrd | grep BT_RAM_CODE
-rw-r--r--   1 root     root       343052 Aug  3 17:36 
usr/lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin.xz

Manually adding the file to initrd makes bluetooth work again.

I reported the bug here
https://bugzilla.suse.com/show_bug.cgi?id=1214133
and was requested to report here.

If I can be of any help or you need further information please let me know.

Thanks and kind regards

Jürgen

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Firmware for MT7922 missing in initrd; bluetooth disabled after update
  2023-08-10 20:24 Firmware for MT7922 missing in initrd; bluetooth disabled after update Jürgen Hofmann
@ 2023-08-12  9:02 ` Paul Menzel
  2023-08-12 10:03   ` Takashi Iwai
  2023-08-12 10:57   ` Qu Wenruo
  0 siblings, 2 replies; 5+ messages in thread
From: Paul Menzel @ 2023-08-12  9:02 UTC (permalink / raw)
  To: Jürgen Hofmann; +Cc: linux-bluetooth, Takashi Iwai, Qu Wenruo, Chris Lu

[Cc: +Qu, +Chris]

Dear Jürgen,


Am 10.08.23 um 22:24 schrieb Jürgen Hofmann:

> I updated openSuse Tumbleweed 20230806 with a bluetooth keyboard 
> attached to the PC. After the update to 20230808 and rebooting bluetooth 
> was disabled and it was impossible to enable it again. Before the update 
> bluetooth was working fine.

Sorry, I do not know what software versions changed updating to openSUSE 
Tumbleweed. Could you please mention that for the Linux kernel and BlueZ 
and the initrd generator?

> The attached bluetooth keyboard caused the bluetooth module being added 
> to initrd. However, the corresponding firmware for MT7922 is not added.
> 
> dmesg shows:
> 
> [    4.368031] bluetooth hci0: Direct firmware load for mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin failed with error -2
> 
> In fact the file is present on the system
> 
> ls -l /usr/lib/firmware/mediatek/BT_RAM_CODE*
> -rw-r--r-- 1 root root 512104  3. Aug 17:36 /usr/lib/firmware/mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin.xz
> -rw-r--r-- 1 root root 343052  3. Aug 17:36 /usr/lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin.xz
> 
> but missing in initrd
> 
> lsinitrd | grep BT_RAM_CODE
> -rw-r--r--   1 root     root       343052 Aug  3 17:36 usr/lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin.xz
> 
> Manually adding the file to initrd makes bluetooth work again.
> 
> I reported the bug here
> https://bugzilla.suse.com/show_bug.cgi?id=1214133
> and was requested to report here.
> 
> If I can be of any help or you need further information please let me
> know.
 From Qu’s answer in the thread *[PATCH v3 1/2] Bluetooth: btusb: Add 
new VID/PID 0489/e102 for MT7922* [1] it sounds to me, support for chip 
was only added recently, and is going to be in Linux v6.6.


Kind regards,

Paul


[1]: 
https://lore.kernel.org/linux-bluetooth/8a261418-17ca-405f-b340-7e6634c169bc@suse.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Firmware for MT7922 missing in initrd; bluetooth disabled after update
  2023-08-12  9:02 ` Paul Menzel
@ 2023-08-12 10:03   ` Takashi Iwai
  2023-08-14  9:06     ` Jürgen Hofmann
  2023-08-12 10:57   ` Qu Wenruo
  1 sibling, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2023-08-12 10:03 UTC (permalink / raw)
  To: Paul Menzel
  Cc: Jürgen Hofmann, linux-bluetooth, Takashi Iwai, Qu Wenruo,
	Chris Lu

On Sat, 12 Aug 2023 11:02:04 +0200,
Paul Menzel wrote:
> 
> [Cc: +Qu, +Chris]
> 
> Dear Jürgen,
> 
> 
> Am 10.08.23 um 22:24 schrieb Jürgen Hofmann:
> 
> > I updated openSuse Tumbleweed 20230806 with a bluetooth keyboard
> > attached to the PC. After the update to 20230808 and rebooting
> > bluetooth was disabled and it was impossible to enable it
> > again. Before the update bluetooth was working fine.
> 
> Sorry, I do not know what software versions changed updating to
> openSUSE Tumbleweed. Could you please mention that for the Linux
> kernel and BlueZ and the initrd generator?
> 
> > The attached bluetooth keyboard caused the bluetooth module being
> > added to initrd. However, the corresponding firmware for MT7922 is
> > not added.
> > 
> > dmesg shows:
> > 
> > [    4.368031] bluetooth hci0: Direct firmware load for mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin failed with error -2
> > 
> > In fact the file is present on the system
> > 
> > ls -l /usr/lib/firmware/mediatek/BT_RAM_CODE*
> > -rw-r--r-- 1 root root 512104  3. Aug 17:36 /usr/lib/firmware/mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin.xz
> > -rw-r--r-- 1 root root 343052  3. Aug 17:36 /usr/lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin.xz
> > 
> > but missing in initrd
> > 
> > lsinitrd | grep BT_RAM_CODE
> > -rw-r--r--   1 root     root       343052 Aug  3 17:36 usr/lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin.xz
> > 
> > Manually adding the file to initrd makes bluetooth work again.
> > 
> > I reported the bug here
> > https://bugzilla.suse.com/show_bug.cgi?id=1214133
> > and was requested to report here.
> > 
> > If I can be of any help or you need further information please let me
> > know.
> From Qu’s answer in the thread *[PATCH v3 1/2] Bluetooth: btusb: Add
> new VID/PID 0489/e102 for MT7922* [1] it sounds to me, support for
> chip was only added recently, and is going to be in Linux v6.6.

The problem is rather the lack of MODULE_FIRMWARE() declarations for
the corresponding device.  The device itself already works fine as is
with the current upstream kernel as long as the firmware file is
present on the system.  But as dracut puts only the firmware file
listed in MODULE_FIRMWARE() into initrd, it starts failing once when
you build an initrd containing the BT.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Firmware for MT7922 missing in initrd; bluetooth disabled after update
  2023-08-12  9:02 ` Paul Menzel
  2023-08-12 10:03   ` Takashi Iwai
@ 2023-08-12 10:57   ` Qu Wenruo
  1 sibling, 0 replies; 5+ messages in thread
From: Qu Wenruo @ 2023-08-12 10:57 UTC (permalink / raw)
  To: Paul Menzel, Jürgen Hofmann; +Cc: linux-bluetooth, Takashi Iwai, Chris Lu



On 2023/8/12 17:02, Paul Menzel wrote:
> [Cc: +Qu, +Chris]
> 
> Dear Jürgen,
> 
> 
> Am 10.08.23 um 22:24 schrieb Jürgen Hofmann:
> 
>> I updated openSuse Tumbleweed 20230806 with a bluetooth keyboard 
>> attached to the PC. After the update to 20230808 and rebooting 
>> bluetooth was disabled and it was impossible to enable it again. 
>> Before the update bluetooth was working fine.
> 
> Sorry, I do not know what software versions changed updating to openSUSE 
> Tumbleweed. Could you please mention that for the Linux kernel and BlueZ 
> and the initrd generator?
> 
>> The attached bluetooth keyboard caused the bluetooth module being 
>> added to initrd. However, the corresponding firmware for MT7922 is not 
>> added.
>>
>> dmesg shows:
>>
>> [    4.368031] bluetooth hci0: Direct firmware load for 
>> mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin failed with error -2
>>
>> In fact the file is present on the system
>>
>> ls -l /usr/lib/firmware/mediatek/BT_RAM_CODE*
>> -rw-r--r-- 1 root root 512104  3. Aug 17:36 
>> /usr/lib/firmware/mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin.xz
>> -rw-r--r-- 1 root root 343052  3. Aug 17:36 
>> /usr/lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin.xz
>>
>> but missing in initrd
>>
>> lsinitrd | grep BT_RAM_CODE
>> -rw-r--r--   1 root     root       343052 Aug  3 17:36 
>> usr/lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin.xz
>>
>> Manually adding the file to initrd makes bluetooth work again.
>>
>> I reported the bug here
>> https://bugzilla.suse.com/show_bug.cgi?id=1214133
>> and was requested to report here.
>>
>> If I can be of any help or you need further information please let me
>> know.
>  From Qu’s answer in the thread *[PATCH v3 1/2] Bluetooth: btusb: Add 
> new VID/PID 0489/e102 for MT7922* [1] it sounds to me, support for chip 
> was only added recently, and is going to be in Linux v6.6.

I think this is a different one.

The new pid (0xe102) is only introduced in some recent laptops (with 
ryzen 7040 series CPUs I guess?).

Unless the user is compiling a custom kernel with the extra vid/pid 
added, it should not work from the very beginning.
Thus I believe it's something different.

Thanks,
Qu
> 
> 
> Kind regards,
> 
> Paul
> 
> 
> [1]: 
> https://lore.kernel.org/linux-bluetooth/8a261418-17ca-405f-b340-7e6634c169bc@suse.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Firmware for MT7922 missing in initrd; bluetooth disabled after update
  2023-08-12 10:03   ` Takashi Iwai
@ 2023-08-14  9:06     ` Jürgen Hofmann
  0 siblings, 0 replies; 5+ messages in thread
From: Jürgen Hofmann @ 2023-08-14  9:06 UTC (permalink / raw)
  To: Paul Menzel, Qu Wenruo
  Cc: linux-bluetooth, Takashi Iwai, Chris Lu, Takashi Iwai

Dear Paul, dear Qu,

>>  From Qu’s answer in the thread *[PATCH v3 1/2] Bluetooth: btusb: Add
>> new VID/PID 0489/e102 for MT7922* [1] it sounds to me, support for
>> chip was only added recently, and is going to be in Linux v6.6.
> 
> The problem is rather the lack of MODULE_FIRMWARE() declarations for
> the corresponding device.  The device itself already works fine as is
> with the current upstream kernel as long as the firmware file is
> present on the system.  But as dracut puts only the firmware file
> listed in MODULE_FIRMWARE() into initrd, it starts failing once when
> you build an initrd containing the BT.

from all I can tell (and understand), the analysis from Takashi about 
the missing MODULE_FIRMWARE() declarations is correct.

Thanks,

Jürgen

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-14  9:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10 20:24 Firmware for MT7922 missing in initrd; bluetooth disabled after update Jürgen Hofmann
2023-08-12  9:02 ` Paul Menzel
2023-08-12 10:03   ` Takashi Iwai
2023-08-14  9:06     ` Jürgen Hofmann
2023-08-12 10:57   ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox