fbcon cursor

Post Reply
youka
Posts: 163
Joined: Wed Oct 09, 2013 8:38 pm
languages_spoken: english
ODROIDs: Odroid XU+E, U2, U3, XU3, XU4 + Cloudshell
Contact:

fbcon cursor

Unread post by youka » Wed Mar 25, 2015 9:12 pm

Why isn't there one?

Holzhaus
Posts: 163
Joined: Sat Jan 31, 2015 3:12 am
languages_spoken: english, german
ODROIDs: C1 (running ArchLinux ARM)
Contact:

Re: fbcon cursor

Unread post by Holzhaus » Wed Mar 25, 2015 11:10 pm


youka
Posts: 163
Joined: Wed Oct 09, 2013 8:38 pm
languages_spoken: english
ODROIDs: Odroid XU+E, U2, U3, XU3, XU4 + Cloudshell
Contact:

Re: fbcon cursor

Unread post by youka » Thu Mar 26, 2015 2:19 pm

Thanks, I'll try some of those later today hopefully.

But my question still stands, why isn't there one by default? Why should I have to hack around it? And also, why the hell is the framebuffer blank by default?! Surely there must be a way to change that somewhere?

crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: fbcon cursor

Unread post by crashoverride » Thu Mar 26, 2015 2:23 pm

Just to clarify, are you running Archlinux? I have not observed this behavior running the official Ubuntu image.

youka
Posts: 163
Joined: Wed Oct 09, 2013 8:38 pm
languages_spoken: english
ODROIDs: Odroid XU+E, U2, U3, XU3, XU4 + Cloudshell
Contact:

Re: fbcon cursor

Unread post by youka » Thu Mar 26, 2015 2:38 pm

crashoverride wrote:Just to clarify, are you running Archlinux? I have not observed this behavior running the official Ubuntu image.
I'm running Debian. Regardless, I still get no cursor even on the official Ubuntu image. As for the blank framebuffer, there's a hack in the uInitrd on the official Ubuntu image that enables the framebuffer console after boot.
I want to know if there's a way to change this on the kernel-level, be it in the source or with boot params or whatever. Just so I don't have to apply hacks everywhere to get expected functionality.

crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: fbcon cursor

Unread post by crashoverride » Thu Mar 26, 2015 6:59 pm

I see what you mean! I just saw this happens on Ubuntu too after reading another post reporting the same.

crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: fbcon cursor

Unread post by crashoverride » Thu Mar 26, 2015 7:12 pm

From my other post:
As for the cursor, ARM SoC's do not have any character generator hardware to generate an actual text mode like PCs do. The only mode is bitmap graphics. Therefore, there is no such thing as a hardware text cursor on them. What ever cursor is available needs to be emulated somewhere.
This is where that happens:
https://github.com/hardkernel/linux/blo ... con.c#L397

[edit]
From looking at the rest of the code, it appears fbcon times the cursor blink based on vsync. So my wild speculation would be that if there is an issue reporting vsync in the Amlogic framebuffer driver, the fbcon driver will not be able to time when to blink its cursors.

youka
Posts: 163
Joined: Wed Oct 09, 2013 8:38 pm
languages_spoken: english
ODROIDs: Odroid XU+E, U2, U3, XU3, XU4 + Cloudshell
Contact:

Re: fbcon cursor

Unread post by youka » Thu Mar 26, 2015 7:25 pm

Okay, so regarding the cursor being "emulated" on ARM SoC's, I assume all other Odroids are doing more or less the same thing, considering they all have a blinking underscore-styled cursor. As for the vsync issue, I'm not as clued up with the workings of the kernel as I should be, but surely there are other ways to time the blinking? (I'll also look into the link you provided a little later) And even if there isn't, disabling cursor blinking should let it stay visible, right?

crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: fbcon cursor

Unread post by crashoverride » Thu Mar 26, 2015 7:45 pm

youka wrote:As for the vsync issue, I'm not as clued up with the workings of the kernel as I should be, but surely there are other ways to time the blinking?
Someone with the proper tools setup for kernel debugging will need to look into it. They could tell right away with a breakpoint whether the cursor is even being "commanded" to blink or not. The only thing certain is that something has to draw the cursor and erase it. The cause of the issue needs to be know before alternatives can be investigated.

youka
Posts: 163
Joined: Wed Oct 09, 2013 8:38 pm
languages_spoken: english
ODROIDs: Odroid XU+E, U2, U3, XU3, XU4 + Cloudshell
Contact:

Re: fbcon cursor

Unread post by youka » Thu Mar 26, 2015 8:04 pm

True. I was hoping there'd be a simpler solution, but I sadly don't have the time to look too deeply into this. Here's hoping HK staff can do something about it, not that hoping is worth much when it comes to HK staff.

crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: fbcon cursor

Unread post by crashoverride » Thu Mar 26, 2015 8:38 pm

The framebuffer driver comes from Amlogic. HK is just a hardware maker. They take the reference code from Amlogic and ARM integrate it with specific hardware like the added USB hub. From what I have seen, the primary customers for Amlogic's chip are Android media stick makers. Since HK is probably the only customer using the chip where someone would use the linux console and its blinking cursor, its understandable there probably has not been a lot of attention payed to that. ;)

youka
Posts: 163
Joined: Wed Oct 09, 2013 8:38 pm
languages_spoken: english
ODROIDs: Odroid XU+E, U2, U3, XU3, XU4 + Cloudshell
Contact:

Re: fbcon cursor

Unread post by youka » Thu Mar 26, 2015 9:07 pm

Indeed. I'm not saying I EXPECT everything to just be working from day one. I'm not pointing fingers about this specific issue either.

I'm just speaking from past experiences with posting on these forums about some or other issue (even small ones like this), where I either end up being told by mdrjr that I'm wrong or it's ARM/Samsung/Amlogic's problem and there's nothing him or HK can do about it. Then it gets dropped and never looked at again until more people start complaining about the same thing (which is lesser likely to happen with something as unimportant as fbcon's cursor).

Then there's the HK fanboys who say people like myself should stop complaining about HK or whoever not doing anything about certain problems and take it in to my own hands (where I can, at least). Problem with that is, I do most my R&D with these boards for the company I work for. And as most (if not all) other companies, we have deadlines and other time-constraints. So whilst I'd love to learn more and try to fix it by myself, for myself, I don't have the time to, and therefore I can't. So I ask HK/Odroid community for help and the vicious cycle starts all over again.

Hence my lack of faith in depending on HK for solutions with anything, be it their problem or not.

patoberli
Posts: 401
Joined: Mon Feb 23, 2015 6:32 pm
languages_spoken: english, german
ODROIDs: C1 with RTC, Bluetooth 4.0, Wireless stick 4.0
Location: Switzerland
Contact:

Re: fbcon cursor

Unread post by patoberli » Fri Mar 27, 2015 5:04 pm

I think you misunderstood crashoverride. He didn't say that HK or mdrjr are ignoring this, it's just been 1 day since you opened the thread and they don't reply to every single thread. In any case, it seems that this currently doesn't work, you opened a thread (which is all good) and now you can either hope somebody can fix/change it or you have to fix it somehow yourself (the idea behind Linux!). At the moment this is an unsupported feature, but maybe it once will be supported in the future.
So you did everything correct here, but now the only thing you can do is to either wait and hope that your feature request is fulfilled, a workaround found or you try an other product where that feature is working.
-
pato

youka
Posts: 163
Joined: Wed Oct 09, 2013 8:38 pm
languages_spoken: english
ODROIDs: Odroid XU+E, U2, U3, XU3, XU4 + Cloudshell
Contact:

Re: fbcon cursor

Unread post by youka » Fri Mar 27, 2015 10:39 pm

No, I think I understood him just fine. It was just an ethics rant, but it doesn't really matter.

To be honest, I'm not too worried if this issue never gets solved since there are work-arounds that are good enough at the moment. Also, as mentioned before, I don't have the time to look into this myself. That's why I don't. If had the time (which will probably never happen), then I would. But I still post these things for one day when capable individual(s) with spare time appear, read this, and are able to provide a solution. If it were more urgent, I'd take it into my own hands or make a bigger fuss over it in the forums :)

youka
Posts: 163
Joined: Wed Oct 09, 2013 8:38 pm
languages_spoken: english
ODROIDs: Odroid XU+E, U2, U3, XU3, XU4 + Cloudshell
Contact:

Re: fbcon cursor

Unread post by youka » Fri Mar 27, 2015 10:57 pm

Anyway, all that aside...There's a nice work-around in the link Holzhaus provided...

Code: Select all

infocmp >> terminfo.txt
sed -i.bak -e 's/?0c/?112c/g' -e 's/?8c/?48;0;64c/g' terminfo.txt
tic terminfo.txt
tput cnorm
Then just re-run "tput cnorm" each time you log in. This should be good enough for now. At least now I can edit text files without being completely lost :D

User avatar
memeka
Posts: 4244
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: fbcon cursor

Unread post by memeka » Sat Mar 28, 2015 11:16 am

thanks @youka for the workaround!

crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: fbcon cursor

