You are not logged in.
[ Disclaimer: I am not an expert. I am not sure if this is the right section for a "howto". I felt this is too experimental for the plymouth wiki. What is described here is specific to gnome 3.14. Some of the issues have been reported and fixes are already in the upstream git. Consider this a mere consolidation of my findings from experiment and other people's posts. This can be both technical and naive at the same time.]
I wanted to at least:
* start plymouth as early as possible
* not have a black screen in the transition from plymouth to gdm
* not have black screen in the transition from gdm to gnom-shell
The ultimate goal was to get a flicker free boot and shutdown. I have only figured out the boot part so far.
STEP 1: make plymouth to gdm and gdm to gnome shell transitions smooth
what worked:
1. compile gdm with --with-plymouth option
2. patch mutter to avoid black screen in transition from gdm to gnome-shell [check references]
I was also informed by another user who tried my suggestion that if patching mutter does not work you may try autologin.
As simple as:
# export ABSROOT=$HOME/abs
# abs extra/gdm
# cd ~/abs/extra/gdm
# makepkg -o
<make changes to PKGBUILD> ...
# makepkg -efi
# abs extra/mutter
# cd ~/abs/extra/mutter
# makepkg -o
# cd src/mutter*/
<make changes to core/screen.c ==> reference [2] > ...
# cd ~/abs/extra/mutter
# makepkg -efi
references:
[1] https://wiki.archlinux.org/index.php/Arch_Build_System
[2] https://bugzilla.gnome.org/show_bug.cgi?id=740377#c17
[3] https://bugzilla.gnome.org/show_bug.cgi?id=740802
[4] https://aur.archlinux.org/packages/plym … mments=all
[5] https://wiki.archlinux.org/index.php/GD … atic_login
Extras:
STEP 2: Get to user space as early as possible
What worked:
1. Let the kernel do minimal init before loading initramfs. That means keeping as many drivers as possible as modules. The default kernel is probably good enough. Custom kernel compilations should consider this factor.
2. About 4 seconds were spent in waiting for a pci-quirk to finish. I tried to speed it up and it does not seem to affect my usage. So I am sticking with it.
patch: [**naive hack**]
diff -aur src.save/linux-3.14/drivers/usb/host/pci-quirks.c src/linux-3.14/drivers/usb/host/pci-quirks.c
--- src.save/linux-3.14/drivers/usb/host/pci-quirks.c 2014-12-08 18:44:54.985401102 +0530
+++ src/linux-3.14/drivers/usb/host/pci-quirks.c 2014-12-07 02:00:41.545236878 +0530
@@ -713,7 +713,9 @@
if (try_handoff) {
int msec = 1000;
while ((cap & EHCI_USBLEGSUP_BIOS) && (msec > 0)) {
+ pci_read_config_dword(pdev, offset, &cap);
tried_handoff = 1;
+ break;
msleep(10);
msec -= 10;
pci_read_config_dword(pdev, offset, &cap);
3. Start systemd in the initramfs: [documented]
Created a custom mkinitcpio preset and conf files and added the hooks in the conf file. sd-plymouth is not in the repos (check references).
HOOKS="systemd sd-plymouth .. ... "
With these two hooks, base, udev and plymouth hooks are not required. But read: mkinitcpio -H systemd
references:
[1] https://github.com/Celti/mkinitcpio-systemd-plymouth
[2] https://aur.archlinux.org/packages/plym … mments=all
[3] https://wiki.archlinux.org/index.php/mk … mmon_hooks
[4] mkinitcpio -H systemd
STEP 3: grub to drm driver transition [**naive hack**]
what worked:
1. Statically compiled the video driver into the kernel. This prevented VGA/VESA drivers from creating an early console which is then removed in favor of drm frame buffer once a drm driver loads.
2. To prevent the display from going off and "flashing" back ON (not just black, but backlight was getting switched off and on) I hacked my kernel drm module and radeon driver to not turn off the backlight during certain phases. Screen blanking during screen lock still seems to work.
patch on 3.14 lts kernel: [**naive hack**]
diff -aur src.save/linux-3.14/drivers/gpu/drm/drm_crtc_helper.c src/linux-3.14/drivers/gpu/drm/drm_crtc_helper.c
--- src.save/linux-3.14/drivers/gpu/drm/drm_crtc_helper.c 2014-12-08 18:39:03.991282206 +0530
+++ src/linux-3.14/drivers/gpu/drm/drm_crtc_helper.c 2014-12-02 17:24:21.050601032 +0530
@@ -295,6 +295,8 @@
struct drm_connector *connector;
struct drm_crtc *crtc;
+ dev->ignore_backlight_off++;
+
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
if (!connector->encoder)
continue;
@@ -321,6 +323,8 @@
crtc->fb = NULL;
}
}
+
+ dev->ignore_backlight_off--;
}
EXPORT_SYMBOL(drm_helper_disable_unused_functions);
diff -aur src.save/linux-3.14/drivers/gpu/drm/radeon/atombios_encoders.c src/linux-3.14/drivers/gpu/drm/radeon/atombios_encoders.c
--- src.save/linux-3.14/drivers/gpu/drm/radeon/atombios_encoders.c 2014-12-08 18:44:54.759396883 +0530
+++ src/linux-3.14/drivers/gpu/drm/radeon/atombios_encoders.c 2014-12-02 17:33:33.825952080 +0530
@@ -1686,9 +1686,12 @@
if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT))
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_LCD_BLON, 0, 0);
break;
+ case DRM_MODE_DPMS_OFF:
+ if ((radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) && dev->ignore_backlight_off){
+ break;
+ }
case DRM_MODE_DPMS_STANDBY:
case DRM_MODE_DPMS_SUSPEND:
- case DRM_MODE_DPMS_OFF:
if (ASIC_IS_DCE4(rdev)) {
/* disable the transmitter */
atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_DISABLE, 0, 0);
diff -aur src.save/linux-3.14/drivers/gpu/drm/radeon/radeon_fb.c src/linux-3.14/drivers/gpu/drm/radeon/radeon_fb.c
--- src.save/linux-3.14/drivers/gpu/drm/radeon/radeon_fb.c 2014-12-08 18:39:04.273292119 +0530
+++ src/linux-3.14/drivers/gpu/drm/radeon/radeon_fb.c 2014-12-02 17:03:32.129228406 +0530
@@ -343,6 +343,8 @@
int bpp_sel = 32;
int ret;
+ rdev->ddev->ignore_backlight_off++;
+
/* select 8 bpp console on RN50 or 16MB cards */
if (ASIC_IS_RN50(rdev) || rdev->mc.real_vram_size <= (32*1024*1024))
bpp_sel = 8;
@@ -369,6 +371,7 @@
drm_helper_disable_unused_functions(rdev->ddev);
drm_fb_helper_initial_config(&rfbdev->helper, bpp_sel);
+ rdev->ddev->ignore_backlight_off--;
return 0;
}
diff -aur src.save/linux-3.14/include/drm/drmP.h src/linux-3.14/include/drm/drmP.h
--- src.save/linux-3.14/include/drm/drmP.h 2014-12-08 18:39:17.885764823 +0530
+++ src/linux-3.14/include/drm/drmP.h 2014-11-30 00:14:18.323377778 +0530
@@ -1205,6 +1205,7 @@
int switch_power_state;
atomic_t unplugged; /* device has been unplugged or gone away */
+ int ignore_backlight_off; /*HACK*/
};
#define DRM_SWITCH_POWER_ON 0
possible todo:
Retain grub background during video hardware init.
STEP 4: bios to grub transition [documented]
what worked:
1. I hid the grub menu. Then to hide the welcome message I used grub susher. I could have also recompiled grub from code if necessary.
references:
[1] https://bbs.archlinux.org/viewtopic.php?id=84683
[2] https://wiki.archlinux.org/index.php/GRUB#Hidden_menu
[3] https://github.com/ccontavalli/grub-shusher/
possible todo:
A caret still shows. Might try to compile grub from source.
Last edited by gokul (2014-12-08 19:49:13)
Offline