Bug 13105 - How to detect for real that hardware cursor is working
Summary: How to detect for real that hardware cursor is working
Status: RESOLVED INVALID
Alias: None
Product: Xtests
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium enhancement
Assignee: Stuart Anderson
QA Contact: Xorg testing team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-05 14:34 UTC by Guillermo Marraco
Modified: 2018-07-30 17:01 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Guillermo Marraco 2007-11-05 14:34:16 UTC
I would be nice to have an automatic detection that hardware cursor is really drawed on screen, and then save it to a log file, or activate the software cursor, or warning the user that hardware cursor is not working.

Is very common that hardware cursor does not work. It really scares a newbie trapped on runlevel 5, checking if "ubuntu can replace windows".

How to detect if hardware cursor is really drawed, and where:
1- Calculate Fast Fourier Transform of cursor image -FFT(cursor)-
2- Put cursor on expected place.
3- Calculate Fast Fourier Transform of pixel screen drawed. -FFT(screen)-
4- Divide (is complex numbers task) FFT(screen) by FFT(cursor). You get FFT(peak)
5- calculate inverse Fast Fourier Transform of FFT(Peak), and get -Peak-
5- Check if Peak have a peak on expected place. If not, then, move cursor, and find new peak.

Distance betwen peak can tell if cursor is moving, how much, or if is drawed at all.
The fast fourier transform can detect even if the mouse cursor is someway distorted (like dimmed, or brighted, or noisy), but if is assumed that only for being drawed, is drawed exactly as expected, then can simply being searched along the screen. If many buggy cursors are being drawed, then moving cursor can tell where is the real cursor.

Came on, givme that:

function_Check_hardware_cursor_is_drawed(RGBAlpha_screen is array of [real, real, real, real]; RGBAlpha_Cursor is array of [real, real, real, real] ) {
}

I fill the code. I can return the position of cursor, or an error flag.

I have asked for this enhancement feature on gnome, but them told me that is a X guys issue.
Comment 1 Tollef Fog Heen 2010-02-09 13:58:55 UTC
Set QA contact
Comment 2 johnhomes 2015-07-03 10:04:21 UTC
Distance betwen peak can tell if cursor is moving, how much, or if is drawed at all.
The fast fourier transform can detect even if the mouse cursor is someway distorted (like dimmed, or brighted, or noisy), but if is assumed that only for being drawed, is drawed exactly as expected, then can simply being searched along the screen. If many buggy cursors are being drawed, then moving cursor can tell where is the real cursor.
https://gumroad.com/l/sky-tv-subscribe
https://archive.org/details/fixithere
Comment 3 Adam Jackson 2018-07-30 17:01:46 UTC
There's not presently a way for an X client to discover this with any X server that I'm aware of, the protocol does not have any way to tell the client whether a cursor is in hardware or not. Even if such a thing existed it would be a bit outside xts's remit, since xts is for testing conformance to a specification, and the only thing it could do with such an extension is report what it says not verify its honesty.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.