50drm: Install dracut 50drm module in hostonly mode when drm driver is currently in use.
PATCH 1/1 50drm: Install dracut 50drm module in hostonly mode when drm driver is currently in use.
Now only 50plymouth module can pull in 50drm and that's very limited. Because KMS capable drm drivers are much needed in initrd to have a frame buffer console on the screen.
Particularly, when building kdump initrd, plymouth module is omitted, but drm is necessary to setup a working screen for one sitting in front of a monitor.
--- modules.d/50drm/module-setup.sh | 4 ++++ 1 file changed, 4 insertions(+)
modules.d/50drm/module-setup.sh +4 -0
@@ -3,6 +3,10 @@ # ex: ts=8 sw=4 sts=4 et filetype=sh check() { + if [[ $hostonly ]] && [ -d /sys/module/drm/drivers ]; then + return 0 + fi + return 255 }
Signature · 1 line
1.8.2.1
Quoted 19 lines · WANG Chao
Now only 50plymouth module can pull in 50drm and that's very limited. Because KMS capable drm drivers are much needed in initrd to have a frame buffer console on the screen.
Particularly, when building kdump initrd, plymouth module is omitted, but drm is necessary to setup a working screen for one sitting in front of a monitor.
Signed-off-by WANG Chao <[email protected]>--- modules.d/50drm/module-setup.sh | 4 ++++ 1 file changed, 4 insertions(+)modules.d/50drm/module-setup.sh +0
-0
modules.d/50drm/module-setup.sh line 12
Quoted 10 lines
modules.d/50drm/module-setup.sh +4
-0@@ -3,6 +3,10 @@ # ex: ts=8 sw=4 sts=4 et filetype=sh check() { + if [[ $hostonly ]] && [ -d /sys/module/drm/drivers ]; then + return 0 + fi + return 255 }
Hmm, why not let the kdump module depend on drm?
depends() {
echo drm
}
Anyway, do we really need drm for a simple console? Those drivers are really really big and take a long time to load and initialize?
Quoted 21 lines · Harald Hoyer
Quoted 20 lines · WANG Chao
Now only 50plymouth module can pull in 50drm and that's very limited. Because KMS capable drm drivers are much needed in initrd to have a frame buffer console on the screen.
Particularly, when building kdump initrd, plymouth module is omitted, but drm is necessary to setup a working screen for one sitting in front of a monitor.
Signed-off-by WANG Chao <[email protected]>--- modules.d/50drm/module-setup.sh | 4 ++++ 1 file changed, 4 insertions(+)modules.d/50drm/module-setup.sh +0
-0@@ -3,6 +3,10 @@ # ex: ts=8 sw=4 sts=4 et filetype=sh
Quoted 11 lines
modules.d/50drm/module-setup.sh line 12
Quoted 9 lines
modules.d/50drm/module-setup.sh +4
-0check() { + if [[ $hostonly ]] && [ -d /sys/module/drm/drivers ]; then + return 0 + fi + return 255 }Hmm, why not let the kdump module depend on drm?
If you do not like it we can consider add it to kdump module..
Quoted 7 lines
depends(){
echo drm
}Anyway, do we really need drm for a simple console? Those drivers are really really big and take a long time to load and initialize?
It's a little awkward, after kernel crashing suppose 1st kernel is in kms mode, it can not reset to nomodeset, so screen will keep black.
There's no such issue in normal initramfs because bios always reset devices for us.
Quoted 1 line
Signature · 2 lines
Thanks Dave
Quoted 34 lines · Dave Young
Quoted 21 lines · Harald Hoyer
Quoted 20 lines · WANG Chao
Now only 50plymouth module can pull in 50drm and that's very limited. Because KMS capable drm drivers are much needed in initrd to have a frame buffer console on the screen.
Particularly, when building kdump initrd, plymouth module is omitted, but drm is necessary to setup a working screen for one sitting in front of a monitor.
Signed-off-by WANG Chao <[email protected]>--- modules.d/50drm/module-setup.sh | 4 ++++ 1 file changed, 4 insertions(+)modules.d/50drm/module-setup.sh +0
-0@@ -3,6 +3,10 @@ # ex: ts=8 sw=4 sts=4 et filetype=shQuoted 11 lines
modules.d/50drm/module-setup.sh line 12
Quoted 9 lines
modules.d/50drm/module-setup.sh +4
-0check() { + if [[ $hostonly ]] && [ -d /sys/module/drm/drivers ]; then + return 0 + fi + return 255 }Hmm, why not let the kdump module depend on drm?
Quoted 1 line
If you do not like it we can consider add it to kdump module..
So now if I build initrd w/o plymouth, I will not have frame buffer console in initrd. That looks more like a general issue to me.
WANG Chao
Quoted 23 lines
Quoted 8 lines
depends(){
echo drm
}Anyway, do we really need drm for a simple console? Those drivers are really really big and take a long time to load and initialize?
It's a little awkward, after kernel crashing suppose 1st kernel is in kms mode, it can not reset to nomodeset, so screen will keep black.
There's no such issue in normal initramfs because bios always reset devices for us.
Quoted 1 line
Signature · 2 lines
Thanks Dave
Quoted 41 lines · Dave Young
Quoted 21 lines · Harald Hoyer
Quoted 20 lines · WANG Chao
Now only 50plymouth module can pull in 50drm and that's very limited. Because KMS capable drm drivers are much needed in initrd to have a frame buffer console on the screen.
Particularly, when building kdump initrd, plymouth module is omitted, but drm is necessary to setup a working screen for one sitting in front of a monitor.
Signed-off-by WANG Chao <[email protected]>--- modules.d/50drm/module-setup.sh | 4 ++++ 1 file changed, 4 insertions(+)modules.d/50drm/module-setup.sh +0
-0@@ -3,6 +3,10 @@ # ex: ts=8 sw=4 sts=4 et filetype=shQuoted 11 lines
modules.d/50drm/module-setup.sh line 12
Quoted 9 lines
modules.d/50drm/module-setup.sh +4
-0check() { + if [[ $hostonly ]] && [ -d /sys/module/drm/drivers ]; then + return 0 + fi + return 255 }Hmm, why not let the kdump module depend on drm?
If you do not like it we can consider add it to kdump module..
Quoted 5 lines
depends(){
echo drm
}
Quoted 9 lines
Quoted 2 lines
Anyway, do we really need drm for a simple console? Those drivers are really really big and take a long time to load and initialize?
It's a little awkward, after kernel crashing suppose 1st kernel is in kms mode, it can not reset to nomodeset, so screen will keep black.
There's no such issue in normal initramfs because bios always reset devices for us.
Ah! Thanks for the clarification! That makes sense. Because this happens only for kexec, I suggest to add the dependency to the kdump module.
Quoted 35 lines · WANG Chao
Quoted 34 lines · Dave Young
Quoted 32 lines · Harald Hoyer
Quoted 19 lines · WANG Chao
Now only 50plymouth module can pull in 50drm and that's very limited. Because KMS capable drm drivers are much needed in initrd to have a frame buffer console on the screen.
Particularly, when building kdump initrd, plymouth module is omitted, but drm is necessary to setup a working screen for one sitting in front of a monitor.
Signed-off-by WANG Chao <[email protected]>--- modules.d/50drm/module-setup.sh | 4 ++++ 1 file changed, 4 insertions(+)modules.d/50drm/module-setup.sh +0
-0modules.d/50drm/module-setup.sh line 12
Quoted 10 lines
modules.d/50drm/module-setup.sh +4
-0@@ -3,6 +3,10 @@ # ex: ts=8 sw=4 sts=4 et filetype=sh check() { + if [[ $hostonly ]] && [ -d /sys/module/drm/drivers ]; then + return 0 + fi + return 255 }Hmm, why not let the kdump module depend on drm?
Quoted 6 lines
Quoted 1 line
If you do not like it we can consider add it to kdump module..
So now if I build initrd w/o plymouth, I will not have frame buffer console in initrd. That looks more like a general issue to me.
WANG Chao
Do we really need a fb console?
If there is a valid reason, I will change "return 255" to "return 0".
Quoted 38 lines · Harald Hoyer
Quoted 37 lines · WANG Chao
Quoted 35 lines · Dave Young
Quoted 21 lines · Harald Hoyer
Quoted 20 lines · WANG Chao
Now only 50plymouth module can pull in 50drm and that's very limited. Because KMS capable drm drivers are much needed in initrd to have a frame buffer console on the screen.
Particularly, when building kdump initrd, plymouth module is omitted, but drm is necessary to setup a working screen for one sitting in front of a monitor.
Signed-off-by WANG Chao <[email protected]>--- modules.d/50drm/module-setup.sh | 4 ++++ 1 file changed, 4 insertions(+)modules.d/50drm/module-setup.sh +0
-0@@ -3,6 +3,10 @@ # ex: ts=8 sw=4 sts=4 et filetype=shQuoted 11 lines
modules.d/50drm/module-setup.sh line 12
Quoted 9 lines
modules.d/50drm/module-setup.sh +4
-0check() { + if [[ $hostonly ]] && [ -d /sys/module/drm/drivers ]; then + return 0 + fi + return 255 }Hmm, why not let the kdump module depend on drm?
If you do not like it we can consider add it to kdump module..
Quoted 7 lines
Quoted 4 lines
So now if I build initrd w/o plymouth, I will not have frame buffer console in initrd. That looks more like a general issue to me.
WANG Chao
Do we really need a fb console?
If there is a valid reason, I will change "return 255" to "return 0".
Actually I don't have strong technical reason.
But from a user's perspective, there are some benefits:
- Higher resolution on the screen. It's good-looking and show me much more text.
- Initializing drm drivers would cause a flash on the screen and clear all existing text. I'd like this flash happens in initrd not later in real root.
(During bootup, I care more about the status of real root systemd services than what's going on in initrd as long as it switches to root successfully)
I know it's weird for a normal boot to try to avoid plymouth but still want fb console. So I wouldn't blame it if you don't feel comfortable about the change.
Thanks
WANG Chao
Quoted 16 lines · WANG Chao
Quoted 3 lines
Do we really need a fb console?
If there is a valid reason, I will change "return 255" to "return 0".Actually I don't have strong technical reason.
But from a user's perspective, there are some benefits:
- Higher resolution on the screen. It's good-looking and show me much more text.
- Initializing drm drivers would cause a flash on the screen and clear all existing text. I'd like this flash happens in initrd not later in real root.
(During bootup, I care more about the status of real root systemd services than what's going on in initrd as long as it switches to root successfully)
Quoted 7 lines
I know it's weird for a normal boot to try to avoid plymouth but still want fb console. So I wouldn't blame it if you don't feel comfortable about the change.
Thanks
WANG Chao
Well, my reasons are size and speed for those who want a very minimal initramfs. The initramfs should not do more than it has to, to get to the real rootfs.
If someone omits the dracut plymouth module manually, he can also add drm in the same step, if he wants.
I might change my mind, when we move to wayland terminal consoles. :)
Quoted 25 lines · Harald Hoyer
Quoted 16 lines · WANG Chao
Quoted 3 lines
Do we really need a fb console?
If there is a valid reason, I will change "return 255" to "return 0".Actually I don't have strong technical reason.
But from a user's perspective, there are some benefits:
- Higher resolution on the screen. It's good-looking and show me much more text.
- Initializing drm drivers would cause a flash on the screen and clear all existing text. I'd like this flash happens in initrd not later in real root.
(During bootup, I care more about the status of real root systemd services than what's going on in initrd as long as it switches to root successfully)Quoted 7 lines
I know it's weird for a normal boot to try to avoid plymouth but still want fb console. So I wouldn't blame it if you don't feel comfortable about the change.
Thanks
WANG Chao
Quoted 7 lines
Well, my reasons are size and speed for those who want a very minimal initramfs. The initramfs should not do more than it has to, to get to the real rootfs.
If someone omits the dracut plymouth module manually, he can also add drm in the same step, if he wants.
I might change my mind, when we move to wayland terminal consoles. :)
Point taken. kdump will pull in drm module.
Thanks!