A power-on method, apparatus, device, and medium
By unifying the management of display mode and control during the Linux system startup process, and combining early display agent processes and parallel initialization, the problem of display discontinuity during startup is solved, achieving a seamless transition from system power-on to the first frame display of the target streaming application, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-26
AI Technical Summary
In cloud gaming terminals and remote desktop clients on Linux systems, black screens, flickering, and screen jumps caused by the dispersion of display control during the startup process severely affect the user experience.
By unifying the management of display modes, display buffers, and display control at each stage of system startup, and by introducing an early display proxy process and a parallel initialization mechanism, continuous visual output across the entire chain can be achieved.
It effectively avoids black screens, flickering, and screen jumps during the startup process, improving the user's perception of system startup speed and visual quality.
Smart Images

Figure CN122086482A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud gaming and remote streaming display, and in particular to a power-on method, apparatus, device, and medium. Background Technology
[0002] In Linux-based cloud gaming terminals, cloud PC terminals, and remote desktop clients, the process from device power-on to the display of the first frame by the streaming application involves multiple stages, including boot loading, kernel initialization, user space display service startup, and target streaming application takeover of the display.
[0003] In related technologies, the display control at each stage is usually managed by different components, which causes Linux streaming terminals to frequently experience black screens, screen flickering, screen jumps, or resolution jitter during the startup process, seriously affecting users' perception of system startup speed and visual quality. Summary of the Invention
[0004] The purpose of this application is to provide a boot-up method, apparatus, device, and medium that can uniformly manage the display mode, display buffer, and display control at each stage, achieve continuous visual output throughout the entire process, effectively avoid black screen, flickering, and screen jump phenomena during the boot process, and significantly improve the user's perception of system boot speed and visual quality.
[0005] Firstly, a boot-up method is provided, comprising: during the initramfs phase, invoking a boot animation program to determine an optimal display mode based on display capability boundaries, wherein the display capability boundaries represent the maximum allowed display resolution and maximum refresh rate; and invoking the boot animation program to output a buffered frame corresponding to the boot animation screen from the frame buffer in the optimal display mode; during the user space initialization phase, starting a transitional display process in user space; controlling the boot animation program to release display control while maintaining continuous output of buffered frames from the frame buffer of the boot animation program, thereby enabling the transitional display process to gain display control; invoking the transitional display process to reuse the currently output buffered frame from the frame buffer of the boot animation program in the optimal display mode; simultaneously initializing a target streaming application while starting the transitional display process; after the target streaming application is initialized, controlling the transitional display process to stop submitting new display content while maintaining continuous output of buffered frames from the frame buffer of the transitional display process; controlling the target streaming application to gain display control, and reusing the currently output buffered frame from the frame buffer of the transitional display process as the initial display content in the optimal display mode to complete the boot process.
[0006] In a preferred example, this application may be further configured to include, before the initramfs stage, calling the startup animation program to determine the optimal display mode based on the display capability boundaries, passing the display capability boundaries to the kernel via kernel startup parameters during the kernel startup stage.
[0007] In a preferred embodiment, this application can be further configured to: call the startup animation program to determine the optimal display mode based on the display capability boundary, including: calling the startup animation program to filter multiple display modes that conform to the display capability boundary based on the display capability boundary; and determining the optimal display mode from the multiple display modes.
[0008] In a preferred embodiment, this application can be further configured to: control the startup animation program to release display control and maintain the continuous output of buffered frames from the frame buffer of the startup animation program, so that the transition display process gains display control, including: calling the transition display process to coordinate the startup animation program to release display control through an inter-process communication mechanism; and maintaining the continuous output of buffered frames from the frame buffer of the startup animation program; calling the transition display process to gain display control so as to be able to reuse the target elements displayed by the startup animation program, the target elements including: optimal display mode, the currently output buffered frames from the frame buffer of the startup animation program, color gamut, and color space.
[0009] In a preferred embodiment, this application can be further configured as follows: after the target streaming application is initialized, the transition display process is controlled to stop submitting new display content and maintain the frame buffer of the transition display process to continuously output cached frames, including: after the target streaming application is initialized, the initializing target streaming application is called to send a display takeover request to the transition display process, so that the transition display process stops submitting new display content based on the display takeover request and maintains the frame buffer of the transition display process to continuously output cached frames.
[0010] In a preferred embodiment, this application may further be configured to include: switching the audio output source after reusing the currently output buffered frame of the transition display process as the initial display content in the optimal display mode.
[0011] In a preferred embodiment, this application may be further configured to include: after the target streaming application is running stably, controlling the startup animation program and the transition display process to exit and release the occupied resources.
[0012] Secondly, a boot-up device is provided, comprising: a boot animation screen output module, used in the initramfs stage to call a boot animation program to determine the optimal display mode according to the display capability boundary, wherein the display capability boundary represents the maximum allowed display resolution and maximum refresh rate; and to call the boot animation program to output the cached frame corresponding to the boot animation screen from the frame buffer in the optimal display mode; a transition module, used in the user space initialization stage to start a user space transition display process; to control the boot animation program to release display control and keep the frame buffer of the boot animation program continuously outputting cached frames, so that the transition display process gains display control; and to call the transition display process to reuse the cached frame currently output by the frame buffer of the boot animation program in the optimal display mode; and a target streaming application control module, used to initialize a target streaming application in parallel while starting the transition display process; when the target streaming application is initialized, to control the transition display process to stop submitting new display content and keep the frame buffer of the transition display process continuously outputting cached frames; and to control the target streaming application to gain display control and reuse the cached frame currently output by the frame buffer of the transition display process as the initial display content in the optimal display mode to complete the boot process.
[0013] Thirdly, an electronic device is provided, the electronic device including a memory and a processor, the memory storing a computer program, the processor executing the power-on method according to any one of the first aspects when running the computer program.
[0014] Fourthly, a computer-readable storage medium is provided, wherein at least one piece of program code is stored therein, the program code being loaded and executed by a processor to implement the boot-up method as described in any of the first aspects.
[0015] Fifthly, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement the boot-up method as described in any of the first aspects.
[0016] In summary, the boot-up method provided in this application has the following beneficial technical effects: During the initramfs stage, the startup animation program determines the optimal display mode, which can be uniformly displayed in subsequent display processes. Furthermore, during the control switching process in each stage, the current frame of the buffer of the previous program is continuously output and used as the first output buffer frame of the subsequent program, ensuring screen consistency and achieving smooth connection of multi-stage display. In addition, an early display proxy process and parallel initialization mechanism are introduced to achieve continuous visual output across the entire link from system power-on to the display of the first frame of the target streaming application, effectively avoiding black screen, flickering, and screen jump phenomena during the startup process, and significantly improving the user's perception of system startup speed and visual quality.
[0017] In addition, this application also provides a power-on device, equipment, and medium, all of which have the aforementioned beneficial technical effects. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments or related technologies of this application, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic flowchart of a boot-up method provided in an embodiment of this application;
[0020] Figure 2 This is a schematic flowchart of another boot-up method provided in an embodiment of this application;
[0021] Figure 3 This is a schematic diagram of the structure of a power-on start-up device provided in an embodiment of this application;
[0022] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0023] This specific embodiment is merely an explanation of this application and is not intended to limit it. After reading this specification, those skilled in the art can make modifications to this embodiment without contributing any inventive step, but such modifications are protected by patent law as long as they are within the scope of this application.
[0024] It should be noted that, in the optional embodiments of this application, the data related to object information, when applied to specific products or technologies, requires the permission or consent of the object. Furthermore, the collection, use, and processing of this data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. In other words, if the embodiments of this application involve data related to an object, it must be obtained with the permission and consent of the object, the permission and consent of relevant departments, and in accordance with the relevant laws, regulations, and standards of the country and region. If the embodiments involve personal information, the acquisition of all personal information requires the consent of the individual. If sensitive information is involved, the separate consent of the information subject is required. The embodiments also need to be implemented with the permission and consent of the object.
[0025] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.
[0027] In Linux-based cloud gaming terminals, cloud PC terminals, and remote desktop clients, the process from device power-on to the display of the first frame by the streaming application involves multiple stages, including boot loading, kernel initialization, user-space display service startup, and the target streaming application taking over the display. In related technologies, display control at each stage is typically managed by different components, lacking a unified mechanism for display state coordination and continuous control, resulting in a distinctly segmented display output during startup.
[0028] Due to the aforementioned segmented display architecture, the system generally faces the following technical problems during the startup phase: First, between the kernel phase and the user-space display service, or in the early stages of display service startup (e.g., the initialization of the first display program or other first display program), the display pipeline often needs to be reinitialized and the frame buffer cleared, causing the output of the previous phase to be interrupted, resulting in a momentary black screen. Second, to meet the needs of cloud gaming and high frame rate streaming scenarios, when the target streaming application starts and renders the first frame, it usually needs to switch from the kernel's default display mode to a high refresh rate display mode. The traditional mode switching process triggers display channel reconstruction and hardware relocking, resulting in unavoidable black screens and flickering. Third, the initialization of the regular user-space display service (X11, Wayland) and the target streaming application is usually executed serially. The multi-level rendering and compositing process causes the first frame display delay to accumulate and subsequent streaming screen display delays to occur. Fourth, the lack of a display state transfer mechanism between different startup phases prevents the sharing of frame buffers and display parameters, resulting in repeated initialization of display resources and screen resets. The aforementioned issues collectively cause frequent black screens, screen flickering, image jumps, or resolution jitter during the startup process of Linux streaming terminals, severely impacting users' perception of system startup speed and visual quality. This makes them particularly unsuitable for cloud gaming and high-quality streaming applications that require a high-quality startup experience.
[0029] Therefore, there is an urgent need for a display continuity optimization solution that can span multiple stages of Linux system startup. By unifying the management of display buffers, display modes, and display control, it can eliminate the visual interruption problem caused by the traditional segmented display architecture and achieve a seamless display transition from system startup to the output of the first frame of the streaming.
[0030] This application aims to provide a solution for optimizing the display continuity during the system startup phase of the Linux operating system. Specifically, it is a seamless startup optimization method based on Linux streaming. By uniformly managing the display mode, display buffer, and display control at each stage of system startup, and introducing an early display agent process and a parallel initialization mechanism, it achieves continuous visual output across the entire chain from system power-on to the display of the first frame of the target streaming application. This effectively avoids black screen, flickering, and screen jump phenomena during startup, significantly improving the user's perception of system startup speed and visual quality.
[0031] This application provides a boot-up method, such as... Figure 1 As shown, the method provided in this application embodiment can be executed by an electronic device, which can be a terminal device, including, but not limited to, smartphones, tablets, laptops, desktop computers, etc. The method includes:
[0032] S101. In the initramfs stage, the startup animation program is called to determine the optimal display mode based on the display capability boundaries, where the display capability boundaries represent the maximum allowed display resolution and maximum refresh rate; and the startup animation program is called to output the buffered frame corresponding to the startup animation screen from the frame buffer in the optimal display mode.
[0033] After the Linux kernel completes basic initialization and loads the display driver, the system enters the initramfs stage and starts the animation program. This startup animation program selects the optimal display mode supported by the monitor based on the display capability limits and outputs the startup animation screen in that mode.
[0034] In this embodiment, the default cmdline setting sets the upper limit for resolution and refresh rate, i.e., the display capability boundary. The animation program will then obtain all supported display modes that conform to the display capability boundary through the DRM framework.
[0035] One possible implementation of this application embodiment involves calling a startup animation program to determine the optimal display mode based on display capability boundaries, including: calling the startup animation program to filter multiple display modes that conform to the display capability boundaries; and determining the optimal display mode from the multiple display modes.
[0036] Specifically, the process begins by sorting all supported display modes within the current environment (hardware and system environments), prioritizing higher resolutions and, within the same resolution, higher refresh rates. Based on the boundaries of the display modes supported by the business, multiple display modes that meet these boundaries are selected from the sorted list. Then, higher resolutions are prioritized, followed by higher refresh rates, to obtain the optimal display mode.
[0037] It should be noted that, in this embodiment, once the priority display mode is determined, all subsequent screen display programs will use this priority display mode. This eliminates the problem of black screens and flickering caused by mode switching triggering display channel reconstruction and hardware re-locking.
[0038] S102. During the user space initialization phase, start the user space transition display process; control the startup animation program to release display control and keep the startup animation program's frame buffer continuously outputting buffered frames, so that the transition display process gains display control; call the transition display process to reuse the currently output buffered frames of the startup animation program's frame buffer in the optimal display mode;
[0039] The display program that takes over the startup animation program is the early agent process, i.e. the transition display process. When switching to the user space initialization stage, the startup animation program is terminated with a delay, so that the startup animation program continues to occupy the display output and keeps the current frame buffer in the scanning output state, thereby ensuring that the startup screen is not interrupted during the stage switching process.
[0040] During the user space initialization phase, the startup animation program is not terminated immediately. Instead, it is terminated only after the transition display process gains display control. This ensures that the startup animation program continuously occupies the display device during the delay period, preventing a black screen or garbled display. During the user space initialization phase, the system starts a transition display process to take over the startup animation display and manage the orderly transfer of display control.
[0041] In one implementation, the transition display process, upon startup, acquires current display status information, including the active optimal display mode and the frame buffer currently being scanned for output, to determine the optimal display mode. In another implementation, the transition display process determines the optimal display mode based on display capability boundaries. Generally, the optimal display mode determined by the transition display process matches the acquired active optimal display mode. If they differ, an alarm message can be issued, or a restart can be initiated.
[0042] Subsequently, the transition display process coordinates with the startup animation program through inter-process communication mechanisms to release its exclusive control over the display, allowing the transition display process to gain display mastery while maintaining the current frame buffer of the startup animation program to continue outputting, preventing screen interruption. After gaining display control, the transition display process reuses the currently output buffered frames of the startup animation program's frame buffer in the optimal display mode. At this point, although the positions of the two frame buffers differ, their contents are identical, achieving seamless switching and maintaining continuous output from the frame buffer. This continuously updates the content in the frame buffer to ensure that the user space initialization phase screen can be output in the optimal display mode, including but not limited to playing loading animations and displaying initialization progress information.
[0043] It is understandable that when the animation program releases display control, the frame buffer is not released. The old and new frame buffers have different physical addresses, but the contents are the same.
[0044] In this embodiment, the physical addresses of the frame buffer corresponding to the startup animation program and the frame buffer corresponding to the transition display process can be the same or different, and this embodiment does not limit this. Therefore, in one possible implementation, if the frame buffers of the startup animation program and the transition display process correspond to different physical addresses, the transition display process, after determining the current cached frame of the startup animation program, writes that cached frame as the first cached frame to be displayed into its own frame buffer. In another possible implementation, if the frame buffers of the startup animation program and the transition display process correspond to the same physical address, then after starting the transition display process in user space and controlling the startup animation program to release display control, the startup animation program stops writing new content into the frame buffer, and the transition display process writes new content into that frame buffer.
[0045] In this embodiment, when the transition display process first takes over control of the display, it adopts an atomic commit to ensure a seamless and smooth transition display process after taking over. This ensures that events such as reset will not trigger a black screen between the kernel PIPE stream and the display. After updating the first frame of the loading animation (stream loading progress or similar new stage animation or static image) for the first time, the animation startup program plymouthd is notified to completely exit and release resources (the notifications are all based on the existing interface of plymouth).
[0046] S103. While starting the transition display process, initialize the target streaming application in parallel. After the target streaming application is initialized, keep the frame buffer of the transition display process continuously outputting buffered frames. Control the target streaming application to obtain display control and reuse the currently output buffered frames of the frame buffer of the transition display process as the initial display content in the optimal display mode to complete the startup process.
[0047] While the transition display process continuously outputs the screen, the system launches the target streaming application in parallel. This parallel processing method fully utilizes system resources and improves startup efficiency. The target streaming application initializes the graphics processing unit, audio / video decoder, and network connection channel in the background, but does not take over the display output (this is handled by the transition display process). By decoupling display output from application initialization and executing them in parallel, the time required for network connection and resource preparation is effectively hidden, reducing the user-perceived startup latency.
[0048] In one feasible approach, after the target streaming application completes initialization, it initiates a display takeover request to the transitional display process via inter-process communication. Upon receiving the request, the transitional display process stops submitting new display content and continues outputting from the current frame buffer to ensure that the screen does not experience blackouts or other abnormal display conditions. When the target streaming application takes over display control, it reuses the currently scanned frame buffer as its initial display content in the optimal display mode, thereby avoiding the reallocation of display buffers or the reconstruction of the display pipeline, achieving zero-copy screen inheritance.
[0049] In this embodiment, by coordinating the display processes of the Linux kernel, user space, and application layer, seamless display output is achieved from system power-on to streaming screen presentation, involving operating system startup optimization, graphics display control, and streaming display management technologies.
[0050] As can be seen, in the embodiments of this application, during the initramfs stage, the animation program is started to determine the optimal display mode. This optimal display mode can be displayed uniformly in subsequent display processes. Furthermore, during the control switching process of each stage, the current frame of the buffer of the previous program is continuously output and used as the first output buffer frame of the subsequent program, ensuring screen consistency and achieving smooth connection of multi-stage display. In addition, an early display proxy process and a parallel initialization mechanism are introduced to achieve continuous visual output across the entire link from system power-on startup to the display of the first frame of the target streaming application. This effectively avoids black screen, flickering, and screen jump phenomena that occur during startup, significantly improving the user's perception of system startup speed and visual quality.
[0051] To achieve the above objectives, this invention constructs a display continuity management mechanism that spans the Linux kernel, user space, and application layer. For example... Figure 2 As shown, the system solution of the present invention mainly includes the following steps and technical means.
[0052] like Figure 2As shown, the main process can be divided into: 1. Power-on startup phase, which mainly involves loading the Bootload program. 2. Kernel loading phase, which includes two parts: cmdline display parameter hardening and Linux kernel loading. cmdline display parameter hardening involves display mode pre-negotiation and consistency management. 3. initramfs phase, which implements the boot animation through Plymouthd. This process mainly involves the display of the startup animation and the maintenance of the display buffer. This process runs in the initramfs temporary root file system of the Linux system. 4. User space initialization phase. After Init starts, two processes run concurrently: early agent process: this process involves the intervention of the transition display process. Target streaming application: this mainly involves seamless switching of the target streaming application screen. It also involves smooth switching of the audio channel. 5. Orderly release of display resources: after seamlessly taking over all screens, the relevant processes are notified to release resources. Steps 4 and 5 both run in the rootfs real root file system.
[0053] Specifically, in one possible implementation of this application embodiment, before calling the startup animation program to determine the optimal display mode based on the display capability boundary during the initramfs stage, the method further includes: during the kernel startup stage, passing the display capability boundary to the kernel through kernel startup parameters.
[0054] In traditional systems, the boot animation and subsequent display mode typically use the monitor's preferred mode, described in the monitor's EDID (Edge ID). This mode is generally conservative, resulting in a lower resolution and refresh rate. Once in the actual root file system (user space), traditional systems usually set a higher resolution and refresh rate for a better experience, at which point the display mode switches. Alternatively, in high-refresh-rate cloud computing scenarios, a higher resolution and refresh rate may be used. This change in display mode causes both the terminal's graphics card driver and the monitor to reset, resulting in a 2-3 second black screen.
[0055] In this application, the necessary display parameters are unified early on, and all subsequent display-related programs ensure consistent display modes. This step involves display mode pre-negotiation and consistency management. In the early stages of system power-on startup, to avoid triggering monitor resynchronization due to inconsistent display modes at different startup stages, the maximum supported upper limit of the display resolution and refresh rate required by the service, i.e., the display capability boundary, is pre-fixed through kernel startup parameters during the kernel startup stage.
[0056] All programs in the system that involve display output are based on this unified display capability boundary, using the same strategy to filter and match the modes supported by the monitor. This ensures consistency in display modes throughout the system startup process, preventing monitor resets or black screens caused by mode inconsistencies at different stages. Display output programs include all display-related programs. Taking Linux as an example, this includes the startup animation program plymouthd, and the X11 or Wayland service after entering the user system. For systems without traditional X11 or Wayland services (which are not used due to latency), this includes: early agent processes and streaming programs (displaying real-time cloud computer images).
[0057] One possible implementation of this application embodiment involves controlling the startup animation program to release display control while maintaining the continuous output of buffered frames from the startup animation program's frame buffer, thereby enabling the transition display process to gain display control. This includes: calling the transition display process to coordinate the startup animation program to release display control through an inter-process communication mechanism; maintaining the continuous output of buffered frames from the startup animation program's frame buffer; and calling the transition display process to gain display control so as to reuse the target elements displayed by the startup animation program. The target elements include: the optimal display mode, the currently output buffered frames from the startup animation program's frame buffer, the color gamut, and the color space.
[0058] The transition display process coordinates the start of the animation program to release display control through inter-process communication mechanisms; the transition display process then gains display control. During the initial initialization, when taking over display control, an atomic commit is used to ensure a seamless transition process. After taking over, it is ensured that events such as resets between the kernel PIPE stream and the display do not trigger a black screen. Specifically, at least the following basic elements should be ensured: obtain the currently active display mode and reuse the current display mode (resolution refresh rate); obtain the currently displayed plane and its corresponding framebuffer and reuse it; obtain the current display color range (FULL-RANGE or LIMITED-RANGE) and reuse it; obtain the color space of the currently displayed plane (BT709 or BT2020, etc.) and reuse it.
[0059] Based on the above target elements, the submission mechanism provided by the display control can complete the display submission in the new process in one go, while maintaining the consistency of the display content, display mode and color with the previous process, ensuring that the display state is switched in a single atomic operation, thereby avoiding flickering or black screen phenomena.
[0060] After initialization, transitional screens such as brand logo, loading progress, or network status can be output according to business needs, and the new framebuffer of this process can be updated and submitted in real time. That is, after entering user space and the agent display process starts, the boot animation task is completed, and a new business phase begins. Before the target streaming program can display the remote cloud computer screen, this phase can be used to display new business phase screens such as the cloud computer loading progress.
[0061] One possible implementation of this application embodiment is as follows: after the target streaming application is initialized, the transition display process is controlled to stop submitting new display content and the frame buffer of the transition display process continues to output cached frames. This includes: after the target streaming application is initialized, the target streaming application is called to send a display takeover request to the transition display process, so that the transition display process stops submitting new display content based on the display takeover request and the frame buffer of the transition display process continues to output cached frames.
[0062] Once the target streaming application completes initialization, it initiates a display takeover request to the transitional display process via inter-process communication. Upon receiving the request, the transitional display process stops submitting new display content and continues outputting from the current framebuffer. When the target streaming application takes over display control, it reuses the currently scanning and outputting framebuffer as its initial display content, thereby avoiding the need to reallocate the display buffer or rebuild the display pipeline, achieving zero-copy screen inheritance.
[0063] One possible implementation of this application embodiment further includes: after reusing the currently output buffered frame of the transition display process as the initial display content in the optimal display mode, switching the audio output source.
[0064] This step involves a smooth switching of the audio channel. After the video feed successfully switches to the streaming content, the system simultaneously switches the audio output source. Through short-time mixing or delay compensation mechanisms, pops or silences during the audio switching process are avoided, achieving a seamless transition between audio and video.
[0065] One possible implementation of this application embodiment further includes: after the target streaming application is running stably, controlling the startup animation program and transition display process to exit and releasing the occupied resources.
[0066] Once the target streaming application is running stably, it uses inter-process communication to notify the startup animation program and transition display process to exit in an orderly manner, releasing the display and system resources they occupy, thus completing a seamless startup process from boot to streaming screen display.
[0067] Furthermore, multiple processes may run simultaneously in the system, competing for system resources (such as memory and CPU), affecting startup performance and display quality. Therefore, resource usage limits are set for each process, prioritizing the resource needs of startup animation programs and transition display processes.
[0068] Based on any of the above embodiments, this application proposes a Linux streaming-based seamless boot optimization method. By constructing a unified display continuity management mechanism across the kernel boot stage (from the kernel boot stage to the display of the target program screen), the user space initialization stage, and the target streaming program running stage, a smooth connection of display mode, display buffer, and display control between multiple stages is achieved, thereby eliminating the black screen, flickering, and screen jump problems caused by traditional segmented display control.
[0069] I. Pre-negotiation and consistency management of display modes.
[0070] In the early stages of system power-on startup, to avoid triggering display resynchronization due to inconsistent display modes at different startup stages, this embodiment predetermines the display capability boundaries required by the service during the kernel startup stage.
[0071] Specifically, when loading the Linux kernel, the bootloader passes display capability limit information to the kernel via kernel boot parameters. This information describes the maximum display resolution and refresh rate range allowed for the application. After parsing this parameter, the kernel uses it as the basis for a unified strategy for subsequent display output.
[0072] In the subsequent startup phase, the display process that first takes over the display output matches the optimal display mode from the set of modes supported by the display based on the display capability boundary and completes activation; subsequent display processes reuse the currently activated display mode, thereby avoiding repeated display mode switching throughout the startup process.
[0073] II. Animation display and display buffer maintenance during the startup phase.
[0074] After the Linux kernel completes basic initialization and loads the display driver, the system enters the initramfs stage and starts the startup animation program. This startup animation program selects the optimal display mode supported by the monitor based on the aforementioned display capability boundaries and outputs the startup animation screen in that mode.
[0075] When the system switches to the user space initialization phase, the startup animation program is terminated with a delay, so that it continues to occupy the display output and keeps the current frame buffer in the scanning output state, thereby ensuring that the startup screen is not interrupted during the phase switching process.
[0076] III. Intervention of the transition display process.
[0077] During the user space initialization phase, the system initiates a transitional display process to take over the startup animation display and manage the orderly transfer of display control. Upon startup, this transitional display process acquires current display status information, including the active display modes and the frame buffer currently being scanned for output.
[0078] Subsequently, the animation program is coordinated to release the exclusive control of the display through the inter-process communication mechanism, so that the transition display process can obtain the display master control capability, while the current frame buffer continues to output to avoid screen interruption.
[0079] IV. Atomic-level switching of transition screens.
[0080] Upon initialization and takeover of display control, an atomic commit is used to ensure a seamless transition process. After takeover, it is crucial to prevent events like resets from triggering and causing a black screen. Specifically, at least the following basic elements should be ensured: Obtain the currently active display mode and reuse it (resolution / refresh rate); obtain and reuse the currently displayed plane and its corresponding framebuffer; obtain and reuse the current display color gamut (FULL-RANGE or LIMITED-RANGE); obtain and reuse the color space of the currently displayed plane (BT709 or BT2020, etc.).
[0081] Based on the above factors, the submission mechanism provided by the display control can complete the display submission in the new process in one go, while maintaining the consistency of the display content, display mode and color with the previous process. This ensures that the display state is switched in a single atomic operation, thereby avoiding flickering or black screen phenomena.
[0082] After initialization is complete, transitional screens such as brand logo, loading progress, or network status can be output according to business needs, and the new framebuffer of this process can be updated and submitted in real time.
[0083] V. Parallel Initialization of Applications and Networks.
[0084] While the transition display process continuously outputs the screen, the system launches the target streaming application in parallel. The target application initializes its graphics processing unit, audio / video decoder, and network connection channel in the background, but does not take over the display output immediately. By decoupling display output from application initialization and executing them in parallel, the time required for network connection and resource preparation is effectively hidden, reducing the perceived startup latency.
[0085] VI. Seamless switching of target streaming application screens.
[0086] Once the target streaming application completes initialization, it sends a display takeover request to the transitional display process via inter-process communication. Upon receiving the request, the transitional display process stops submitting new display content and continues outputting from the current frame buffer.
[0087] When the target application takes over display control, it reuses the currently scanned output frame buffer as its initial display content, thereby avoiding the need to reallocate the display buffer or rebuild the display pipeline, achieving zero-copy screen inheritance. This aligns with the four core elements of transition screen switching.
[0088] After the target streaming application completes the rendering of the first frame, it smoothly switches the display output from the transition screen to the actual streaming screen through the atomic submission interface of the display controller. This switching process is completed in a single atomic operation, so that the user cannot perceive any display interruption or screen jump.
[0089] 7. (Optional) Smooth switching of audio channels.
[0090] After the video feed successfully switches to the streaming content, the system simultaneously switches the audio output source. Through short-time mixing or delay compensation mechanisms, pops or silences during audio switching are avoided, achieving a seamless transition between audio and video.
[0091] 8. Display the orderly release of resources.
[0092] Once the target streaming application is running stably, the animation program and transition display process are notified to exit in an orderly manner through inter-process communication, releasing the display and system resources they occupy, thus completing the seamless startup process from boot to streaming screen display.
[0093] The following describes a power-on device according to an embodiment of this application. The device described below can be referred to in correspondence with the method described above. The device in this embodiment is installed in an electronic device. Figure 3 , Figure 3 This is a structural block diagram of an apparatus according to one embodiment of this application, comprising:
[0094] The startup animation screen output module 210 is used in the initramfs stage to call the startup animation program to determine the optimal display mode based on the display capability boundary, where the display capability boundary represents the maximum allowed display resolution and maximum refresh rate; and to call the startup animation program to output the buffered frame corresponding to the startup animation screen from the frame buffer in the optimal display mode.
[0095] The transition module 220 is used to start the transition display process in user space during the user space initialization phase; control the startup animation program to release display control and keep the frame buffer of the startup animation program continuously outputting buffered frames, so that the transition display process can obtain display control; and call the transition display process to reuse the currently output buffered frames of the frame buffer of the startup animation program in the optimal display mode.
[0096] The target streaming application control module 230 is used to initialize the target streaming application in parallel while starting the transition display process; after the target streaming application is initialized, it controls the transition display process to stop submitting new display content and keeps the frame buffer of the transition display process continuously outputting cached frames; it controls the target streaming application to obtain display control and reuses the currently output cached frames of the frame buffer of the transition display process as the initial display content in the optimal display mode to complete the startup process.
[0097] In one possible implementation, it also includes: a display capability boundary passing module, used to pass the display capability boundary to the kernel via kernel startup parameters during the kernel startup phase.
[0098] In one possible implementation, the output startup animation screen module 210 is used to: call the startup animation program to filter multiple display modes that meet the display capability boundaries according to the display capability boundaries; and determine the optimal display mode from the multiple display modes.
[0099] In one possible implementation, the transition module 220 is used to: call the transition display process to coordinate the release of display control by the startup animation program through an inter-process communication mechanism; and maintain the continuous output of buffered frames by the frame buffer of the startup animation program; and call the transition display process to obtain display control so as to reuse the target elements displayed by the startup animation program, the target elements including: the optimal display mode, the buffered frames currently output by the frame buffer of the startup animation program, the color range, and the color space.
[0100] In one possible implementation, the target streaming application control module 230 is configured to: after the target streaming application is initialized, call the initialization target streaming application to send a display takeover request to the transition display process, so that the transition display process stops submitting new display content based on the display takeover request, and keeps the frame buffer of the transition display process continuously outputting buffered frames.
[0101] In one possible implementation, it also includes an audio output source switching module, which switches the audio output source after reusing the currently output buffered frame of the transition display process as the initial display content in the optimal display mode.
[0102] In one possible implementation, it also includes a resource release module, which is used to control the exit of the startup animation program and transition display process and release the occupied resources after the target streaming application is running stably.
[0103] Figure 4 A structural diagram of an electronic device provided in an embodiment of the present invention, such as... Figure 4 As shown, the electronic device includes: a memory 60 for storing a computer program; and a processor 61 for executing the computer program to implement the steps of the method as described in the above embodiments.
[0104] The electronic devices provided in this embodiment may include, but are not limited to, smartphones, tablets, laptops, or desktop computers.
[0105] The processor 61 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 61 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 61 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 61 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.
[0106] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 60 is used to store at least the following computer program 601, which, after being loaded and executed by the processor 61, is capable of implementing the relevant steps of the method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. The operating system 602 may include Windows, Unix, Linux, etc.
[0107] In some embodiments, the electronic device may further include a display screen 62, an input / output interface 63, a communication interface 64, a power supply 65, and a communication bus 66.
[0108] Those skilled in the art will understand that Figure 4 The structures shown do not constitute a limitation on electronic devices and may include more or fewer components than those shown.
[0109] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the current technology, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, magnetic disks, or optical disks, and other media capable of storing program code.
[0110] Based on this, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described above.
[0111] Based on this, embodiments of the present invention also provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the above-described method. It should be understood that although the steps in the flowcharts of the accompanying drawings are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0112] The above are only some embodiments of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for starting up a computer, characterized by, The application relates to a method for starting a display device, and belongs to the technical field of display device. In the initramfs stage, a starting animation program is called to determine an optimal display mode according to a display capability boundary, wherein the display capability boundary represents a maximum display resolution and a maximum refresh rate allowed to be used; and the starting animation program is called to output a buffer frame corresponding to a starting animation picture from a frame buffer in the optimal display mode. In the user space initialization stage, a transition display process in the user space is started; the starting animation program is controlled to release display control and keep the frame buffer of the starting animation program to continuously output the buffer frame, so that the transition display process obtains the display control; the transition display process is called to multiplex the buffer frame currently output by the frame buffer of the starting animation program in the optimal display mode. In the process of starting the transition display process, a target streaming application is initialized in parallel; when the target streaming application is initialized, the frame buffer of the transition display process is kept to continuously output the buffer frame; the target streaming application is controlled to obtain the display control, multiplex the buffer frame currently output by the frame buffer of the transition display process as initial display content in the optimal display mode, and complete the starting process.
2. The method of claim 1, wherein, In the initramfs stage, before the starting animation program is called to determine the optimal display mode according to the display capability boundary, the method further comprises the following steps. In the kernel starting stage, the display capability boundary is transmitted to the kernel through a kernel starting parameter.
3. The method of claim 1, wherein, The method that the starting animation program is called to determine the optimal display mode according to the display capability boundary comprises the following steps. The starting animation program is called to filter a plurality of display modes according to the display capability boundary. The optimal display mode is determined from the plurality of display modes.
4. The method of claim 1, wherein, The method that the starting animation program is controlled to release the display control and keep the frame buffer of the starting animation program to continuously output the buffer frame, so that the transition display process obtains the display control, comprises the following steps. The transition display process is called to coordinate the starting animation program to release the display control through an inter-process communication mechanism; and the frame buffer of the starting animation program is kept to continuously output the buffer frame. The transition display process is called to obtain the display control, so as to multiplex a target element displayed by the starting animation program, and the target element comprises the optimal display mode, the buffer frame currently output by the frame buffer of the starting animation program, a color range and a color space.
5. The method of claim 1, wherein, When the target streaming application is initialized, the transition display process is controlled to stop submitting new display content, and the frame buffer of the transition display process is kept to continuously output the buffer frame. When the target streaming application is initialized, the transition display process is called to send a display takeover request to the starting animation program, so that the transition display process stops submitting new display content based on the display takeover request, and the frame buffer of the transition display process is kept to continuously output the buffer frame.
6. The method of claim 1, wherein, The method further comprises the following steps. After the buffer frame currently output by the frame buffer of the transition display process is multiplexed as the initial display content in the optimal display mode, an audio output source is switched.
7. The method of claim 1, wherein, The method further comprises the following steps. When the target streaming application is stably running, the starting animation program and the transition display process are controlled to exit and release the occupied resources.
8. A power-on starting apparatus characterized by comprising: The application relates to a method for starting a display device, and belongs to the technical field of display device. The module for outputting the startup animation screen is used in the initramfs stage to call the startup animation program to determine the optimal display mode based on the display capability boundaries, wherein the display capability boundaries represent the maximum allowed display resolution and maximum refresh rate; and to call the startup animation program to output the buffered frame corresponding to the startup animation screen from the frame buffer in the optimal display mode. The transition module is used to start the transition display process in user space during the user space initialization phase; control the startup animation program to release display control and keep the frame buffer of the startup animation program continuously outputting cached frames, so that the transition display process can obtain display control; and call the transition display process to reuse the currently output cached frames of the frame buffer of the startup animation program in the optimal display mode. The target streaming application control module is used to initialize the target streaming application in parallel while starting the transition display process; after the target streaming application is initialized, it controls the transition display process to stop submitting new display content and keeps the frame buffer of the transition display process continuously outputting cached frames; it controls the target streaming application to obtain display control and reuses the currently output cached frames of the frame buffer of the transition display process as the initial display content in the optimal display mode to complete the startup process.
9. An electronic device, comprising: The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the method according to any one of claims 1 to 7 when running the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one piece of program code, which is loaded and executed by a processor to implement the method as described in any one of claims 1 to 7.