CN115098177B - Display card drive switching method and device and readable storage medium - Google Patents

Display card drive switching method and device and readable storage medium Download PDF

Info

Publication number
CN115098177B
CN115098177B CN202211022944.XA CN202211022944A CN115098177B CN 115098177 B CN115098177 B CN 115098177B CN 202211022944 A CN202211022944 A CN 202211022944A CN 115098177 B CN115098177 B CN 115098177B
Authority
CN
China
Prior art keywords
nvidia
driver
drive
display card
closed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211022944.XA
Other languages
Chinese (zh)
Other versions
CN115098177A (en
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nfs China Software Co ltd
Original Assignee
Nfs China Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nfs China Software Co ltd filed Critical Nfs China Software Co ltd
Priority to CN202211022944.XA priority Critical patent/CN115098177B/en
Publication of CN115098177A publication Critical patent/CN115098177A/en
Application granted granted Critical
Publication of CN115098177B publication Critical patent/CN115098177B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The embodiment of the application provides a video card drive switching method and device and a readable storage medium. The method comprises the following steps: receiving a reconfiguration drive request, wherein the reconfiguration drive request is used for requesting to replace a default display card drive of the computer equipment, and the default display card drive is a currently effective display card drive; responding to the reconfiguration drive request, displaying a preset interface, wherein a version number of a selectable Nvidia closed-source drive is displayed in the preset interface, and the selectable Nvidia closed-source drive is an Nvidia closed-source drive which exists in the first video card drive library and is matched with a current video card in the computer equipment; and setting the default display card drive according to the selection result aiming at the preset interface. The embodiment of the invention can realize the dynamic switching between the Nvidia closed source drivers on the premise of not unloading the installed display card driver in the system, and can reduce the operation cost of a user.

Description

Display card drive switching method and device and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for switching display card drivers, and a readable storage medium.
Background
The Linux Operating System is a clone System developed based on a UNIX Operating System, is a multi-user, multi-task, multi-thread and multi-CPU (Central Processing Unit) Operating System based on a POSIX (Portable Operating System Interface) and UNIX, and can install and run various application software, such as office software, a browser, a document viewer and the like.
The display card is used for converting received signals into electric signals, and displays graphics on the display in a scanning mode, and the normal work of the display card needs the support of a driver, namely after the display card is configured, the normal operation of the display card needs to be supported by installing the driver of the display card.
The default installed Nvidia display card driver of the Linux operating system is the noveau open source driver, and if a user wants to replace the noveau open source driver in the system with the Nvidia closed source driver or the user wants to update the version of the existing Nvidia closed source driver in the system, the needed display card driver needs to be installed again after the installed display card driver in the system is uninstalled. When a user needs to replace the display card or replace the display card driver or update the display card driver version, the operation of uninstalling and reinstalling the display card driver needs to be executed, so that inconvenience is brought to the user operation.
Disclosure of Invention
The embodiment of the application provides a display card drive switching method, a display card drive switching device and a readable storage medium, which can realize dynamic switching between Nvidia closed source drives and reduce user operation cost on the premise of not uninstalling a display card drive installed in a system.
In order to solve the above problem, an embodiment of the present application discloses a display card drive switching method, which is applied to a computer device, where a preset display card drive library is installed in advance in the computer device, the preset display card drive library includes a first display card drive library, the first display card drive library includes at least one kind of Nvidia closed source drive installed in advance, the Nvidia closed source drive is obtained by installing a compatible installation package manufactured in advance, and the method includes:
receiving a reconfiguration drive request, wherein the reconfiguration drive request is used for requesting to replace a default display card drive of the computer equipment, and the default display card drive is a currently effective display card drive;
responding to the reconfiguration drive request, displaying a preset interface, wherein a version number of a selectable Nvidia closed-source drive is displayed in the preset interface, and the selectable Nvidia closed-source drive is an Nvidia closed-source drive which exists in the first video card drive library and is matched with a current video card in the computer equipment;
and setting the default display card drive according to the selection result aiming at the preset interface.
On the other hand, this application embodiment discloses display card drive auto-change over device is applied to computer equipment, computer equipment installs in advance and presets the display card driver storehouse, preset the display card driver storehouse and include first display card driver storehouse, including at least one kind of Nvidia closed source drive of preinstallation in the first display card driver storehouse, nvidia closed source drive obtains through the installation of the compatible installation package of preparation in advance, the device includes:
a request receiving module, configured to receive a reconfiguration drive request, where the reconfiguration drive request is used to request to replace a default graphics card drive of the computer device, and the default graphics card drive is a currently-active graphics card drive;
an interface display module, configured to respond to the reconfiguration drive request, to display a preset interface, where a version number of an optional Nvidia closed-source driver is displayed in the preset interface, and the optional Nvidia closed-source driver is an Nvidia closed-source driver that exists in the first graphics card driver library and is adapted to a current graphics card in the computer device;
and the drive setting module is used for setting the default display card drive according to the selection result aiming at the preset interface.
In another aspect, the present application discloses an apparatus for video card driver switching, which includes a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, and the one or more programs include instructions for performing one or more of the video card driver switching methods described above.
In yet another aspect, an embodiment of the present application discloses a readable storage medium, on which instructions are stored, which when executed by one or more processors of an apparatus, cause the apparatus to perform a graphics card driver switching method according to one or more of the foregoing descriptions.
The embodiment of the application has the following advantages:
the preset display card drive library is installed in the computer equipment in advance, the preset display card drive library comprises a first display card drive library, at least one kind of Nvidia closed source drive installed in advance is included in the first display card drive library, and the Nvidia closed source drive is obtained through installation of a compatible installation package manufactured in advance. Therefore, when a reconfiguration drive request is received, a preset interface can be displayed in response to the reconfiguration drive request, and the version number of the optional Nvidia closed-source drive is displayed in the preset interface; the selectable Nvidia closed source driver is an Nvidia closed source driver which exists in the first video card driver library and is matched with a current video card in the computer device; and finally, setting the default display card drive according to the selection result aiming at the preset interface. Therefore, the embodiment of the application can support the dynamic switching between the Nvidia closed source drivers of different versions on the premise of not uninstalling the installed video card driver in the system, can reduce the operation cost of a user, can avoid the error condition in the uninstalling and reinstallation processes, and brings convenience to the operation of the user.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a flowchart illustrating steps of an embodiment of a graphics card driver switching method according to the present disclosure;
fig. 2 is a schematic view of a display card drive switching process in a scenario of replacing an Nvidia display card according to the present application;
fig. 3 is a schematic overall flow chart of a video card driving switching method according to the present application;
fig. 4 is a schematic diagram of data interaction in a video card driver switching method according to the present application;
fig. 5 is a block diagram of a display card driving switching device according to an embodiment of the present disclosure;
FIG. 6 is a block diagram of an apparatus 800 for graphics card driver switching according to the present application;
fig. 7 is a schematic diagram of a server in some embodiments of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. Furthermore, the term "and/or" as used in the specification and claims to describe an associative relationship of associated objects means that there may be three relationships, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. In the embodiments of the present application, the term "plurality" means two or more, and other terms are similar thereto.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a graphics card driver switching method according to the present application is shown, where the method is applicable to a computer device, where the computer device is pre-installed with a preset graphics card driver library, where the preset graphics card driver library includes a first graphics card driver library, the first graphics card driver library includes at least one kind of Nvidia closed-source driver installed in advance, and the Nvidia closed-source driver is obtained by installing a compatible installation package made in advance, and the method may include the following steps:
step 101, receiving a reconfiguration drive request, wherein the reconfiguration drive request is used for requesting to replace a default display card drive of the computer equipment, and the default display card drive is a currently effective display card drive;
102, responding to the reconfiguration drive request, displaying a preset interface, wherein a version number of a selectable Nvidia closed-source drive is displayed in the preset interface, and the selectable Nvidia closed-source drive is a Nvidia closed-source drive which exists in the first video card drive library and is matched with a current video card in the computer equipment;
and 103, setting the default display card driver according to the selection result aiming at the preset interface.
The computer device may include, but is not limited to, any of the following: the mobile phone comprises a server, a smart phone, a recording pen, a tablet computer, an electronic book reader, an MP3 (dynamic image Experts compress standard Audio Layer 3, moving image Experts Group Audio Layer III) player, an MP4 (dynamic image Experts compress standard Audio Layer 4, moving image Experts Group Audio Layer IV) player, a laptop, a vehicle-mounted computer, a desktop computer, a set-top box, an intelligent television, a wearable device and the like.
The computer device in the embodiment of the present application is installed with a Linux Operating System, and the type of the Linux Operating System in the embodiment of the present application is not limited in this embodiment, for example, the Linux Operating System may include any one of, but is not limited to, debian, ubuntu (wu Ban Tu), centros (Community Enterprise Operating System), UOS (System trusted desktop Operating System), kylin Operating System, and german Operating System.
In order to support that dynamic switching between Nvidia closed source drivers of different versions can be realized without uninstalling installed video card drivers in a system, in the embodiment of the present application, a first video card driver library is installed in a computer device in advance, where the first video card driver library includes at least one Nvidia closed source driver installed in advance.
Each Nvidia closed source driver in the first video card driver library may be pre-installed in a preset directory of the computer device, where the preset directory may be any specified directory. The installation files of the Nvidia closed-source drivers in the first video card driver library are preprocessed and converted into compatible installation packages of the Nvidia closed-source drivers, and the Nvidia closed-source drivers can be compatibly installed in the same system by installing the compatible installation packages of the Nvidia closed-source drivers, so that the first video card driver library can be constructed. Each Nvidia closed source driver in the first video card driver library is not valid although it is pre-installed in the computer device. In this embodiment, the default display card driver of the computer device refers to a currently active display card driver. It can be understood that, by the display card drive switching method of the present application, a default display card drive of the computer device may be set as a certain Nvidia closed source drive in the first display card drive library.
The video card drive switching method provided by the application can be used for switching the default video card drive into a certain Nvidia closed-source drive in the first video card drive library through user triggering under the next two scenes.
Scene one
The first scenario is used for setting default display card drive for the replaced display card after the computer device replaces the Nvidia display card. In practical application, a user may need to replace the Nvidia display cards of different models, and then the computer device is powered off, then the Nvidia display card of the required model is replaced, and then the computer device is powered on to start up. After the system is started, the Linux system sets default display card drive through automatic adaptation. If the user is not satisfied with the default video card driver automatically set by the system, a driver reconfiguration operation can be performed, and the driver reconfiguration operation can trigger a driver reconfiguration request. And after receiving the reconfiguration drive request, the computer equipment responds to the reconfiguration drive request and displays a preset interface. The preset Interface may be a human-computer Interface (hmi) including a UI (User Interface), and the hmi may display one or more version numbers of the optional Nvidia closed-source driver. The selectable Nvidia closed source driver is an Nvidia closed source driver which exists in the first video card driver library and is adapted to the current video card in the computer device. And according to the selection result of the user aiming at the preset interface, a default display card drive can be set. For example, a certain Nvidia closed source driver selected by the user from the preset interface may be set as the default graphics card driver.
Scene two
And the second scene is used for replacing the default display card driver for the current Nvidia display card under the condition that the display card is not replaced by the computer equipment. In practical applications, a user may want to replace only another version of Nvidia closed-source driver without replacing a current Nvidia graphics card, and may perform a reconfiguration driver operation, where the reconfiguration driver operation may trigger a reconfiguration driver request. And after receiving the reconfiguration drive request, the computer equipment responds to the reconfiguration drive request and displays a preset interface. The preset interface may display one or more version numbers of the optional Nvidia closed source driver. And according to the selection result of the user aiming at the preset interface, a default display card drive can be set.
The embodiment of the present application does not limit the form of the reconfiguration driving operation. Illustratively, the reconfiguration driving operation may be clicking a certain preset button or performing a certain preset gesture operation, and the like.
By the embodiment of the application, a user can select the required Nvidia closed-source drive in a manual configuration mode, and accordingly dynamic switching between different versions of Nvidia closed-source drives is achieved.
In an optional embodiment of the present application, before the presenting the preset interface in step 102, the method may further include:
s11, detecting the type of a current display card in the computer equipment;
step S12, if the type of the current display card is an Nvidia display card, obtaining a drive version list adapted to the current display card by searching a preset drive information entry table, wherein the drive information entry table records the version numbers of drives adapted to different Nvidia display cards, and the drive version list adapted to the current display card comprises the version numbers of all Nvidia closed-source drives adapted to the current display card, which are searched in the drive information entry table;
step S13, determining that the Nvidia closed source driver existing in the first video card driver library is the optional Nvidia closed source driver in the driver version list adapted to the current video card.
It should be noted that, the current display card described in the embodiment of the present application refers to a currently active display card in the computer device. In particular implementations, multiple graphics cards (including integrated graphics cards and/or stand-alone graphics cards) may be included in a computer device, in which case the currently active graphics card may be determined from the multiple graphics cards. In an optional embodiment of the present application, the method may further comprise:
and if the computer equipment is detected to comprise a plurality of display cards, determining that the external display screen in the plurality of display cards is the current display card in the computer equipment.
For example, suppose that a PCI (Peripheral Component Interconnect) card 1 is inserted into a PCI slot 1 of a computer device and a PCI card 2 is inserted into a PCI slot 2 of the computer device, and the computer device further includes a certain integrated card, that is, if 3 cards are included in the computer device, which card is externally connected to a display screen is further determined, and the card externally connected to the display screen is used as a current card in the computer device.
Taking a VGA (Video Graphics Array ) display screen as an example, it can be determined in this example which display card of the 3 display cards has the VGA display screen externally connected, and the display card externally connected with the VGA display screen is taken as the current display card in the computer device. Of course, the embodiment of the present application does not limit the type of the external display screen, and may further include an HDMI (High Definition Multimedia Interface) display screen, for example.
The current graphics card in the computer device may also be referred to as a start graphics card, that is, a graphics card driver of the start graphics card is automatically started when the computer device is started.
In step S11, the type of the current graphics card in the computer device is detected, and specifically, the type of the current graphics card may be detected through the number information of the current graphics card.
Illustratively, the computer Device may read the number information of the current graphics card in the PCI slot after receiving the reconfiguration drive request, and the number information may include VID (Vendor Identification) and/or DID (Device Identification).
The method includes the steps that whether the type of a current display card is an Nvidia display card or not can be determined according to VID, if the type of the current display card is determined to be the Nvidia display card, a driving version list matched with the current display card can be obtained by searching a preset driving information entry table, version numbers of drivers matched with different Nvidia display cards are recorded in the driving information entry table, and the driving version list matched with the current display card comprises the version numbers of all Nvidia closed-source drivers matched with the current display card, which are searched in the driving information entry table.
In a specific implementation, a driving information entry table (also referred to as a VID/DID entry table) may be stored in the computer device, and the driving information entry table may record a version number of an Nvidia closed-source driver adapted to Nvidia display cards of all currently released models and number information of the Nvidia display cards of all currently released models. Therefore, the drive information entry table can be searched through the number information of the current display card, so that the version numbers of all the Nvidia closed-source drives matched with the number information of the current display card are obtained, and a drive version list matched with the current display card is also obtained.
If the acquired drive version list adapted to the current display card is not empty, it may be further determined in the drive version list that the installed Nvidia closed source driver in the computer device is an optional Nvidia closed source driver. Specifically, if the acquired driver version list adapted to the current graphics card is not empty, a first graphics card driver library may be searched based on the driver version list, and it is determined in the driver version list that the Nvidia closed-source driver existing in the first graphics card driver library is the optional Nvidia closed-source driver, and then the determined version number of the optional Nvidia closed-source driver may be displayed in the preset interface as an optional item for the user to select.
In an optional embodiment of the present application, the setting the default display card driver according to the selection result for the preset interface may include:
if the selection result comprises a version number of one Nvidia closed-source driver displayed in the preset interface, setting the Nvidia closed-source driver corresponding to the selected version number as a default display card driver; or if the selection result is null, keeping the current default display card drive unchanged.
After the preset interface is presented to the user, the user may select the version number of a certain Nvidia closed source driver or not (the selection result is null).
And under the condition that a user selects a version number of a certain Nvidia closed-source driver, setting the Nvidia closed-source driver corresponding to the version number selected by the user as a default display card driver. In case the user does not make a selection (the selection result is null), the current default graphics card driver may be kept unchanged. Further, when it is determined that the optional Nvidia closed source driver does not exist in the first graphics card driver library, a default graphics card driver may be set as an Nvidia open source driver, and the Nvidia open source driver may be a Nouveau open source driver.
Further, if the obtained drive version list adapted to the current video card is empty, or although the obtained drive version list adapted to the current video card is not empty, the Nvidia closed source drive in the drive version list does not exist in the first video card drive library. In either case, it may be considered that there is no optional Nvidia closed-source driver, and the version number of the optional Nvidia closed-source driver in the preset interface may be null, or only an "automatic selection" option is displayed in the preset interface. At this time, a default graphics card driver may be set to the Nvidia open source driver.
In an optional embodiment of the present application, the method may further comprise:
s21, when the display card of the computer equipment is detected to be replaced, detecting the type of the replaced display card;
step S22, if the type of the replaced display card is detected to be an Nvidia display card, obtaining a driving version list adapted to the replaced display card by searching a preset driving information entry table, wherein the driving information entry table records the version numbers of the drivers adapted to different Nvidia display cards, and the driving version list adapted to the replaced display card comprises the version numbers of all the Nvidia closed-source drivers adapted to the replaced display card, which are searched in the driving information entry table;
step S23, determining the Nvidia closed source driver existing in the first video card driver library in the driver version list adapted to the replaced video card, and setting the version number of the Nvidia closed source driver as a default video card driver.
In practical applications, a user may need to replace a graphics card of a computer device, and the replaced graphics card may be an Nvidia graphics card or a non-Nvidia graphics card. It should be noted that the replaced Nvidia display card may be an Nvidia display card of different models, and the replaced non-Nvidia display card may include, but is not limited to, any one of the following: AMD/ATI display cards, various domestic PCI display cards, intel/Zxe and other domestic and foreign onboard display cards.
In a specific implementation, whether the display card of the computer device is replaced can be judged by detecting the number information of the current display card in the PCI slot. For example, after the computer device is started, the number information of the current graphics card in the PCI slot may be automatically read, and if it is detected that the read number information changes from the previous record, it may be determined that the graphics card of the computer device is replaced, that is, the graphics card in the PCI slot is the replaced graphics card, and at this time, the type of the replaced graphics card may be determined according to the read number information.
If the type of the replaced display card is detected to be the Nvidia display card, a driving version list adapted to the replaced display card can be obtained by searching a preset driving information entry table. The drive information entry table records version numbers of drives adapted to different Nvidia display cards, and the drive version list adapted to the replaced display card comprises the version numbers of all Nvidia closed-source drives adapted to the replaced display card, which are searched in the drive information entry table.
If the obtained driver version list adapted to the replaced display card is not empty, a first display card driver library can be searched based on the driver version list, and the Nvidia closed source driver existing in the first display card driver library is determined in the driver version list. If the number of the Nvidia closed source drivers existing in the first video card driver library determined in the driver version list is greater than 1, the video card driver with the largest version number may be set as the default video card driver.
Therefore, after the display card of the computer equipment is replaced, when the replaced display card is detected to be the Nvidia display card, the Nvidia closed-source drive matched with the replaced display card can be automatically switched in an automatic adapting mode.
After the default display card driver is automatically set, if the user is not satisfied with the default display card driver automatically configured by the system, the reconfiguration drive request can be triggered by executing the reconfiguration drive operation. After receiving the reconfiguration drive request, the computer device responds to the reconfiguration drive request to display a preset interface, wherein the preset interface displays a version number of an optional Nvidia closed-source drive, so that a user can reselect a default display card drive in a manual configuration mode.
Therefore, the embodiment of the application can realize the dynamic switching between the drivers of different versions of the Nvidia display card. In addition, in order to further implement dynamic switching between drivers of different non-Nvidia graphics cards, the preset graphics card driver library according to the embodiment of the present application may further include a second graphics card driver library, where the second graphics card driver library includes at least one non-Nvidia graphics card driver that is installed in advance.
In an optional embodiment of the present application, after the detecting the type of the replaced graphics card in step S21, the method may further include:
step S31, if the type of the replaced display card is detected to be a non-Nvidia display card, judging whether a default display card drive of the computer equipment is matched with the replaced display card;
step S32, if the default display card driver of the computer equipment is not matched with the replaced display card, searching a non-Nvidia display card driver matched with the replaced display card in the second display card driver library;
and S33, setting the searched non-Nvidia display card driver matched with the replaced display card as a default display card driver.
In the embodiment of the application, when the computer device detects that the display card is replaced, the type of the replaced display card is detected, if the type of the replaced display card is detected to be a non-Nvidia display card, whether the current default display card drive of the computer device is matched with the replaced display card or not is further judged, and if the type of the replaced display card is detected to be the non-Nvidia display card, the current default display card drive is kept unchanged; if the current default display card driver is not matched with the replaced display card, searching a non-Nvidia display card driver matched with the replaced display card in a second display card driver library, and setting the searched non-Nvidia display card driver matched with the replaced display card as the default display card driver. Therefore, after the display card of the computer equipment is replaced, when the replaced display card is detected to be a non-Nvidia display card, the non-Nvidia closed source drive matched with the replaced display card can be automatically switched in an automatic adapting mode.
Further, if it is detected that the type of the replaced graphics card is a non-Nvidia graphics card, and it is detected that the default graphics card driver of the computer device is not adapted to the replaced graphics card, and the non-Nvidia graphics card driver adapted to the replaced graphics card is not found in the second graphics card driver library, the default graphics card driver may be set as an open source driver of the non-Nvidia graphics card that is provided by the system kernel itself, such as a vesa driver.
For example, whether the default video card driver of the computer device is matched with the replaced video card may be determined by the serial number information of the video card, for example, whether the VID of the default video card driver of the computer device is matched with the VID of the replaced video card.
In this embodiment of the application, the default display card driver setting mode may include the following two modes: the method I is an automatic configuration method executed after the system detects that the display card is replaced after the system is started. And the manual configuration mode is executed through man-machine interaction after the user triggers the reconfiguration drive request. The two switching modes can realize the switching between different drivers of different display cards or the switching between drivers of different versions of the same display card.
Referring to fig. 2, a schematic diagram of a video card drive switching flow in a scenario of replacing an Nvidia video card in the present application is shown. As shown in fig. 2, in steps 2011, 2012, 2013, and 2014, when the computing device detects that the graphics card is replaced and determines that the type of the replaced graphics card is an Nvidia graphics card, a default graphics card driving procedure is set through automatic configuration of the system. Step 2011, step 2012, step 2013, step 2023, step 2024, step 2025, and step 2026 are steps of setting a default display card driving procedure through manual configuration of a user when the computing device detects that the display card is replaced and determines that the type of the replaced display card is the Nvidia display card. Step 2021, step 2022, step 2023, step 2024, step 2025, and step 2026 are to set up a default video card driver flow through manual configuration by the user when the video card of the computing device is not replaced.
It should be noted that, in fig. 2, after the graphics card is replaced, the step 2023 triggers the reconfiguration drive request before the system automatically configures the default graphics card drive in step 2014, and of course, in a specific implementation, the step 2023 triggers the reconfiguration drive request may also be after the system automatically configures the default graphics card drive in step 2014, which is not limited in this embodiment.
In an optional embodiment of the present application, the setting, in step 103, the default display card driver according to the selection result for the preset interface may include:
s41, determining target drive according to a selection result aiming at the preset interface;
step S42, if the target driver is an Nvidia closed source driver in the first video card driver library, querying configuration data of the target driver under an installation path of the target driver, wherein the configuration data comprises a driver file name of the target driver and a library file path of the target driver;
and S43, updating the configuration file of the default display card drive according to the configuration data of the target drive.
In an embodiment of the present application, the target driver may include one of: the method comprises the following steps of selecting an Nvidia closed source driver from a preset interface by a user, automatically selecting an Nvidia closed source driver by a system, automatically selecting a non-Nvidia display card driver by the system, and automatically selecting an Nvidia open source driver by the system.
And if the target driver is the Nvidia closed source driver in the first video card driver library, inquiring configuration data of the target driver under the installation path of the target driver. When the target driver is the Nvidia closed source driver in the first video card driver library, the target driver is installed by using a compatible installation package of the Nvidia closed source driver, the Nvidia closed source driver can be installed in a preset directory of the computer device by using the compatible installation package, and the Nvidia closed source driver is not valid when not set as the default video card driver. The installation path of the target driver refers to an installation path after installing a compatible installation package of the Nvidia closed source driver in the computer equipment.
The configuration data of the target driver includes a drive file name of the target driver and a library file path of the target driver. The target drive file refers to a target drive ko file, and the drive file name of the target drive is the file name of the target drive ko file. The ko file is a module file, the ko file is also a dynamic connection file used by a Linux operating system kernel, and a kernel module is loaded when the system is started. The target-driven Library file includes an OpenGL (Open Graphics Library) file and a binary bin file that are dependent on the target drive, and the path of the target-driven Library file includes a path of the OpenGL Library file and a path of the binary bin file that are dependent on the target drive. In a specific implementation, the object-driven library file may further include dynamic library files such as OpenCL (Open Computing Language) and EGL, where the EGL is a part of OpenGL and is a middle layer between an OpenGL interface and a graphics backend. In the embodiment of the present application, two library files, openGL and binary bin, are mainly used as an example for description.
After the computer equipment is started, the Linux system kernel can find the driver file of the default display card driver needing to be loaded by reading the configuration file and establish a link between the driver file and the library file depended on the driver file, so that the default display card driver takes effect.
According to the embodiment of the application, when the default display card drive needs to be switched, the previous configuration data in the configuration file is cleared, and the configuration data is updated to the configuration data of the target drive, so that the default display card drive can be switched to the target drive.
After the configuration file of the default display card driver is updated, when the computer equipment is started next time, the Linux system kernel can directly read the updated configuration file as a preferred driver item of a user to guide and start the switched display card driver.
In an optional embodiment of the present application, before receiving the reconfiguration drive request, the method may further include:
s51, acquiring an installation file of the Nvidia closed source driver to be installed;
step S52, converting the installation file of the Nvidia closed source drive into a compatible installation package;
and S53, installing at least one Nvidia closed source drive compatible installation package in the computer equipment to obtain the first display card drive library.
In practical application, the installation of a plurality of Nvidia closed-source drivers conflicts, and only one Nvidia closed-source driver can be installed in the same system. Therefore, when replacing the Nvidia shutdown driver, it is necessary to uninstall the installed Nvidia shutdown driver and then install a new Nvidia shutdown driver. In order to support the dynamic switching of the installed Nvidia closed source driver without uninstalling the installed Nvidia closed source driver, in the embodiment of the present application, an installation file of the existing Nvidia closed source driver is converted to obtain a compatible installation package of the Nvidia closed source driver, so that a plurality of Nvidia closed source drivers can be compatibly installed in the same system, and thus, a first video card driver library can be constructed.
In an optional embodiment of the present application, the converting the installation file of the Nvidia closed-source driver into the compatible installation package in step S52 may include:
s61, mounting a working path through a combined mounting file system, and copying an installation file driven by the Nvidia closed source to the working path;
step S62, operating the installation file of the Nvidia closed source drive under the root user environment small system of the working path;
s63, searching all files generated by operating the installation files of the Nvidia closed source driver in the directory of the working path to obtain a file set to be packaged;
step S64, modifying source codes in the file set to enable different drive file names of the Nvidia closed source drives to be different, and modifying library file paths of the Nvidia closed source drives in the file set to enable different library file paths of the Nvidia closed source drives to be different;
and S65, arranging the modified file set into an installation package.
In a specific implementation, the installation file of the Nvidia closed source driver is usually a run format file.
For an installation file of a certain Nvidia closed source driver to be converted, in the embodiment of the present application, a working path is mounted through overlay (a combined mount file system), and the installation file of the Nvidia closed source driver is copied to the working path. And then running the installation file of the Nvidia closed source drive under the root user environment small system of the working path, wherein the root user environment small system in the Linux system is a pure system environment which runs independently, and the root user environment small system can be switched in through a chroma command. According to the embodiment of the application, the installation file of the Nvidia closed source drive is operated in the root user environment small system, and the original large environment of the Linux system cannot be influenced.
After the installation file of the Nvidia closed source drive is operated under the root user environment small system of the working path, all files generated by operating the installation file of the Nvidia closed source drive are searched under the directory of the working path, and a file set to be packaged is obtained.
In the prior art, when an Nvidia closed-source driver is installed, the names of drive files after installing different versions of the Nvidia closed-source driver are the same, and the paths of library files after installing different versions of the Nvidia closed-source driver are the same, thereby causing installation conflicts of different Nvidia closed-source drivers. In order to solve the problem, different Nvidia closed-source drivers can be installed compatibly, in the embodiment of the present application, a source code in the file set is modified, so that names of drive files after different Nvidia closed-source drivers are installed are different, and an installation structure of a library file path of the Nvidia closed-source driver in the file set is modified, so that the library file paths after different Nvidia closed-source drivers are installed are different. The drive file name refers to a ko file name of the Nvidia closed-source drive, and the library file path comprises a path of an OpenGL library file on which the Nvidia closed-source drive depends and a path of a binary bin file.
And finally, sorting the modified file set into an installation package, for example, packaging the installation package into a deb package, so as to obtain the compatible installation package of the Nvidia closed-source drive. For the acquired installation file of each Nvidia closed-source driver, the installation file of each Nvidia closed-source driver can be converted into a compatible installation package by executing the above-described steps S61 to S65.
After the acquired installation file (. Run file) of each Nvidia closed source driver is converted into the compatible installation package of each Nvidia closed source driver, the compatible installation package of each Nvidia closed source driver is operated in the computer equipment, so that a plurality of Nvidia closed source drivers can be compatibly installed in the same system, and thus, a first video card driver library can be constructed and obtained.
It should be noted that, in the embodiment of the present application, a manner of modifying the drive file name and the library file path is not limited. For example, the modified library file path may adopt a uniformly designated root directory under which all library files driven by different versions are covered, and the library files driven by different versions under the root directory have independent directories.
In one example, it is assumed that for an Nvidia closed source driver 300, the installation file for acquiring the Nvidia closed source driver is 300.Run; and for the Nvidia closed source driver 400, acquiring that the installation file of the Nvidia closed source driver is 400.Run. Since the drive file names after 300.Run and 400.Run installation are the same (e.g., xx. Ko), the library file paths after installation are also the same (e.g., xx/GL/and xx/bin), resulting in 300.Run and 400.Run installation conflicts. Therefore, for 300.run, the embodiment of the present application runs 300.run under the root ue minor system of the working path, and obtains a file set of all files generated by running 300.run; modifying the source code in the file set to modify the ko file name to xx _300.Ko, modifying the OpenGL library file path to xx/GL/nv/300/, modifying the binary bin file path to xx/bin/nv/300/, and finally arranging the modified file set into a mounting package, such as 300.Deb. Similarly, for 400.Run, the embodiment of the present application runs 400.Run under the root ue mini-system of the working path, and obtains a file set of all files generated by running 400. Run; modifying the source code in the file set to modify the ko file name to xx _400.Ko, modifying the OpenGL library file path to xx/GL/nv/400/, modifying the binary bin file path to xx/bin/nv/400/, and finally arranging the modified file set into a mounting package, such as 400.Deb.
Thus, the Nvidia closed source driver 300 and the Nvidia closed source driver 400 can be compatibly installed in the same system by running 300.deb and 400.deb. After 300.deb and 400.deb are run in the system of the computer device, the first video card driver library includes the Nvidia closed source driver 300 and the Nvidia closed source driver 400.
Illustratively, after 300.deb is run, the library file path of the OpenGL library with the drive file names xx _300.Ko, xx _300.Ko dependent on the drive file names xx _300.Ko, and xx _300.Ko dependent on the binary bin file is xx/GL/nv/300/. Assuming that the computer device receives the reconfiguration drive request, reads the number information of the graphics card in the PCI slot, and determines that the graphics card is an Nvidia graphics card according to the number information, a drive version list adapted to the graphics card is obtained by searching the drive information entry table, and assuming that both the Nvidia closed-source drive 300 and the Nvidia closed-source drive 400 are adapted to the graphics card, the obtained drive version list includes the version number of the Nvidia closed-source drive 300 and the version number of the Nvidia closed-source drive 400, so that the displayed preset interface may display the version number of the Nvidia closed-source drive 300 and the version number of the Nvidia closed-source drive 400. Assuming that a version number of the Nvidia closed source driver 300 selected by the user is received, the configuration data in the configuration file may be updated to the configuration data of the Nvidia closed source driver 300. The configuration data of the Nvidia closed-source driver 300 includes the driver file name of the Nvidia closed-source driver 300 is xx _300.Ko, the library file path of the open GL library which is xx _300.Ko dependent is xx/GL/nv/300/, the library file path of the binary bin file which is xx _300.Ko dependent is xx/bin/nv/300/, and so on. The next time the computer device is started, the Nvidia closed source driver 300 can be automatically loaded according to the updated configuration file, thereby realizing switching the default graphics card driver to the Nvidia closed source driver 300.
It is understood that the Nvidia closed source driver, the driver file name, and the library file path in the above example are only exemplary illustrations.
According to the embodiment of the application, the installation files of different Nvidia closed-source drivers are converted into the compatible installation package, so that a plurality of Nvidia closed-source drivers can be compatibly installed in the same system, and dynamic switching between the Nvidia closed-source drivers of different versions can be achieved. In addition, the installation file (such as a run file) of the Nvidia closed source driver is packaged into a single installation package (such as a deb package) in the embodiment of the application, so that the installation and uninstallation operations of a user are facilitated.
In an optional embodiment, the graphics card driver switching method provided in the embodiment of the present application is mainly managed by two programs, which illustratively include an automatic adaptation program and a graphics card dynamic management program.
Referring to fig. 3, a schematic overall flow chart of a graphics card drive switching method according to an embodiment of the present application is shown. As shown in fig. 3, when the computer device detects that the graphics card is replaced, the auto-adapter program is started, and the auto-adapter program detects the type of the replaced graphics card. If the automatic adaptation program detects that the type of the replaced display card is the Nvidia display card, searching the Nvidia closed source driver adapted to the replaced display card in a driving information entry table to obtain a driving version list; and if the acquired drive version list is not empty, inquiring the first display card drive library based on the drive version list, determining the installed Nvidia closed source drive in the drive version list, and if the number of the installed Nvidia closed source drives in the drive version list is greater than 1, setting the Nvidia closed source drive with the maximum version number as a default display card drive. If the automatic adaptation program detects that the type of the replaced display card is a non-Nvidia display card, the automatic adaptation program does not process the display card, and the display card is directly sent to the display card dynamic management program to take over processing.
And starting a dynamic display card management program after the automatic adaptation program detects that the type of the replaced display card is a non-Nvidia display card. The dynamic management program of the display card detects the number information of the replaced display card and judges whether the current default display card drive is matched with the number information of the replaced display card, if so, the current default display card drive is kept unchanged; if the current default display card driver is not matched with the serial number information of the replaced display card, searching a non-Nvidia display card driver matched with the serial number information of the replaced display card in a second display card driver library, and setting the non-Nvidia display card driver matched with the serial number information of the replaced display card as the default display card driver.
After the default display card driver is set, if the user is not satisfied with the default display card driver automatically configured by the system, a reconfiguration drive request can be triggered by executing reconfiguration drive operation. And after receiving the reconfiguration drive request, the computer equipment starts an automatic adaptation program, and at the moment, the automatic adaptation program queries a drive information entry table to obtain a drive version list, also queries the first video card drive library based on the drive version list, determines the installed Nvidia closed-source drive in the drive version list, and obtains the version number of the Nvidia closed-source drive which can be selected by a user in a preset interface. And the automatic adaptation program responds to the reconfiguration drive request and displays a preset interface, wherein the preset interface displays the version number of the optional Nvidia closed-source drive. And after the user selects and confirms from the preset interface, the preset interface returns the selection result of the user to the automatic adaptation program, and the automatic adaptation program sets default display card drive according to the selection result of the user. Specifically, the automatic adaptation program determines the target driver according to the selection result of the user, and updates the configuration data in the configuration file to the configuration data of the target driver. At this time, the automatic adapter program finishes its own task, and then is transferred to the display card dynamic management program for processing, and the display card dynamic management program realizes the loading of the target driver, thereby finishing the switching process of the target driver.
In the embodiment of the application, for the target driver to be switched, the automatic adaptation program can be used for updating the configuration file according to the configuration data of the target driver, the dynamic management program of the display card can be used for taking the configuration file into effect, and the corresponding target driver is loaded according to the configuration file.
Further, the dynamic display card management program may include the following two parts: a display drive switching program and a display drive selector. The display driver switching program and the display driver selector are in associated interaction, the display driver switching program is used for reading the number information of the display card in the PCI slot, the display driver selector can be regarded as a selection switch and used for selecting from all installed display card drivers in the computer equipment, and the display card driver currently selected by the display driver selector is the default display card driver. All installed graphics drivers in the computer device may include a graphics driver in the first graphics driver library, a graphics driver in the second graphics driver library, and an Nvidia open source driver.
After the display drive switching program reads the number information of the display card in the PCI slot, the number information read by the display drive switching program is compared with the display card drive selected by the display drive selector, if the number information read by the display drive switching program is matched with the display card drive, the current selection of the display drive selector is kept unchanged, and otherwise, the selection of the display drive selector is switched to the display card drive matched with the number information of the display card in the PCI slot.
Referring to fig. 4, a schematic diagram of data interaction in a video card driver switching method according to an embodiment of the present application is shown. Fig. 4 shows a data interaction process between the automatic adapter and the dynamic display card management program in the flow of the display card driver switching method of the present application. In the embodiment of the present application, the auto-adapter may be responsible for switching between multiple versions of drivers of the Nvidia display card, and the dynamic display card management program may be responsible for switching between display card drivers of various different manufacturers. The display card drivers of various manufacturers comprise Nvidia display card drivers and non-Nvidia display card drivers. Further, the automatic adaptation program and the display card dynamic management program are background running programs. In addition, the display card dynamic management program is further configured to detect whether the computer device includes a plurality of display cards, and determine which display card driver of the display card should be started when it is determined that the computer device includes the plurality of display cards.
The interaction process between the modules in fig. 4 has been described in detail in the foregoing embodiments, and is not described herein again, and thus, reference may be made to each other.
To sum up, this application embodiment installs preset display card driver library in advance in computer equipment, preset display card driver library includes first display card driver library, including at least one kind of Nvidia closed source drive of preinstallation in the first display card driver library, nvidia closed source drive obtains through the installation of the compatible installation package of preparation in advance. Therefore, when a reconfiguration drive request is received, a preset interface can be displayed in response to the reconfiguration drive request, and the version number of the optional Nvidia closed-source drive is displayed in the preset interface; the selectable Nvidia closed source driver is an Nvidia closed source driver which exists in the first video card driver library and is matched with a current video card in the computer device; and finally, setting the default display card drive according to the selection result aiming at the preset interface. Therefore, the embodiment of the application can support the dynamic switching between the Nvidia closed source drivers of different versions on the premise of not uninstalling the installed video card driver in the system, can reduce the operation cost of a user, can avoid the error condition in the uninstalling and reinstallation processes, and brings convenience to the operation of the user.
It should be noted that for simplicity of description, the method embodiments are described as a series of acts, but those skilled in the art should understand that the embodiments are not limited by the described order of acts, as some steps can be performed in other orders or simultaneously according to the embodiments. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the embodiments of the application.
Referring to fig. 5, a block diagram of a structure of an embodiment of a display card drive switching apparatus according to the embodiment of the present application is shown, and is applied to a computer device, where the computer device is preinstalled with a preset display card drive library, the preset display card drive library includes a first display card drive library, the first display card drive library includes at least one preinstalled Nvidia closed-source drive, and the Nvidia closed-source drive is obtained by installing a prefabricated compatible installation package, and the apparatus may include:
a request receiving module 501, configured to receive a reconfiguration drive request, where the reconfiguration drive request is used to request to replace a default display card drive of the computer device, and the default display card drive is a currently-valid display card drive;
an interface display module 502, configured to respond to the reconfiguration drive request, to display a preset interface, where a version number of an optional Nvidia closed-source driver is displayed in the preset interface, and the optional Nvidia closed-source driver is an Nvidia closed-source driver that exists in the first video card driver library and is adapted to a current video card in the computer device;
and a driver setting module 503, configured to set the default display card driver according to a selection result for the preset interface.
Optionally, the apparatus further comprises:
the first type detection module is used for detecting the type of the current display card in the computer equipment;
a first list obtaining module, configured to obtain, if the type of a current display card is an Nvidia display card, a driving version list adapted to the current display card by searching a preset driving information entry table, where the driving information entry table records version numbers of drivers adapted to different Nvidia display cards, and the driving version list adapted to the current display card includes version numbers of all Nvidia closed-source drivers adapted to the current display card, which are searched in the driving information entry table;
an optional driver determining module, configured to determine, in the driver version list adapted to the current graphics card, that the Nvidia closed-source driver existing in the first graphics card driver library is an optional Nvidia closed-source driver.
Optionally, the driver setting module is specifically configured to set, if the selection result includes a version number of one Nvidia closed-source driver displayed in the preset interface, the Nvidia closed-source driver corresponding to the selected version number as a default display card driver; or if the selection result is null, keeping the current default display card drive unchanged.
Optionally, the drive setting module includes:
the target determination submodule is used for determining target drive according to a selection result aiming at the preset interface;
a data determination sub-module, configured to query configuration data of the target driver under an installation path of the target driver if the target driver is an Nvidia closed source driver in the first graphics card driver library, where the configuration data includes a driver file name of the target driver and a library file path of the target driver;
and the configuration updating submodule is used for updating the configuration file of the default display card drive according to the configuration data of the target drive.
Optionally, the apparatus further comprises:
the installation file acquisition module is used for acquiring an installation file of the Nvidia closed source driver to be installed;
the installation file conversion module is used for converting the installation file of the Nvidia closed-source drive into a compatible installation package;
and the installation package operation module is used for installing at least one Nvidia closed-source drive compatible installation package in the computer equipment to obtain the first video card drive library.
Optionally, the installation file conversion module includes:
the path mounting submodule is used for mounting a working path through a combined mounting file system and copying the installation file driven by the Nvidia closed source to the working path;
the file operation submodule is used for operating the installation file of the Nvidia closed source drive under the small system of the root user environment of the working path;
the set acquisition submodule is used for searching all files generated by operating the installation files of the Nvidia closed source drive under the directory of the working path to obtain a file set to be packaged;
the conflict modification submodule is used for modifying the source codes in the file set to enable different drive file names of the Nvidia closed source drives to be different, and modifying library file paths of the Nvidia closed source drives in the file set to enable different library file paths of the Nvidia closed source drives to be different;
and the file packaging submodule is used for arranging the modified file set into an installation package.
Optionally, the apparatus further comprises:
the second type detection module is used for detecting the type of the replaced display card when the display card of the computer equipment is detected to be replaced;
a second list obtaining module, configured to obtain, if it is detected that the type of the replaced graphics card is an Nvidia graphics card, a driver version list adapted to the replaced graphics card by searching a preset driver information entry table, where the driver information entry table records version numbers of drivers adapted to different Nvidia graphics cards, and the driver version list adapted to the replaced graphics card includes version numbers of all Nvidia closed-source drivers adapted to the replaced graphics card, which are found in the driver information entry table;
and the configuration submodule is used for determining the Nvidia closed source driver existing in the first video card driver library in the driver version list adapted to the replaced video card, and setting the maximum version number of the Nvidia closed source driver as a default video card driver.
Optionally, the preset graphics card driver library further includes a second graphics card driver library, where the second graphics card driver library includes at least one non-Nvidia graphics card driver installed in advance, and the apparatus further includes:
the adaptation judging module is used for judging whether a default display card driver of the computer equipment is adapted to the replaced display card or not if the type of the replaced display card is detected to be a non-Nvidia display card;
the drive searching module is used for searching a non-Nvidia display card drive matched with the replaced display card in the second display card drive library if the default display card drive of the computer equipment is not matched with the replaced display card;
and the automatic setting module is used for setting the searched non-Nvidia display card driver matched with the replaced display card as a default display card driver.
The method and the device for driving the display card in the computer equipment have the advantages that the preset display card drive library is pre-installed in the computer equipment and comprises a first display card drive library, the first display card drive library comprises at least one pre-installed closed source Nvidia drive, and the closed source Nvidia drive is obtained through installation of a pre-manufactured compatible installation package. Therefore, when a reconfiguration drive request is received, a preset interface can be displayed in response to the reconfiguration drive request, and the version number of the optional Nvidia closed-source drive is displayed in the preset interface; the selectable Nvidia closed source driver is an Nvidia closed source driver which exists in the first video card driver library and is matched with a current video card in the computer device; and finally, setting the default display card drive according to the selection result aiming at the preset interface. Therefore, the embodiment of the application can support the dynamic switching between the Nvidia closed source drivers of different versions on the premise of not uninstalling the installed video card driver in the system, can reduce the operation cost of a user, can avoid the error condition in the uninstalling and reinstallation processes, and brings convenience to the operation of the user.
For the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
The embodiment of the application provides a device for graphics card driver switching, which comprises a memory and more than one program, wherein the more than one program is stored in the memory and is configured to be executed by more than one processor, and the more than one program comprises instructions for carrying out the graphics card driver switching method in one or more embodiments.
Fig. 6 is a block diagram illustrating an apparatus 800 for graphics card driver switching according to an example embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, the apparatus 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 806 provide power to the various components of device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice information processing mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the apparatus 800, the sensor assembly 814 may also search for a change in the position of the apparatus 800 or a component of the apparatus 800, the presence or absence of user contact with the apparatus 800, orientation or acceleration/deceleration of the apparatus 800, and a change in the temperature of the apparatus 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The apparatus 800 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on radio frequency information processing (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Fig. 7 is a schematic diagram of a server in some embodiments of the present application. The server 1900, which may vary considerably in configuration or performance, may include one or more Central Processing Units (CPUs) 1922 (e.g., one or more processors) and memory 1932, one or more storage media 1930 (e.g., one or more mass storage devices) storing applications 1942 or data 1944. Memory 1932 and storage medium 1930 can be, among other things, transient or persistent storage. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a sequence of instructions operating on a server. Still further, a central processor 1922 may be provided in communication with the storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.
The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input-output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, etc.
A non-transitory computer readable storage medium in which instructions, when executed by a processor of an apparatus (server or terminal), enable the apparatus to perform the graphics card driver switching method shown in fig. 1.
A non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by a processor of a device (server or terminal), the device is enabled to perform the description of the video card driver switching method in the embodiment corresponding to fig. 1, and therefore, the description thereof will not be repeated herein. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the embodiments of the computer program product or the computer program referred to in the present application, reference is made to the description of the embodiments of the method of the present application.
Further, it should be noted that: embodiments of the present application also provide a computer program product or computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor can execute the computer instruction, so that the computer device executes the description of the video card driver switching method in the embodiment corresponding to fig. 1, which will not be described herein again. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the computer program product or computer program embodiments referred to in the present application, reference is made to the description of the method embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.
The foregoing describes in detail a graphics card driver switching method, a graphics card driver switching device, a device for graphics card driver switching, and a readable storage medium, where a specific example is applied to explain the principles and embodiments of the present application, and the description of the foregoing embodiments is only used to help understand the method and core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (9)

1. The utility model provides a display card drive switching method, its characterized in that is applied to computer equipment, preset display card driver storehouse is installed in advance to computer equipment, preset display card driver storehouse includes first display card driver storehouse, first display card driver storehouse includes at least one kind of Nvidia closed source drive of preinstallation, nvidia closed source drive obtains through the installation of compatible installation package of preparation in advance, the method includes:
receiving a reconfiguration drive request, wherein the reconfiguration drive request is used for requesting to replace a default display card drive of the computer equipment, and the default display card drive is a currently effective display card drive;
responding to the reconfiguration drive request, displaying a preset interface, wherein a version number of a selectable Nvidia closed-source drive is displayed in the preset interface, and the selectable Nvidia closed-source drive is an Nvidia closed-source drive which exists in the first video card drive library and is matched with a current video card in the computer equipment;
setting the default display card driver according to the selection result aiming at the preset interface;
before the receiving of the reconfiguration drive request, the method further comprises:
acquiring an installation file of an Nvidia closed source driver to be installed;
converting the installation file of the Nvidia closed source drive into a compatible installation package;
installing at least one Nvidia closed source drive compatible installation package in the computer equipment to obtain the first video card drive library;
wherein, the converting the installation file of the Nvidia closed source driver into a compatible installation package comprises:
mounting a working path through a combined mounting file system, and copying an installation file driven by the Nvidia closed source to the working path;
running the installation file of the Nvidia closed source drive under the root user environment small system of the working path;
searching all files generated by operating the installation files of the Nvidia closed source driver in the directory of the working path to obtain a file set to be packaged;
modifying source codes in the file set to enable different drive file names of the Nvidia closed source drives to be different, and modifying library file paths of the Nvidia closed source drives in the file set to enable different library file paths of the Nvidia closed source drives to be different;
and arranging the modified file set into an installation package.
2. The method of claim 1, wherein prior to presenting the preset interface, the method further comprises:
detecting the type of a current display card in the computer equipment;
if the type of the current display card is an Nvidia display card, obtaining a driving version list adapted to the current display card by searching a preset driving information input table, wherein the driving information input table records the version numbers of the drivers adapted to different Nvidia display cards, and the driving version list adapted to the current display card comprises the version numbers of all the Nvidia closed-source drivers adapted to the current display card, which are searched in the driving information input table;
and determining that the Nvidia closed source driver existing in the first video card driver library is the optional Nvidia closed source driver in the driver version list adapted to the current video card.
3. The method of claim 1, wherein the setting the default graphics card driver according to the selection result for the preset interface comprises:
if the selection result comprises a version number of one Nvidia closed-source driver displayed in the preset interface, setting the Nvidia closed-source driver corresponding to the selected version number as a default display card driver; or if the selection result is null, keeping the current default display card drive unchanged.
4. The method of claim 1, wherein the setting the default graphics card driver according to the selection result for the preset interface comprises:
determining target drive according to the selection result aiming at the preset interface;
if the target driver is an Nvidia closed source driver in the first video card driver library, querying configuration data of the target driver under an installation path of the target driver, wherein the configuration data comprises a driver file name of the target driver and a library file path of the target driver;
and updating the configuration file of the default display card drive according to the configuration data of the target drive.
5. The method of claim 1, further comprising:
when the display card of the computer equipment is detected to be replaced, detecting the type of the replaced display card;
if the type of the replaced display card is detected to be an Nvidia display card, obtaining a drive version list adapted to the replaced display card by searching a preset drive information entry table, wherein the drive information entry table records the version numbers of drives adapted to different Nvidia display cards, and the drive version list adapted to the replaced display card comprises the version numbers of all Nvidia closed-source drives adapted to the replaced display card, which are searched in the drive information entry table;
determining the Nvidia closed source driver existing in the first video card driver library in the driver version list adapted to the replaced video card, and setting the maximum version number as a default video card driver.
6. The method of claim 5, wherein the preset graphics driver library further comprises a second graphics driver library, the second graphics driver library comprises at least one non-Nvidia graphics driver installed in advance, and after the detecting the type of the replaced graphics card, the method further comprises:
if the type of the replaced display card is detected to be a non-Nvidia display card, judging whether a default display card drive of the computer equipment is matched with the replaced display card;
if the default display card driver of the computer device is not matched with the replaced display card, searching a non-Nvidia display card driver matched with the replaced display card in the second display card driver library;
and setting the searched non-Nvidia display card driver matched with the replaced display card as a default display card driver.
7. The utility model provides a display card drive auto-change over device, its characterized in that is applied to computer equipment, computer equipment installs in advance and presets the display card driver storehouse, preset the display card driver storehouse and include first display card driver storehouse, including at least one kind of Nvidia closed source drive of preinstallation in the first display card driver storehouse, nvidia closed source drive obtains through the installation of the compatible installation package of preparation in advance, the device includes:
a request receiving module, configured to receive a reconfiguration drive request, where the reconfiguration drive request is used to request to replace a default graphics card drive of the computer device, and the default graphics card drive is a currently-active graphics card drive;
an interface display module, configured to respond to the reconfiguration drive request, to display a preset interface, where a version number of an optional Nvidia closed-source driver is displayed in the preset interface, and the optional Nvidia closed-source driver is an Nvidia closed-source driver that exists in the first graphics card driver library and is adapted to a current graphics card in the computer device;
the drive setting module is used for setting the default display card drive according to the selection result aiming at the preset interface;
the device further comprises:
the installation file acquisition module is used for acquiring an installation file of the Nvidia closed source driver to be installed;
the installation file conversion module is used for converting the installation file of the Nvidia closed-source drive into a compatible installation package;
the installation package running module is used for installing at least one compatible installation package of the Nvidia closed source driver in the computer equipment to obtain the first display card driver library;
the installation file conversion module comprises:
the path mounting submodule is used for mounting a working path through a combined mounting file system and copying the installation file driven by the Nvidia closed source to the working path;
the file operation submodule is used for operating the installation file of the Nvidia closed source drive under the small system of the root user environment of the working path;
the set acquisition submodule is used for searching all files generated by operating the installation files of the Nvidia closed source drive under the directory of the working path to obtain a file set to be packaged;
the conflict modification submodule is used for modifying the source codes in the file set to enable different drive file names of the Nvidia closed source drives to be different, and modifying library file paths of the Nvidia closed source drives in the file set to enable different library file paths of the Nvidia closed source drives to be different;
and the file packaging submodule is used for arranging the modified file set into an installation package.
8. An apparatus for video card driver switching, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs comprising instructions for performing the video card driver switching method according to any one of claims 1 to 6.
9. A readable storage medium having stored thereon instructions that, when executed by one or more processors of an apparatus, cause the apparatus to perform the graphics card driver switching method of any of claims 1 to 6.
CN202211022944.XA 2022-08-25 2022-08-25 Display card drive switching method and device and readable storage medium Active CN115098177B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211022944.XA CN115098177B (en) 2022-08-25 2022-08-25 Display card drive switching method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211022944.XA CN115098177B (en) 2022-08-25 2022-08-25 Display card drive switching method and device and readable storage medium

Publications (2)

Publication Number Publication Date
CN115098177A CN115098177A (en) 2022-09-23
CN115098177B true CN115098177B (en) 2022-11-04

Family

ID=83301226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211022944.XA Active CN115098177B (en) 2022-08-25 2022-08-25 Display card drive switching method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN115098177B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126256A (en) * 2016-07-01 2016-11-16 武汉深之度科技有限公司 A kind of driven management method, Apparatus and system
CN109814932A (en) * 2019-01-03 2019-05-28 武汉深之度科技有限公司 Video driver installation method calculates equipment
CN112579181A (en) * 2020-11-13 2021-03-30 麒麟软件有限公司 Multi-GPU (graphics processing Unit) drive compatibility method in operating system
CN114461336A (en) * 2021-12-27 2022-05-10 天翼云科技有限公司 GPU real-time migration method and device and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662708B (en) * 2012-03-31 2016-03-16 中标软件有限公司 A kind of (SuSE) Linux OS and video driver device thereof
CN112667297A (en) * 2020-12-29 2021-04-16 长沙景嘉微电子股份有限公司 Display configuration method and device, storage medium and electronic device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126256A (en) * 2016-07-01 2016-11-16 武汉深之度科技有限公司 A kind of driven management method, Apparatus and system
CN109814932A (en) * 2019-01-03 2019-05-28 武汉深之度科技有限公司 Video driver installation method calculates equipment
CN112579181A (en) * 2020-11-13 2021-03-30 麒麟软件有限公司 Multi-GPU (graphics processing Unit) drive compatibility method in operating system
WO2022099961A1 (en) * 2020-11-13 2022-05-19 麒麟软件有限公司 Multi-gpu driver compatibility method in operating system
CN114461336A (en) * 2021-12-27 2022-05-10 天翼云科技有限公司 GPU real-time migration method and device and electronic equipment

Also Published As

Publication number Publication date
CN115098177A (en) 2022-09-23

Similar Documents

Publication Publication Date Title
EP2447819B1 (en) Mobile terminal and controlling method thereof
US8612740B2 (en) Mobile terminal with a dedicated screen of a first operating system (OS) with at least an icon to touch for execution in a second OS
US20150333971A1 (en) Method and device for managing processes of application program
EP3416045A1 (en) Method for controlling a display, device, and storage medium
CN110650129B (en) Account login method and device and computer readable storage medium
US20180220099A1 (en) Device, system and method for operating electric appliance by mobile terminal
CN106528252A (en) Object launching method and apparatus
JP2017524212A (en) Application installation package processing method, apparatus, program, and recording medium
CN111857531A (en) Mobile terminal and file display method thereof
EP3327565A1 (en) Method and equipment for running a file
CN106775624B (en) Method and device for determining application display sequence
CN112068764B (en) Language switching method and device for language switching
CN113055585B (en) Thumbnail display method of shooting interface and mobile terminal
CN115098177B (en) Display card drive switching method and device and readable storage medium
CN114721675B (en) Software uninstalling method and device, electronic equipment and readable storage medium
EP4125273A1 (en) Display control method and apparatus for virtual item, and display method and apparatus for virtual item
US11269699B2 (en) Method and device for processing an application
CN114528037B (en) Application starting method and device, electronic equipment and storage medium
US20220308853A1 (en) Information processing method and apparatus, terminal device, and storage medium
CN114995842B (en) Method and device for installing operating system and readable storage medium
CN114387928B (en) Backlight switching method and device, electronic equipment and storage medium
CN113946346B (en) Data processing method and device, electronic equipment and storage medium
CN117076005B (en) Application running method and device, electronic equipment and storage medium
CN114420058B (en) Backlight adjusting method and device, electronic equipment and storage medium
CN113703858A (en) Application starting method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant