You are not logged in.

#1 2023-10-12 07:28:09

Beesh
Member
Registered: 2022-01-09
Posts: 37

How to improve amdgpu boot time?

Aside from gpu driver loading my boot is pretty fast, so I'm now trying to optimize that, if possible, because is taking up a good chunk of loading times:

A6VAGaT.png

thank you in advance

Offline

#2 2023-10-12 09:01:41

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,167

Re: How to improve amdgpu boot time?

The delay may not be due to the amdgpu kernel module loading but without full journal it's hard to tell.

Do you have https://wiki.archlinux.org/title/Kernel … _KMS_start configured ?


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


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2023-10-12 09:21:45

Beesh
Member
Registered: 2022-01-09
Posts: 37

Re: How to improve amdgpu boot time?

Lone_Wolf wrote:

The delay may not be due to the amdgpu kernel module loading but without full journal it's hard to tell.

Do you have https://wiki.archlinux.org/title/Kernel … _KMS_start configured ?

thank you for joining the discussion

I think I already enabled the early kms with

MODULES=(amdgpu)

configured in the /etc/mkinitcpio.conf file and it's already generated with mkinitcpio -P command.

I can assure you that the only delay is that amdgpu 50 seconds of the screenshot, I already analyzed throughly the boot process and beside that all is buttersmooth; furthermore if I pass the nomodeset parameter the delay goes away, so it has to do with graphic drivers right?

Last edited by Beesh (2023-10-12 09:40:37)

Offline

#4 2023-10-12 10:04:25

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,167

Re: How to improve amdgpu boot time?

Although suggestive using nomodeset decreases linux graphics initialization time to almost zero on any system.

Please post full outputs of lsblk -f , lspci -k and dmesg / journal (run last 2 as root) .

Is archlinux the only OS present on this system ?


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


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2023-10-12 10:26:03

Beesh
Member
Registered: 2022-01-09
Posts: 37

Re: How to improve amdgpu boot time?

Lone_Wolf wrote:

Although suggestive using nomodeset decreases linux graphics initialization time to almost zero on any system.

Please post full outputs of lsblk -f , lspci -k and dmesg / journal (run last 2 as root) .

Is archlinux the only OS present on this system ?

archlinux is not the only OS on this system, is in a dual boot configuration with windows, both encrypted.

here the logs you requested:

lsblk -f
lspci -k
dmesg -t

Offline

#6 2023-10-13 09:50:36

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,167

Re: How to improve amdgpu boot time?

#initialization of the amdgpu starts here
[Thu Oct 12 11:42:57 2023] [drm] amdgpu kernel modesetting enabled.

#here is the time gap :
[Thu Oct 12 11:43:02 2023] hid-generic 0003:0B05:1915.0014: input,hiddev104,hidraw19: USB HID v1.11 Device [Generic USB Audio] on usb-0000:48:00.3-6/input2
[Thu Oct 12 11:43:54 2023] amdgpu 0000:03:00.0: amdgpu: STB initialized to 2048 entries

# initialization is finished here 
[Thu Oct 12 11:43:55 2023] [drm] Initialized amdgpu 3.54.0 20150101 for 0000:03:00.0 on minor 1
[Thu Oct 12 11:43:55 2023] fbcon: amdgpudrmfb (fb0) is primary device
[Thu Oct 12 11:43:55 2023] fbcon: Deferring console take-over
[Thu Oct 12 11:43:55 2023] amdgpu 0000:03:00.0: [drm] fb0: amdgpudrmfb frame buffer device
[Thu Oct 12 11:42:52 2023] Command line: initrd=amd-ucode.img initrd=initramfs-linux.img rd.luks.name=4ae5adb5-cfaa-468e-8de1-e1fc97f53969=root root=/dev/mapper/root nowatchdog quiet splash plymouth rw

temporarily remove splash & plymouth, does that make  a difference ?

in a dual boot configuration with windows

You have looked at https://wiki.archlinux.org/title/Dual_b … ibernation and disabled fast start ?


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


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2023-10-13 10:07:13

Beesh
Member
Registered: 2022-01-09
Posts: 37

Re: How to improve amdgpu boot time?

thank you for the gpu init analysis

I had this problem even before enabling plymouth and splash screen, the logs on screen would simply froze as the loading screen is doing now.
I can confirm you that fast start is disabled on windows side.

Offline

#8 2023-10-13 10:32:37

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,167

Re: How to improve amdgpu boot time?

Please post journalctl -b output , maybe systemd journal has more info about what happens during the gap.


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


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#9 2023-10-13 17:18:29

Beesh
Member
Registered: 2022-01-09
Posts: 37

Re: How to improve amdgpu boot time?

here's a snippet of  that frametime

journal -b

...
Oct 13 19:08:38 archlinux kernel: usb 7-5.3: config 1 has an invalid interface number: 2 but max is 1
Oct 13 19:08:38 archlinux kernel: usb 7-5.3: config 1 has no interface number 1
Oct 13 19:08:38 archlinux kernel: usb 7-5.3: New USB device found, idVendor=0b05, idProduct=18f3, bcdDevice= 1.00
Oct 13 19:08:38 archlinux kernel: usb 7-5.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 13 19:08:38 archlinux kernel: usb 7-5.3: Product: AURA LED Controller
Oct 13 19:08:38 archlinux kernel: usb 7-5.3: Manufacturer: AsusTek Computer Inc.
Oct 13 19:08:38 archlinux kernel: usb 7-5.3: SerialNumber: 9876543210
Oct 13 19:08:38 archlinux kernel: hid-generic 0003:0B05:18F3.0011: hiddev101,hidraw16: USB HID v1.11 Device [AsusTek Computer Inc. AURA LED Controller] on usb-0000:48:00.1-5.3/input2
Oct 13 19:08:38 archlinux kernel: usb 7-5.4: new full-speed USB device number 9 using xhci_hcd
Oct 13 19:08:38 archlinux kernel: usb 7-5.4: New USB device found, idVendor=0b05, idProduct=18bb, bcdDevice= 2.00
Oct 13 19:08:38 archlinux kernel: usb 7-5.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 13 19:08:38 archlinux kernel: usb 7-5.4: Product: AURA LED Controller
Oct 13 19:08:38 archlinux kernel: usb 7-5.4: Manufacturer: AsusTek Computer Inc.
Oct 13 19:08:38 archlinux kernel: usb 7-5.4: SerialNumber: 2077306A3248
Oct 13 19:08:38 archlinux kernel: hid-generic 0003:0B05:18BB.0012: hiddev102,hidraw17: USB HID v1.11 Device [AsusTek Computer Inc. AURA LED Controller] on usb-0000:48:00.1-5.4/input0
Oct 13 19:08:40 archlinux kernel: usb 9-5: New USB device found, idVendor=0b05, idProduct=1916, bcdDevice= 0.04
Oct 13 19:08:40 archlinux kernel: usb 9-5: New USB device strings: Mfr=3, Product=1, SerialNumber=0
Oct 13 19:08:40 archlinux kernel: usb 9-5: Product: USB Audio
Oct 13 19:08:40 archlinux kernel: usb 9-5: Manufacturer: Generic
Oct 13 19:08:41 archlinux kernel: input: Generic USB Audio Consumer Control as /devices/pci0000:40/0000:40:01.1/0000:41:00.0/0000:42:08.0/0000:48:00.3/usb9/9-5/9-5:1.6/0003:0B05:1916.0013/input/input16
Oct 13 19:08:41 archlinux kernel: input: Generic USB Audio as /devices/pci0000:40/0000:40:01.1/0000:41:00.0/0000:42:08.0/0000:48:00.3/usb9/9-5/9-5:1.6/0003:0B05:1916.0013/input/input17
Oct 13 19:08:41 archlinux kernel: hid-generic 0003:0B05:1916.0013: input,hiddev103,hidraw18: USB HID v1.11 Device [Generic USB Audio] on usb-0000:48:00.3-5/input6
Oct 13 19:08:41 archlinux kernel: usb 9-6: new high-speed USB device number 6 using xhci_hcd
Oct 13 19:08:42 archlinux kernel: usb 9-6: New USB device found, idVendor=0b05, idProduct=1915, bcdDevice= 0.04
Oct 13 19:08:42 archlinux kernel: usb 9-6: New USB device strings: Mfr=3, Product=1, SerialNumber=0
Oct 13 19:08:42 archlinux kernel: usb 9-6: Product: USB Audio
Oct 13 19:08:42 archlinux kernel: usb 9-6: Manufacturer: Generic
Oct 13 19:08:42 archlinux kernel: input: Generic USB Audio Consumer Control as /devices/pci0000:40/0000:40:01.1/0000:41:00.0/0000:42:08.0/0000:48:00.3/usb9/9-6/9-6:1.2/0003:0B05:1915.0014/input/input18
Oct 13 19:08:42 archlinux kernel: input: Generic USB Audio as /devices/pci0000:40/0000:40:01.1/0000:41:00.0/0000:42:08.0/0000:48:00.3/usb9/9-6/9-6:1.2/0003:0B05:1915.0014/input/input19
Oct 13 19:08:42 archlinux kernel: hid-generic 0003:0B05:1915.0014: input,hiddev104,hidraw19: USB HID v1.11 Device [Generic USB Audio] on usb-0000:48:00.3-6/input2
Oct 13 19:09:32 archlinux kernel: amdgpu 0000:03:00.0: amdgpu: STB initialized to 2048 entries
Oct 13 19:09:32 archlinux kernel: [drm] Loading DMUB firmware via PSP: version=0x0202001E
Oct 13 19:09:32 archlinux kernel: [drm] use_doorbell being set to: [true]
Oct 13 19:09:32 archlinux kernel: [drm] use_doorbell being set to: [true]
Oct 13 19:09:32 archlinux kernel: [drm] use_doorbell being set to: [true]
Oct 13 19:09:32 archlinux kernel: [drm] use_doorbell being set to: [true]
Oct 13 19:09:32 archlinux kernel: [drm] Found VCN firmware Version ENC: 1.27 DEC: 2 VEP: 0 Revision: 0
Oct 13 19:09:32 archlinux kernel: amdgpu 0000:03:00.0: amdgpu: Will use PSP to load VCN firmware
Oct 13 19:09:32 archlinux kernel: [drm] reserve 0xa00000 from 0x83fd000000 for PSP TMR
Oct 13 19:09:32 archlinux kernel: amdgpu 0000:03:00.0: amdgpu: SECUREDISPLAY: securedisplay ta ucode is not available
Oct 13 19:09:32 archlinux kernel: amdgpu 0000:03:00.0: amdgpu: smu driver if version = 0x00000040, smu fw if version = 0x00000041, smu fw program = 0, version = 0x003a5800 (58.88.0)
Oct 13 19:09:32 archlinux kernel: amdgpu 0000:03:00.0: amdgpu: SMU driver if version not matched
Oct 13 19:09:32 archlinux kernel: amdgpu 0000:03:00.0: amdgpu: use vbios provided pptable
Oct 13 19:09:32 archlinux kernel: amdgpu 0000:03:00.0: amdgpu: SMU is initialized successfully!
Oct 13 19:09:32 archlinux kernel: [drm] Display Core v3.2.241 initialized on DCN 3.0
Oct 13 19:09:32 archlinux kernel: [drm] DP-HDMI FRL PCON supported
Oct 13 19:09:32 archlinux kernel: [drm] DMUB hardware initialized: version=0x0202001E
Oct 13 19:09:33 archlinux kernel: [drm] kiq ring mec 2 pipe 1 q 0
Oct 13 19:09:33 archlinux kernel: [drm] VCN decode and encode initialized successfully(under DPG Mode).
Oct 13 19:09:33 archlinux kernel: [drm] JPEG decode initialized successfully.
Oct 13 19:09:33 archlinux kernel: amdgpu: HMM registered 16368MB device memory
Oct 13 19:09:33 archlinux kernel: kfd kfd: amdgpu: Allocated 3969056 bytes on gart
Oct 13 19:09:33 archlinux kernel: kfd kfd: amdgpu: Total number of KFD nodes to be created: 1
Oct 13 19:09:33 archlinux kernel: amdgpu: Virtual CRAT table created for GPU
Oct 13 19:09:33 archlinux kernel: amdgpu: Topology: Add dGPU node [0x73bf:0x1002]
Oct 13 19:09:33 archlinux kernel: kfd kfd: amdgpu: added device 1002:73bf
Oct 13 19:09:33 archlinux kernel: amdgpu 0000:03:00.0: amdgpu: SE 4, SH per SE 2, CU per SH 10, active_cu_number 80
...

Offline

#10 2023-10-13 18:33:23

seth
Member
Registered: 2012-09-03
Posts: 53,195

Re: How to improve amdgpu boot time?

Why is there no userspace message at all in that journal?
The gap is exactly 50s that's two dbus timeouts - previously it was 52s what's in the margin of error and I doubt that the universe is lazy enough for that to be a coincidence.

Please post your complete system journal for the boot:

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

not just some randome excerpt.
Though from what's there:

Oct 13 19:08:38 archlinux kernel: usb 7-5.3: config 1 has an invalid interface number: 2 but max is 1
Oct 13 19:08:38 archlinux kernel: usb 7-5.3: config 1 has no interface number 1
Oct 13 19:08:38 archlinux kernel: usb 7-5.3: New USB device found, idVendor=0b05, idProduct=18f3, bcdDevice= 1.00
Oct 13 19:08:38 archlinux kernel: usb 7-5.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 13 19:08:38 archlinux kernel: usb 7-5.3: Product: AURA LED Controller
Oct 13 19:08:38 archlinux kernel: usb 7-5.3: Manufacturer: AsusTek Computer Inc.
Oct 13 19:08:38 archlinux kernel: usb 7-5.3: SerialNumber: 9876543210

remove that device

Offline

#11 2023-10-14 07:35:26

Beesh
Member
Registered: 2022-01-09
Posts: 37

Re: How to improve amdgpu boot time?

thank you for joining the  conversation @seth

here's the journal log up to the sddm (what's next was clutter not related to the problem):
journalctl -b

although I didn't understand why, I tried also to remove all usb devices as requested (in another session) but the delay  was still there.

Last edited by Beesh (2023-10-14 07:58:26)

Offline

#12 2023-10-14 07:45:31

seth
Member
Registered: 2012-09-03
Posts: 53,195

Re: How to improve amdgpu boot time?

Oct 14 09:16:46 archlinux kernel: reserve setup_data: [mem 0x00000000e3300000-0x00000000e33fffff] reserved

  ~ ❯ journalctl -b                                                                                                                                    ✘ INT took  41s with root@Thripperino-arch at  09:21:34
Oct 14 09:16:46 archlinux kernel: Linux version 6.5.7-arch1-1 (linux@archlinux) (gcc (GCC) 13.2.1 20230801, GNU ld (GNU Binutils) 2.41.0) #1 SMP PREEMPT_DYNAMIC Tue, 10 Oct 2023 21:10:21 +0000
…
Oct 14 09:17:55 archlinux systemd-journald[563]: Journal stopped
Oct 14 09:16:46 archlinux kernel: Linux version 6.5.7-arch1-1 (linux@archlinux) (gcc (GCC) 13.2.1 20230801, GNU ld (GNU Binutils) 2.41.0) #1 SMP PREEMPT_DYNAMIC Tue, 10 Oct 2023 21:10:21 +0000

That was somehow copypasted out of the terminal?
Don't. Post the actual journal.

Offline

#13 2023-10-14 08:02:11

Beesh
Member
Registered: 2022-01-09
Posts: 37

Re: How to improve amdgpu boot time?

I can't grasp what's the point of this, but I re-pasted the journal content in the previous message as requested

Offline

#14 2023-10-14 08:32:12

seth
Member
Registered: 2012-09-03
Posts: 53,195

Re: How to improve amdgpu boot time?

The point of that is to have a consistent journal for the boot and not a bunch of line in random order where one doesn't know what's maybe missing.
Finding a needle in a haystack is hard, finding it in a swirling puddle of mud is impossible.

Oct 14 09:17:45 archlinux kernel: amdgpu 0000:03:00.0: [drm] fb0: amdgpudrmfb frame buffer device
Oct 14 09:17:46 archlinux systemd-modules-load[565]: Inserted module 'amdgpu'
Oct 14 09:16:49 archlinux kernel: [drm] amdgpu kernel modesetting enabled.

The journal is at best doubled, but the systemd-modules-load message also appears only once.

