You are not logged in.

#1 2025-04-05 14:58:29

paulocesarsc
Member
Registered: 2025-04-05
Posts: 9

[Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

EDIT 2026/03/19:
I have finaly figured it out! Check the post here if you are also having trouble! TL;DR: Do not focus on EDIT modifications but instead focus on VBT edits to solve this issue!

---

Hi everyone.

I'm stumped with a small issue that I'm unsure it's or isn't a bug of mkinitcpio.

I have made a modified EDID file for my laptop to have additional refresh rates available (tested and working under Windows), and i am trying to add it to my initramfs image using mkinitcpio, but no matter what  i do it won't add the file.

I have the file added under "/usr/lib/firmware/edid/edid_chuwi.bin", i added the full file path on "/etc/mkinitcpio.conf" under "FILES()" and i tried running "mkinitcpio -P" to regenerate the initramfs but it wont add the file.

I then re-ran the command using mkinitcpio -Pv to get verbose, and i do get the following logged on the text file, as if the files where added but they are not:

    adding dir: /usr/lib/firmware/edid
    adding file: /usr/lib/firmware/edid/edid_chuwi.bin

I checked if the files where there opening the image in "ark" and by running the command "zstdcat /boot/initramfs-linux.img | cpio -t | grep edid" which returns only the file count and not the edid path as expected.

Can anyone try to add a file to their initramfs and check if mkinitcpio is actualy doing so?

Thank you for any help provided.

Last edited by paulocesarsc (2026-03-19 10:33:44)

Offline

#2 2025-04-06 18:03:22

ReDress
Member
From: Nairobi
Registered: 2024-11-30
Posts: 243

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

Uhmmm....

There's also a line like

     adding file: /bin/e2fsck

Though, greping for e2fsck in your proposed way doesn't seem to turn up anything. Maybe it is not also not being added? Though, in all seriousness, it's obviously being added and your method of confirming that a file was added maybe wanting

Offline

#3 2025-04-06 20:55:35

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 74,694

Offline

#4 2025-04-07 20:23:36

paulocesarsc
Member
Registered: 2025-04-05
Posts: 9

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

Oh man do i feel dumb right now! Using seth's tool i can confirm the files are both inside the .img!

Now i must break my head for a while longer trying to understand why my custom EDID bin isn't being applied to the system smile

Thank you both for the help!

Offline

#5 2025-04-08 00:15:33

jec15
Member
Registered: 2024-05-14
Posts: 7

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

Did you also add it to your kernel command line?

Offline

#6 2025-04-08 17:34:38

paulocesarsc
Member
Registered: 2025-04-05
Posts: 9

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

Hi jec15. I think i followed the procedure properly:

I copied the .bin EDID file to /usr/lib/firmware/edid/edid_chuwi.bin (this file is then Symlinked to /lib/firmware/edid)
I added the file under FILES() in /etc/mkinitcpio.conf
Recreated the .img file using mkinitcpio -P
Edited my systemd boot entry to add the edid file, like so: options root=PARTUUID=81ecb4ef-2d27-4dde-89dc-a97a99606042 zswap.enabled=0 rootflags=subvol=@ rw rootfstype=btrfs fbcon=rotate:1 drm.edid_firmware=card1-DSI-1:edid/edid_chuwi.bin

From what i followed in the wiki i tough this would be enough, but i still cannot select the additional refresh rates like i can under windows. I need to debug this further, as my device (Chuwi Minibook X) has an entry on the Arch Wiki, and i'd like to contribute to it with these instructions (this device comes with a 50hz screen, it's not terrible for office/multimedia, but the display can easily do 90 Hz by changing the EDID, and if we don't want it that high we can always settle for 60hz, a "more default" refresh rate). I'm also trying to create a bash script to automate switching to tablet mode, so far i can already successfully rotate the screen to portrait and block input from the physical keyboard and touchpad, although manually (by executing the script).

Last edited by paulocesarsc (2025-04-08 17:36:44)

Offline

#7 2025-04-08 18:56:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 74,694

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

card1-DSI-1

Not sure about the card1 there, but "DSI-1"?
Are you sure about this?

ls /sys/class/drm/card*/edid

Offline

#8 2025-04-08 19:03:29

paulocesarsc
Member
Registered: 2025-04-05
Posts: 9

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

Hi Seth! I got the name from a similar command, but running yours outputs a similar output:

[paulo@paulo-minibookx ~]$ ls -la /sys/class/drm/card*/edid
-r--r--r-- 1 root root 0 Apr  8 19:58 /sys/class/drm/card1-DP-1/edid
-r--r--r-- 1 root root 0 Apr  8 19:58 /sys/class/drm/card1-DP-2/edid
-r--r--r-- 1 root root 0 Apr  8 19:58 /sys/class/drm/card1-DSI-1/edid
-r--r--r-- 1 root root 0 Apr  8 19:58 /sys/class/drm/card1-HDMI-A-1/edid
-r--r--r-- 1 root root 0 Apr  8 19:58 /sys/class/drm/card1-HDMI-A-2/edid

I also just tried using "DSI-1" only but it did not work as well!

Offline

#9 2025-04-08 19:20:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 74,694

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

So let's see what that is

cat /sys/class/drm/card1-DSI-1/edid | curl -F 'file=@-' 0x0.st

Offline

#10 2025-04-08 19:24:53

paulocesarsc
Member
Registered: 2025-04-05
Posts: 9

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

Well this is weird... it says it's unavailable due to legal reasons:

[root@paulo-minibookx paulo]# cat /sys/class/drm/card1-DSI-1/edid | curl -F 'file=@-' 0x0.st
451 Unavailable For Legal Reasons

I even ran it as root to make sure.
Unsure this helps you in your thought process, but here's the output from kscreen-doctor -o:

Output: 1 DSI-1
        enabled
        connected
        priority 1
        Panel
        Modes:  1:1200x1920@50*!  2:1024x768@60 
        Geometry: 0,0 1536x960
        Scale: 1.25
        Rotation: 8
        Overscan: 0
        Vrr: incapable
        RgbRange: unknown
        HDR: incapable
        Wide Color Gamut: incapable
        ICC profile: none
        Color profile source: sRGB
        Color power preference: prefer efficiency and performance
        Brightness control: supported, set to 40% and dimming to 100%

Thank you for trying to help me out !

Offline

#11 2025-04-08 19:34:55

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,912

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

Does the machine have a LCD / LED display like for troubleshooting ?
If so, it could be a https://en.wikipedia.org/wiki/Display_Serial_Interface


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#12 2025-04-08 19:38:47

paulocesarsc
Member
Registered: 2025-04-05
Posts: 9

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

Hi Lone_Wolf. I don't think so, it's a 10 inch Hybrid Laptop/Tablet from a lesser known brand (Chuwi Minibook X), i suppose the internal display is connected trough DSI, as it's the only display that shows up on kscreen-doctor!

Offline

#13 2025-04-08 19:42:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 74,694

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

"451 Unavailable For Legal Reasons" is a response from 0x0.st, https://en.wikipedia.org/wiki/HTTP_451
Looks like the proper output, though.

Please post your complete system journal for the boot:

sudo journalctl -b | curl -F 'file=@-' 0x0.st

except that 0x0.st don't work, maybe

sudo journalctl -b | nc termbin.com 9999

?

Offline

#14 2025-04-08 19:47:40

paulocesarsc
Member
Registered: 2025-04-05
Posts: 9

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

The first command seemed to have worked, it uploaded the contents correctly! To keep the log cleaner, i restarted the device before running it:

http://0x0.st/8_Iz.txt

Offline

#15 2025-04-08 19:56:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 74,694

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

Apr 08 20:43:13 paulo-minibookx kernel: [drm] Initialized i915 1.6.0 for 0000:00:02.0 on minor 1
Apr 08 20:43:13 paulo-minibookx kernel: ACPI: video: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
Apr 08 20:43:13 paulo-minibookx kernel: input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input4
Apr 08 20:43:13 paulo-minibookx kernel: fbcon: i915drmfb (fb0) is primary device
…
*************** Apr 08 20:43:13 paulo-minibookx kernel: i915 0000:00:02.0: [drm] *ERROR* DSI link not ready
Apr 08 20:43:13 paulo-minibookx kernel: Console: switching to colour frame buffer device 240x75
Apr 08 20:43:13 paulo-minibookx kernel: i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device

i915 seems already in the initramfs, it would seem that the output is too late for this?

https://wiki.archlinux.org/title/Kernel … s_and_EDID
Use the debugfs to write the edid before starting sddm?
https://wiki.archlinux.org/title/System … ided_units

Offline

#16 2025-04-08 20:43:20

paulocesarsc
Member
Registered: 2025-04-05
Posts: 9

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

Hi again! I just tried disabling SDDM and manually run the overwrite using the instructions, but i think it's not working because the DSI monitor does not support hot plugging.

I disabled SDDM and rebooted the system;
On TTY, i entered root and followed the example for the edid overwrite of the first link:

cat /usr/lib/firmware/edid/edid_chuwi.bin > /sys/kernel/debug/dri/128/DSI-1/edid_override

The monitor also showed up here:

cat /usr/lib/firmware/edid/edid_chuwi.bin > /sys/kernel/debug/dri/0000\:00\:02.0/DSI-1/edid_override

I then manually started plasma using "startplasma-wayland".

In case it's useful, here's an ls of both DRI folders for the DSI-1 device:

[root@paulo-minibookx paulo]# ls /sys/kernel/debug/dri/128/DSI-1/
edid_override  force  i915_lpsp_capability  output_bpc  vrr_range

and

[root@paulo-minibookx paulo]# ls /sys/kernel/debug/dri/0000\:00\:02.0/DSI-1/
edid_override  force  i915_lpsp_capability  output_bpc  vrr_range

Any idea what i could try to force the EDID to be refreshed?

Last edited by paulocesarsc (2025-04-08 20:44:58)

Offline

#17 2025-04-09 06:24:02

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 74,694

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

Override the edid, start some X11 seesion (can be startx xterm) and post your Xorg log, https://wiki.archlinux.org/title/Xorg#General resp. the output of "xrandr --verbose"
They'll include the edid the x11 server sees (why it's not helpful to start wayland and runx xrandr there, because that's then synthetic on xwayland only)

Offline

#18 2026-03-14 15:11:20

paulocesarsc
Member
Registered: 2025-04-05
Posts: 9

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

Alright, i know this is a bit of a necrowing, but over one year later of using this laptop i gave this one more shot, and since some one might also need help with this, i came to update the post!

From what i understand, DSI panels get their modes from the BIOS's built in VBT firmware profile and not from EDID.

By replacing the bios loaded VBT firmware with a custom edited one you can get a single mode forced onto the panel (Ex.: 60Hz, 90hz) when the OS is being loaded.

This Github Repo by godorowski has a small script (and includes an already moded .bin file, use at your own risk) you can follow in order to load the custom VBT file.

In order to get other modes you need to edit the VBT firmware again manually.

Hope this helps some other lost soul out there!

Offline

#19 2026-03-15 11:50:42

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,912

Re: [Solved] Unable to add files to initramfs using mkinitcpio (Bug?)

Thanks for the update, please prepend [Solved] to the thread title (edit first post) .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB