Summary: | plymouthd hangs in ply_terminal_deactivate_vt during quit | ||
---|---|---|---|
Product: | plymouth | Reporter: | Stefan Brüns <stefan.bruens> |
Component: | general | Assignee: | Ray Strode [halfline] <rstrode> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | rstrode |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
See Also: | https://bugs.freedesktop.org/show_bug.cgi?id=39774 | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | reset the console to mode KD_TEXT on quit |
Description
Stefan Brüns
2013-07-11 14:33:32 UTC
Created attachment 82339 [details] [review] reset the console to mode KD_TEXT on quit set_console is called by VT_ACTIVATE ioctl in vt_ioctl.c, but the return value is not passed on. plymouth takes the console out of VT_AUTO mode (into VT_PROCESS mode), so there's a missing peice to the puzzle here. from src/libply-splash-core/ply-terminal.c, ply_terminal_deactivate_vt (ply_terminal_t *terminal): --- /* Otherwise we'd close and free the terminal before handling the * "leaving the VT" signal. */ ply_terminal_stop_watching_for_vt_changes (terminal); old_vt_number = terminal->vt_number; if (ply_terminal_is_active (terminal)) { ply_trace ("Attempting to set active vt back to %d from %d", terminal->initial_vt_number, old_vt_number); if (!set_active_vt (terminal, terminal->initial_vt_number)) { ply_trace ("Couldn't move console to initial vt: %m"); return false; } if (!wait_for_vt_to_become_active (terminal, terminal->initial_vt_number)) { ply_trace ("Error while waiting for vt %d to become active: %m", terminal->initial_vt_number); return false; } } --- ply_terminal_stop_watching_for_vt_changes sets VT_AUTO Any comments? hey sorry for the slow response. ply_terminal has a function call ply_terminal_set_mode that wraps the ioctl for toggling between KD_GRAPHICS and KD_TEXT mode. ply_boot_splash calls this method to put the terminal into KD_GRAPHICS mode before showing the boot splash. For symmetry it should probably be responsible for putting it back in KD_TEXT mode. Indeed, there is a function in the ply_boot_splash code called ply_boot_splash_hide that has such a call: if (terminal != NULL) ply_terminal_set_mode (terminal, PLY_TERMINAL_MODE_TEXT); ply_terminal_deactivate_vt is called from quit_splash in main. All the callers of quit_splash call ply_boot_splash_hide() a few calls above their quit_splash call. Any chance you could debug why that isn't sufficient? (In reply to comment #6) > hey sorry for the slow response. > ply_terminal has a function call ply_terminal_set_mode that wraps the ioctl > for toggling between KD_GRAPHICS and KD_TEXT mode. This wrapper also checks for a flag to ignore mode change calls ... > ply_boot_splash calls this method to put the terminal into KD_GRAPHICS mode > before showing the boot splash. For symmetry it should probably be > responsible for putting it back in KD_TEXT mode. > > Indeed, there is a function in the ply_boot_splash code called > ply_boot_splash_hide that has such a call: > > if (terminal != NULL) > ply_terminal_set_mode (terminal, PLY_TERMINAL_MODE_TEXT); > > ply_terminal_deactivate_vt is called from quit_splash in main. All the > callers of quit_splash call ply_boot_splash_hide() a few calls above their > quit_splash call. > > Any chance you could debug why that isn't sufficient? In case "plymouth deactivate" has been issued before the quit, the mode change is unplugged by the call to ply_terminal_ignore_mode_changes (state->local_console_terminal, true); According to http://www.mail-archive.com/plymouth@lists.freedesktop.org/msg00107.html "plymouth deactivate" should be called if plymouth is running before the X server startup triggered by the display managerer (gdm, kdm, ...). So either the dm calls reactivate before plymouth quit (without --retain-splash) , or plymouth handles this on its own. Ping! hey sorry again for the slow response. So, I wonder if we actually need that ignore_mode_changes call. It was added here: http://cgit.freedesktop.org/plymouth/commit/?id=47452a1bc97c6e964f35623d4472018a6c7016e7 If the renderer is deactivated, I don't expect there to be any mode changes. Does just dropping that one call fix things for you? I have tried commenting out ply_terminal_ignore_mode_changes (state->terminal, true); in src/main.c:deactivate_splash, and it works as expected. So please apply. thanks for testing. appreciated. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.