Oct 14 09:17:58 Thripperino-arch systemd[1]: Started Simple Desktop Display Manager.
...

and this is still under no circumstances an upload from the command in #10

idk what you're trying to hide, but w/o a proper journal to reflect the situation you're actually facing, this is pointless.

Offline

#15 2023-10-14 08:50:31

Beesh
Member
Registered: 2022-01-09
Posts: 37

Re: How to improve amdgpu boot time?

seth wrote:

The point of that is to have a consistent journal for the boot and not a bunch of line in random order where one doesn't know what's maybe missing.
Finding a needle in a haystack is hard, finding it in a swirling puddle of mud is impossible.

Oct 14 09:17:45 archlinux kernel: amdgpu 0000:03:00.0: [drm] fb0: amdgpudrmfb frame buffer device
Oct 14 09:17:46 archlinux systemd-modules-load[565]: Inserted module 'amdgpu'
Oct 14 09:16:49 archlinux kernel: [drm] amdgpu kernel modesetting enabled.

The journal is at best doubled, but the systemd-modules-load message also appears only once.

Oct 14 09:17:58 Thripperino-arch systemd[1]: Started Simple Desktop Display Manager.
...

and this is still under no circumstances an upload from the command in #10

idk what you're trying to hide, but w/o a proper journal to reflect the situation you're actually facing, this is pointless.

where do you see "a bunch of line in random order" when those lines are literally copy pasted and each one has an ascending timestamp?

"at best doubled" where? It's a literal copy paste minus the huge spam kwin_wayland is generating per second and other unuseful user space bloat not related to the boot gpu-related problem.

Why are you so fixated on something so secondary to and off topic? Why are you setting this mean leaning tones to the conversation?

Offline

#16 2023-10-14 09:00:47

seth
Member
Registered: 2012-09-03
Posts: 53,195

Re: How to improve amdgpu boot time?

when those lines are literally copy pasted and each one has an ascending timestamp?

Last time I checked 09:16:49 would be earlier than 09:17:46

"at best doubled" where?

Lines 199{7,8}

Oct 14 09:17:55 archlinux systemd-journald[563]: Journal stopped
Oct 14 09:16:46 archlinux kernel: Linux version 6.5.7-arch1-1 (linux@archlinux) (gcc (GCC) 13.2.1 20230801, GNU ld (GNU Binutils) 2.41.0) #1 SMP PREEMPT_DYNAMIC Tue, 10 Oct 2023 21:10:21 +0000

This is not off topic: you're asking for an opinon based on mushy data - I guess you've heard about " garbage in/garbage out"?

other unuseful user space bloat

If you could judge that, you'd frankly not be here and your unawareness of even the obvious incosisntecies mentioned above does not inspire a lot of faith in the general reliability of your edits.

I don't care whether you think being asked to not waste everyones time is "mean".
But either you post the actual, unedited journal or you're on your own with this.

Offline

#17 2023-10-14 09:29:12

Beesh
Member
Registered: 2022-01-09
Posts: 37

Re: How to improve amdgpu boot time?

Those lines are not something I touched/edited/doubled myself, that's the untouched and copy pasted result of the command

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

minus the post sddm part, that's what I lefted out and expressely comunicated it.

If that command reports mushy data that's not on me at all.

Anyway I rebooted again to give you the actual, unedited journal in hope to finally have your faith and to not waste everyones time

The mental gymnastic to believe I would sabotage myself on something I need help on is astounding.

Offline

#18 2023-10-14 11:56:58

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,167

Re: How to improve amdgpu boot time?

The journal is NOT doubled, but I had to look very closely to determine that.

Oct 14 11:06:30 archlinux systemd[1]: systemd 254.5-1-arch running in system mode (+PAM +AUDIT -SELINUX -APPARMOR -IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK +XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified)
Oct 14 11:06:30 archlinux systemd[1]: Detected architecture x86-64.
Oct 14 11:06:30 archlinux systemd[1]: Running in initrd.
Oct 14 11:06:30 archlinux systemd[1]: Initializing machine ID from random generator.
Oct 14 11:06:30 archlinux systemd[1]: Queued start job for default target Initrd Default Target.


Oct 14 11:07:38 Thripperino-arch systemd-journald[563]: Received SIGTERM from PID 1 (systemd).
Oct 14 11:07:38 Thripperino-arch systemd[1]: systemd 254.5-1-arch running in system mode (+PAM +AUDIT -SELINUX -APPARMOR -IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK +XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified)
Oct 14 11:07:38 Thripperino-arch systemd[1]: Detected architecture x86-64.
Oct 14 11:07:38 Thripperino-arch systemd[1]: Hostname set to <Thripperino-arch>.
Oct 14 11:07:38 Thripperino-arch systemd[1]: bpf-lsm: LSM BPF program attached
Oct 14 11:07:38 Thripperino-arch systemd[1]: /run/systemd/generator/systemd-cryptsetup@windows.service:16: RequiresMountsFor= path is not absolute, ignoring: windows.key
Oct 14 11:07:38 Thripperino-arch systemd[1]: /run/systemd/generator/systemd-cryptsetup@multimedia.service:16: RequiresMountsFor= path is not absolute, ignoring: multimedia.key
Oct 14 11:07:38 Thripperino-arch systemd[1]: /run/systemd/generator/systemd-cryptsetup@data.service:16: RequiresMountsFor= path is not absolute, ignoring: data.key
Oct 14 11:07:38 Thripperino-arch systemd[1]: systemd-ask-password-plymouth.service: Deactivated successfully.
Oct 14 11:07:38 Thripperino-arch systemd[1]: initrd-switch-root.service: Deactivated successfully.
Oct 14 11:07:38 Thripperino-arch systemd[1]: Stopped Switch Root.

these are also suspicious since amdgpu is in the initrd , systemd-modules-load has no reason to insert that module .

Oct 14 11:07:29 archlinux systemd-modules-load[564]: Inserted module 'amdgpu'

Oct 14 11:07:37 archlinux systemd[1]: systemd-modules-load.service: Consumed 58.619s CPU time.

My impresssion is that some parts of the initialization are not performed once but two times !

Please post the output of

$ ls -alR /etc/modules-load.d/

also the contents of /etc/mkinitcpio.conf & /etc/hostname .


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


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#19 2023-10-14 12:10:22

Beesh
Member
Registered: 2022-01-09
Posts: 37

Re: How to improve amdgpu boot time?

thank you @Lone_Wolf for taking time to actual give an educated response.

There's something wrong for sure, maybe more than one contrary to what I was initially thinking. Here's the requested infos:

ls -alR /etc/modules-load.d/

/etc/modules-load.d/:
total 8
drwxr-xr-x 1 root root   46 Oct  2 15:17 .
drwxr-xr-x 1 root root 3254 Oct 13 21:24 ..
-rw-r--r-- 1 root root    5 Sep 24 21:12 gnutls.conf
-rw-r--r-- 1 root root    8 Sep 20 09:34 i2c-dev.conf

cat /etc/mkinitcpio.conf

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(usbhid xhci_hcd)
MODULES=(amdgpu)

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No RAID, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
#HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck)
HOOKS=(base systemd btrfs autodetect modconf kms keyboard sd-vconsole block sd-encrypt plymouth filesystems)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
# Decompress kernel modules during initramfs creation.
# Enable to speedup boot process, disable to save RAM
# during early userspace. Switch (yes/no).
#MODULES_DECOMPRESS="yes"

cat /etc/hostname

Thripperino-arch

do you notice some misconfiguration?

Offline

#20 2023-10-14 13:15:50

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,167

Re: How to improve amdgpu boot time?

Nothing really wrong, although your mkinitcpio HOOKS= line can be optimised.

For now, remove (or move away) /etc/modules-load.d/i2c-dev.conf and reboot .
Post fresh journal .

Last edited by Lone_Wolf (2023-10-14 13:17:38)


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


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#21 2023-10-14 13:34:09

seth
Member
Registered: 2012-09-03
Posts: 53,195

Re: How to improve amdgpu boot time?

The first 1997 lines of the last provided journal are now exactly duplicated.
The root then switches, the hostname gets set and the post initrd journal continues.

Apparently this is not because of copypasta, but highly unusual and unexpected - and likely a problem.
There's something massively off w/ the initramfs and that's also where the stall happens.

If the rebuild of the initramfs doesn't fix it, please post the output of the mkinicpio run and

sudo lsinitcpio /boot/initramfs-linux.img | curl -F 'file=@-' 0x0.st

Offline

#22 2023-10-14 13:57:21

Beesh
Member
Registered: 2022-01-09
Posts: 37

Re: How to improve amdgpu boot time?

Lone_Wolf wrote:

Nothing really wrong, although your mkinitcpio HOOKS= line can be optimised.

For now, remove (or move away) /etc/modules-load.d/i2c-dev.conf and reboot .
Post fresh journal .

I'm ready to learn how to optimize that, I always felt uncertainty about my hooks setup, especially with it's ordering. How could I improve it?

Removing that custom modules was one of the first thing I tried to do about this 50 seconds stuck, unfortunately to no avail. Here's the journal of a boot without it

journal -b

seth wrote:

If the rebuild of the initramfs doesn't fix it, please post the output of the mkinicpio run and

sudo lsinitcpio /boot/initramfs-linux.img | curl -F 'file=@-' 0x0.st

lsinitcpio /boot/initramfs-linux.img

edit:

this is the mkinitcpio -P command output

==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img --microcode /boot/amd-ucode.img
==> Starting build: '6.5.7-arch1-1'
  -> Running build hook: [base]
  -> Running build hook: [systemd]
  -> Running build hook: [btrfs]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
  -> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
  -> Running build hook: [sd-vconsole]
  -> Running build hook: [block]
  -> Running build hook: [sd-encrypt]
  -> Running build hook: [plymouth]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux.img'
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -g /boot/initramfs-linux-fallback.img -S autodetect --microcode /boot/amd-ucode.img
==> Starting build: '6.5.7-arch1-1'
  -> Running build hook: [base]
  -> Running build hook: [systemd]
  -> Running build hook: [btrfs]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
==> WARNING: Possibly missing firmware for module: 'ast'
  -> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci'
  -> Running build hook: [sd-vconsole]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'wd719x'
  -> Running build hook: [sd-encrypt]
  -> Running build hook: [plymouth]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-fallback.img'
==> Image generation successful

Last edited by Beesh (2023-10-14 14:15:37)

Offline

#23 2023-10-14 14:15:50

seth
Member
Registered: 2012-09-03
Posts: 53,195

Re: How to improve amdgpu boot time?

The journal shenanigans are likely an outfall of the systemd hooks (and probably still a bug…)
I guess you can't use udev w/ the encryption b/c a recent systemd update broke that?

Let's throw a curveball at the problem and remove the kms hook and the amdgpu module (the initramfs should no longer contain the amdgpu module)

Edit: d'ohh - and remove the "base" hook!

Last edited by seth (2023-10-14 14:16:41)

Offline

#24 2023-10-14 14:27:34

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,167

Re: How to improve amdgpu boot time?

etc/modules-load.d/MODULES.conf

That file is not in your /etc/modules-load.d/ folder and I have no idea where it came from.

After trying seth suggestions, verify if that file is still present in the initram and if so post its contents .


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


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#25 2023-10-14 14:59:47

Beesh
Member
Registered: 2022-01-09
Posts: 37

Re: How to improve amdgpu boot time?

I made two runs:

1) removed only base hook (as not needed in my config):

nothing changed (regarding the delay problem)

journal -b
lsinitcpio /boot/initramfs-linux.img

2) removed both base and kms hooks (amdgpu module too):

the only visible change is that the delay moved after disk decryption prompt, and not before.
also the delay structure slightly changed:

Oct 14 16:47:11 Thripperino-arch systemd-networkd[1077]: enp68s0: Gained IPv6LL
Oct 14 16:47:34 Thripperino-arch systemd[1]: systemd-hostnamed.service: Deactivated successfully.
Oct 14 16:47:58 Thripperino-arch kernel: amdgpu 0000:03:00.0: amdgpu: STB initialized to 2048 entries

journal -b
lsinitcpio /boot/initramfs-linux.img

ps: the initramfs urls are the same, maybe because the output sent to the 0x0.st service was the same?

edit: mkinitcpio -P was executed both times

Last edited by Beesh (2023-10-14 15:18:53)

Offline

Board footer

Powered by FluxBB