Unread post by crashoverride » Mon Mar 30, 2015 9:52 am

Was looking through kernel code for something and came across this:
https://github.com/hardkernel/linux/blo ... dev.c#L337

May be worth investigating or it may be nothing.

[Edit]
https://github.com/hardkernel/linux/blo ... ain.c#L578

[Edit2]
https://github.com/hardkernel/linux/blo ... ftcursor.c

Someone should check that the feature is enabled in the kernel.

[Edit3]
BONUS POINTS:
Here is the function to call to implement the FBIO_WAITFORVSYNC function
https://github.com/hardkernel/linux/blo ... _hw.c#L490

Add the FBIO_WAITFORVSYNC IOCTL here
https://github.com/hardkernel/linux/blo ... ain.c#L514

crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: fbcon cursor

Unread post by crashoverride » Mon Mar 30, 2015 11:17 am

Also, it looks like this line should be enabled
https://github.com/hardkernel/linux/blo ... hw.c#L1488
for panning to work.

There is an explicit wait for vsync when panning that probably should be left disabled if FBIO_WAITFORVSYNC is to be implemented.
https://github.com/hardkernel/linux/blo ... hw.c#L1493

User avatar
memeka
Posts: 4244
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: fbcon cursor

Unread post by memeka » Mon Mar 30, 2015 11:33 am

def interesting...

crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: fbcon cursor

Unread post by crashoverride » Mon Mar 30, 2015 9:43 pm

I got it working!

In the kernel .config file

Code: Select all

CONFIG_FB_OSD2_CURSOR=n
CONFIG_FB_SOFT_CURSOR=y
Anyone else care to try it and confirm?

{edit}
Just to clarify, this means recompiling the kernel.

youka
Posts: 163
Joined: Wed Oct 09, 2013 8:38 pm
languages_spoken: english
ODROIDs: Odroid XU+E, U2, U3, XU3, XU4 + Cloudshell
Contact:

Re: fbcon cursor

Unread post by youka » Mon Mar 30, 2015 11:10 pm

Ah, interesting! I tried last week with just setting CONFIG_FB_SOFT_CURSOR=y, but leaving CONFIG_FB_OSD2_CURSOR as it was.

I'll try it out tomorrow, thanks crashoverride

crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: fbcon cursor

Unread post by crashoverride » Tue Mar 31, 2015 3:19 am

Turns out the new flashing cursor works a little too well. Kodi-standalone (fbdev) will need to be modified to turn OFF the cursor since it continues to blink during operation. In fact, anything using fbdev needs to turn off the cursor on startup. Of course, this implies they will also need to re-enable it on exit.

User avatar
memeka
Posts: 4244
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Contact:

Re: fbcon cursor

Unread post by memeka » Tue Mar 31, 2015 6:06 am

I think RetroArch does that

youka
Posts: 163
Joined: Wed Oct 09, 2013 8:38 pm
languages_spoken: english
ODROIDs: Odroid XU+E, U2, U3, XU3, XU4 + Cloudshell
Contact:

Re: fbcon cursor

Unread post by youka » Wed Apr 01, 2015 2:49 pm

crashoverride wrote:Turns out the new flashing cursor works a little too well. Kodi-standalone (fbdev) will need to be modified to turn OFF the cursor since it continues to blink during operation. In fact, anything using fbdev needs to turn off the cursor on startup. Of course, this implies they will also need to re-enable it on exit.
Yeah, this happens on the U3 and XU3 as well. You can just echo "1" or "0" to /sys/class/graphics/fbcon/cursor_blink to enable/disable cursor-blinking. It had no effect on the C1 when the cursor wasn't working, but I still need to get around to checking that out.

youka
Posts: 163
Joined: Wed Oct 09, 2013 8:38 pm
languages_spoken: english
ODROIDs: Odroid XU+E, U2, U3, XU3, XU4 + Cloudshell
Contact:

Re: fbcon cursor

Unread post by youka » Wed Apr 01, 2015 9:52 pm

crashoverride wrote:Anyone else care to try it and confirm?

{edit}
Just to clarify, this means recompiling the kernel.
Not much this side. Used odroidc_defconfig (didn't change anything else), updated .config as you described and now I just get a kernel panic :/
Is there anything else you did to your config? I'll try again later just in-case I messed something up on my side...

crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: fbcon cursor

Unread post by crashoverride » Thu Apr 02, 2015 1:56 am

I did "make odroidc_defconfig". Then I edited .config. I searched for "CONFIG_FB_OSD2_CURSOR" and set it to "n". Then i appended "CONFIG_FB_SOFT_CURSOR=y" to the bottom of the file.

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 1 guest