console has no cursor

Post Reply
bk_XU_AZ
Posts: 266
Joined: Sun Sep 08, 2013 3:51 pm
languages_spoken: english
ODROIDs: XU3, U3, XU4, C1+, H2, N2
Has thanked: 0
Been thanked: 2 times
Contact:

console has no cursor

Unread post by bk_XU_AZ » Fri Jan 17, 2020 5:04 pm

When I use the tty console in Ubuntu 18.04, there's no cursor. That makes correcting my bash typos a real challenge. Any suggestions on how to make the cursor appear?

User avatar
tobetter
Posts: 4589
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 84 times
Been thanked: 327 times
Contact:

Re: console has no cursor

Unread post by tobetter » Fri Jan 17, 2020 5:25 pm

If you are running 4.9 kernel, currently you need to build kernel with a patch that enables software cursor.

Code: Select all

diff --git a/arch/arm64/configs/odroidn2_spibios_defconfig b/arch/arm64/configs/odroidn2_defconfig
index 5ae7f8a62866..f01e924a171f 100644
--- a/arch/arm64/configs/odroidn2_defconfig
+++ b/arch/arm64/configs/odroidn2_defconfig
@@ -829,7 +829,7 @@ CONFIG_AMLOGIC_VOUT2_SERVE=y
 CONFIG_AMLOGIC_MEDIA_FB=y
 CONFIG_AMLOGIC_MEDIA_FB_OSD_VSYNC_RDMA=y
 CONFIG_AMLOGIC_MEDIA_FB_OSD2_ENABLE=y
-CONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR=y
+# CONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR is not set

 #
 # Amlogic OSD_EXT Module
diff --git a/drivers/amlogic/media/osd/osd_fb.c b/drivers/amlogic/media/osd/osd_fb.c
index 6844737b5e17..a30590254289 100644
--- a/drivers/amlogic/media/osd/osd_fb.c
+++ b/drivers/amlogic/media/osd/osd_fb.c
@@ -380,9 +380,13 @@ struct ion_handle *fb_ion_handle[OSD_COUNT][OSD_MAX_BUF_NUM];
 };
 #endif

+#ifdef CONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR
 static int osd_cursor(struct fb_info *fbi, struct fb_cursor *var);
+#endif

 #if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
+extern int  soft_cursor(struct fb_info *info, struct fb_cursor *cursor);
+
 static int overscan_ratio = 100;       /* at % */

 static int osd_set_fb_var(int index, const struct vinfo_s *vinfo)
@@ -1918,6 +1922,7 @@ static int osd_pan_display(struct fb_var_screeninfo *var,
        return 0;
 }

+#ifdef CONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR
 static int osd_cursor(struct fb_info *fbi, struct fb_cursor *var)
 {
        s16 startx = 0, starty = 0;
@@ -1939,6 +1944,7 @@ static int osd_cursor(struct fb_info *fbi, struct fb_cursor *var)

        return 0;
 }
+#endif

 static int osd_sync(struct fb_info *info)
 {
@@ -1956,10 +1962,17 @@ static struct fb_ops osd_ops = {
        .fb_fillrect    = cfb_fillrect,
        .fb_copyarea    = cfb_copyarea,
        .fb_imageblit   = cfb_imageblit,
-#ifdef CONFIG_FB_SOFT_CURSOR
+#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
+       && !defined(CONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR)
+       .fb_cursor      = soft_cursor,
+#else
+#if defined(CONFIG_FB_SOFT_CURSOR)
        .fb_cursor      = soft_cursor,
 #endif
+#ifdef CONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR
        .fb_cursor      = osd_cursor,
+#endif
+#endif
        .fb_ioctl       = osd_ioctl,
 #ifdef CONFIG_COMPAT
        .fb_compat_ioctl = osd_compat_ioctl,

bk_XU_AZ
Posts: 266
Joined: Sun Sep 08, 2013 3:51 pm
languages_spoken: english
ODROIDs: XU3, U3, XU4, C1+, H2, N2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: console has no cursor

Unread post by bk_XU_AZ » Sat Jan 18, 2020 1:32 am

Thanks for that answer. At least I know what is going on and that there's no simple fix. I have never made the kernel. I could probably figure it out if I had time, especially with help from nice folks like you. But I need to wait for the next kernel release, I guess. I am familiar with makefiles, etc. But not with Linux. After building it has to be installed, which is something I know how to do from an update, but no more than that.

User avatar
meveric
Posts: 10737
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105)
Has thanked: 30 times
Been thanked: 242 times
Contact:

Re: console has no cursor

Unread post by meveric » Sat Jan 18, 2020 2:19 am

You can use my Debian based images and have cursor, I build the Kernel by default with that patch.
You could also remove the Kernel from HardKernel and instead install the Kernel from my repository, not as easy but would work as well.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

bk_XU_AZ
Posts: 266
Joined: Sun Sep 08, 2013 3:51 pm
languages_spoken: english
ODROIDs: XU3, U3, XU4, C1+, H2, N2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: console has no cursor

Unread post by bk_XU_AZ » Sat Jan 18, 2020 8:49 am

Are there instructions for replacing the kernel? If so, I can follow those. MANY thanks, tobetter and meveric!

User avatar
meveric
Posts: 10737
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105)
Has thanked: 30 times
Been thanked: 242 times
Contact:

Re: console has no cursor

Unread post by meveric » Sun Jan 19, 2020 6:08 pm

first I'd suggest to make a backup of your SD/eMMC in case something goes wrong.

Then you can try following this steps:

Code: Select all

wget https://oph.mdrjr.net/meveric/pool/main/m/meveric-keyring/meveric-keyring_2019.7.18_all.deb
sudo apt install ./meveric-keyring_2019.7.18_all.deb
cd /etc/apt/sources.list.d/
sudo wget https://oph.mdrjr.net/meveric/sources.lists/meveric-all-N2.list
sudo apt update
Up to here nothing bad happens, certainly nothing that should break the image.
The next step is to clean up the old Kernel which can cause some issues.
Technically everything under /boot is just temporary files, as the real bootfs is mounted under /media/boot
Therefore you should delete everything under /boot or if you want move it into a backup folder or something like that.
It might be that we also need to remove some files from /media/boot, but I'm not sure. The dtb files come into my mind as a candidate.
After that you should run the following commands:

Code: Select all

# uninstall the Kernel from HardKernel
sudo apt remove  linux-odroid-n2
# install new Kernel and Headers from my repository
sudo apt install linux-image-arm64-odroid-n2 linux-headers-arm64-odroid-n2
This should install the Kernel and it's headers for the ODROID N2.

If something goes wrong, don't panic come back here and ask for help.
As long as you don't restart your N2, the old Kernel will keep running and you can fix every issue you encounter if something goes wrong, you panic and you restart the ODROID, there is a chance it may no longer boot.
In that case you better have a backup :)
These users thanked the author meveric for the post:
thatsaltydude (Sun Feb 09, 2020 5:26 am)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

bk_XU_AZ
Posts: 266
Joined: Sun Sep 08, 2013 3:51 pm
languages_spoken: english
ODROIDs: XU3, U3, XU4, C1+, H2, N2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: console has no cursor

Unread post by bk_XU_AZ » Thu Feb 06, 2020 11:57 am

Hey, meveric- I just now saw this. I am sorry I didn't thank you before. Thank you. I will try. I image backup pretty often, because I catn typee so good now more. ;-)

bk_XU_AZ
Posts: 266
Joined: Sun Sep 08, 2013 3:51 pm
languages_spoken: english
ODROIDs: XU3, U3, XU4, C1+, H2, N2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: console has no cursor

Unread post by bk_XU_AZ » Thu Feb 06, 2020 3:50 pm

You made is easy, meveric. I didn't have a single problem following your clear instructions-- and IT WORKS! I have the flashing cursor now. Thanks again.

User avatar
meveric
Posts: 10737
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105)
Has thanked: 30 times
Been thanked: 242 times
Contact:

Re: console has no cursor

Unread post by meveric » Sun Feb 09, 2020 5:58 am

glad it's working for you :)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

bk_XU_AZ
Posts: 266
Joined: Sun Sep 08, 2013 3:51 pm
languages_spoken: english
ODROIDs: XU3, U3, XU4, C1+, H2, N2
Has thanked: 0
Been thanked: 2 times
Contact:

Re: console has no cursor

Unread post by bk_XU_AZ » Sat Feb 15, 2020 4:38 am

I just tried updating u-boot and boot.ini via WebMin, but got errors:

Code: Select all

Preparing to unpack .../bootini_20200214-19_arm64.deb ...
Unpacking bootini (20200214-19) over (20190910-16) ...
Preparing to unpack .../u-boot_20200214-036f673-9_arm64.deb ...
Unpacking u-boot (20200214-036f673-9) over (20190820-921e8f4-6) ...
Setting up bootini (20200214-19) ...
<14>Feb 14 11:22:13 /usr/share/bootini/bootini-persistence.pl: Applying user preferences for boot.ini
<15>Feb 14 11:22:13 /usr/share/bootini/bootini-persistence.pl: boot.ini has 124 lines
<14>Feb 14 11:22:13 /usr/share/bootini/bootini-persistence.pl: Writing boot.ini finished. Written 124 lines
A new boot.ini is installed.
Any changes to boot.ini is lost, such as display configuration
Persistent custom settings from /media/boot/boot.ini.default have been restored
For reference your old boot.ini is saved to /media/boot/boot.ini.old
Error opening terminal: unknown.
dpkg: error processing package bootini (--configure):
 installed bootini package post-installation script subprocess returned error exit status 1
Setting up u-boot (20200214-036f673-9) ...
1669+1 records in
1669+1 records out
854896 bytes (855 kB, 835 KiB) copied, 0.0323395 s, 26.4 MB/s
Errors were encountered while processing:
 bootini
E: Sub-process /usr/bin/dpkg returned an error code (1)
Is this related to changing the kernel?

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 2 guests