Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Firmware loading in gentoo-sources-4.19 [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Thu Mar 19, 2020 4:44 am    Post subject: Firmware loading in gentoo-sources-4.19 [SOLVED] Reply with quote

I have circa 2017 Lenovo X1 laptop which was running happily 4.14.64 kernel with direct EFI booting, without using bootloader or initrd.
Now I tried to update the kernel to 4.19.97 and run into several problem. One of them is the following.

in 4.14.64 I had an options set to build in i915 firmware into the kernel. The kernel options related to firmware were
Code:
  grep FIRMWARE .config
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE="i915/kbl_dmc_ver1_01.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
# CONFIG_CYPRESS_FIRMWARE is not set
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
# CONFIG_FIRMWARE_EDID is not set
CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_GOOGLE_FIRMWARE is not set
# CONFIG_TEST_FIRMWARE is not set


and the result ion dmesg related to kbl_dmc firmware was one line
Code:

Mar 18 20:36:20 grizzly kernel: [    0.204782] [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_01.bin (v1.1)


Now in 4.19.95 firmware options somewhat changed, FIRMWARE_IN_KERNEL disappeared, and I have
Code:

CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_GOOGLE_FIRMWARE is not set
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_EXTRA_FIRMWARE="i915/kbl_dmc_ver1_01.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
# CONFIG_CYPRESS_FIRMWARE is not set
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
# CONFIG_FIRMWARE_EDID is not set


The result in kernel log on boot is a failure
Code:

Mar 18 20:17:11 grizzly kernel: [    0.327985] i915 0000:00:02.0: Direct firmware load for i915/kbl_dmc_ver1_04.bin failed with error -2
Mar 18 20:17:11 grizzly kernel: [    0.328090] i915 0000:00:02.0: Failed to load DMC firmware i915/kbl_dmc_ver1_04.bin. Disabling runtime power management.


Let me note, that I am building into the kernel the version ver1_01, however in 4.19.95 failed case the attempt to load was for ver1_04.

Could somebody help me to understand what is going on ?

For completeness, my /lib/firmware/i915 has
Code:

lrwxrwxrwx 1 root root   19 Mar  8 20:30 kbl_dmc_ver1.bin -> kbl_dmc_ver1_01.bin
-rw-r--r-- 1 root root 8616 Mar  8 20:30 kbl_dmc_ver1_01.bin
-rw-r--r-- 1 root root 8840 Mar  8 20:30 kbl_dmc_ver1_04.bin


symlink for ver1 points to ver1_01, not ver1_04


Last edited by dmpogo on Thu Mar 19, 2020 7:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
molletts
Tux's lil' helper
Tux's lil' helper


Joined: 16 Feb 2013
Posts: 131

PostPosted: Thu Mar 19, 2020 12:28 pm    Post subject: Reply with quote

Have you tried building the ver1_04 firmware into the kernel instead of ver1_01? Maybe the driver version in the newer kernel needs the newer firmware.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Thu Mar 19, 2020 1:27 pm    Post subject: Reply with quote

molletts wrote:
Have you tried building the ver1_04 firmware into the kernel instead of ver1_01? Maybe the driver version in the newer kernel needs the newer firmware.


Haven't yet, I'll try. I just stopped understanding how built-in-the-kernel versus loading of firmware interacts - where does loading of v1_04 even came from ? I could imaging it would try to load v1_01 and fail because the newer required ...
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3999

PostPosted: Thu Mar 19, 2020 1:29 pm    Post subject: Reply with quote

Multiple kernel versions here.
Iirc I had to switch to newer version:
Code:
amd64 /usr/src # grep skl linux-4.14.172-gentoo-rt/.config
CONFIG_EXTRA_FIRMWARE="i915/skl_dmc_ver1_26.bin"
amd64 /usr/src # grep skl linux-4.19.106-gentoo-rt/.config
CONFIG_EXTRA_FIRMWARE="i915/skl_dmc_ver1_27.bin"
Code:
amd64 /lib/firmware/i915 # ll
total 1176
-rw-r--r-- 1 root root   8824 mars  19 02:51 skl_dmc_ver1_23.bin
-rw-r--r-- 1 root root   8928 mars  19 02:51 skl_dmc_ver1_26.bin
-rw-r--r-- 1 root root   8928 mars  19 02:51 skl_dmc_ver1_27.bin
lrwxrwxrwx 1 root root     19 mars  19 02:51 skl_dmc_ver1.bin -> skl_dmc_ver1_26.bin


dmpogo wrote:
I just stopped understanding how built-in-the-kernel versus loading of firmware interacts - where does loading of v1_04 even came from ?
I'm not sure intel firmware can be loaded dynamically, at least for skylake and above. Cf Wiki

Thks 4 ur attention.


Last edited by CaptainBlood on Thu Mar 19, 2020 4:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Thu Mar 19, 2020 3:36 pm    Post subject: Reply with quote

One part to keep in mind, is that newer kernel versions occasionally want additional firmware to be loaded that wasn't needed before. So, it is probably now 4.19.95 is needing kbl_dmc_ver1_04.bin, possibly both 1_01 and 1_04 now (you'd have to test by removing the 1_01 and only add the 1_04 instead and see if it needs both or the newer firmware). I typically skip checking to see if the old firmwares are also needed or not; as I don't see any issues coming up by including more than necessary.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3468
Location: Canada

PostPosted: Thu Mar 19, 2020 7:11 pm    Post subject: Reply with quote

Thanks guys for the hints, if I build in v1_04, it loads fine
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum