REF: https://github.com/pftf/RPi4/issues/115
GraphicsConsoleDxe defaults the ConOut Mode.CursorVisible to TRUE.
However, the driver never draws the cursor during init. This results
in the first call to disable the cursor (using ConOut->EnableCursor(FALSE))
to actually draw the cursor on the screen, as the logic in FlushCursor depends
on the Mode.CursorVisible state to determine if it should draw or erase
the cursor.
Fix by changing the default CursorVisible in this driver to FALSE.
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com>
Cc: Pete Batard <pete@akeo.ie>
Signed-off-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
---
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
index c042451a9b52..6b8d11d587d1 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
@@ -33,7 +33,7 @@ GRAPHICS_CONSOLE_DEV mGraphicsConsoleDevTemplate = {
EFI_TEXT_ATTR(EFI_LIGHTGRAY, EFI_BLACK),
0,
0,
- TRUE
+ FALSE
},
(GRAPHICS_CONSOLE_MODE_DATA *) NULL,
(EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL
--
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#67906): https://edk2.groups.io/g/devel/message/67906
Mute This Topic: https://groups.io/mt/78484573/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
> -----Original Message-----
> From: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
> Sent: Wednesday, November 25, 2020 3:16 AM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>;
> Gao, Zhichao <zhichao.gao@intel.com>; Ni, Ray <ray.ni@intel.com>; Ard
> Biesheuvel <Ard.Biesheuvel@arm.com>; Pete Batard <pete@akeo.ie>
> Subject: [PATCH v1 1/3] MdeModulePkg/GraphicsConsoleDxe: Change default
> CursorVisible to FALSE
>
> REF: https://github.com/pftf/RPi4/issues/115
>
> GraphicsConsoleDxe defaults the ConOut Mode.CursorVisible to TRUE.
> However, the driver never draws the cursor during init. This results in the first
> call to disable the cursor (using ConOut->EnableCursor(FALSE)) to actually draw
> the cursor on the screen, as the logic in FlushCursor depends on the
> Mode.CursorVisible state to determine if it should draw or erase the cursor.
>
> Fix by changing the default CursorVisible in this driver to FALSE.
>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Zhichao Gao <zhichao.gao@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com>
> Cc: Pete Batard <pete@akeo.ie>
> Signed-off-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
> ---
> MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c | 2
> +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git
> a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
> b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
> index c042451a9b52..6b8d11d587d1 100644
> --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
> +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.
> +++ c
> @@ -33,7 +33,7 @@ GRAPHICS_CONSOLE_DEV
> mGraphicsConsoleDevTemplate = {
> EFI_TEXT_ATTR(EFI_LIGHTGRAY, EFI_BLACK), 0, 0,- TRUE+ FALSE },
> (GRAPHICS_CONSOLE_MODE_DATA *) NULL,
> (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL--
> 2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68108): https://edk2.groups.io/g/devel/message/68108
Mute This Topic: https://groups.io/mt/78484573/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.