Hide mouse cursor apalis iMX8QM

Hi,

I can’t remove the mouse cursor from the screen. I already tried to disable all mice from Kernel configuration but it doesn’t work. My custom image is based on “console-tdx-image”, I’ve added gstreamer and some custom recipes to add cranksoftware runtime and application. However i tried to compile a “pure” “console-tdx-image” and the cursor is still visible.

How can i remove/hide the mouse cursor?

Thanks

Enrico

How about unplugging the mouse? Weston usually does all this automatically upon detecting a touch screen vs. a mouse.

Hi @marcel.tx,

The problem is that we don’t have any mouse connected to the board. We only have the USB touchscreen, an LVDS display, a rotative encoder on GPIO1 and GPIO2, serial communication on UART2 and debug on UART1.

In “/dev/input” we have “event0” and “event1” and the touchscreen is mapped on “event0”

Thanks

Enrico

HI Enrico

Did you try one by one all the touchscreen and rotative encoders and check if you still see the mouse in Weston?

Best regards,
Jaski

Hi @jaski.tx,

unplugging the touchscreen the cursor is not visible anymore.
So, maybe the touchsreen is seen as a mouse? The touchscreen driver is an Ilitek ili2510.

Thanks

Enrico

Hi

Good, that you found out the root cause. What is model of the USB touchscreen?

Best regards,
Jaski

Hi @jaski.tx,

the USB touchscreen is an Ilitek ili2510.

Thanks,

Enrico

I guess one gets what one asks for if using a cheapo touch screen blindly emulating a mouse (;-p). There would be proper specifications handling all this if adhered to…

Hi @marcel.tx,

Ok, thanks.

Is it possible to change the mouse pointer images with a transparent one?

Thanks

Enrico

HI @Enrico

I think you can set a custom cursor theme and cursor-size as described in the weston.ini. Some examples for cursor-themes can be found here.

Best regards,
Jaski

I have a similar issue with Torizon and a different USB touch model. A touch firmware update by the supplier was needed to disable the mouse and enable the touch behaviour (scroll, zoom) but the mouse cursor is still displayed by default. By the way, as a workaround the unbind and rebind of the hid-touchscreen driver, after weston launch, had the effect to hide the mouse cursor.

Hi @ldvp

Thanks for your Input.

Best regards,
Jaski

Hi! How did you get to achieve this? I’m having the very same issue, although the touchscreen controller seems to really be a touchscreen controller, not a pointer emulator :-/ (I’m using the Colibri development kit with a resistive screen).

Hi @lisandropm,
in my case I have switched from “mouse emulation” to “touch” mode installing a new firmware on the touch screen, provided by my specific touch screen manufacturer, which was released to fix this general issue. Therefore I have had to change nothing in Torizon configuration.

In your case, if such support by the device manufacturer is not available to fix it, I would suggest to have a look at how udev and libinput handle your resistive touch screen, because that is relevant to how weston renders it graphically (libinput docs). Maybe you can try to analise and edit their configuration to workaround.

Bests,
ldvp

Hi Enrico,

I guess that what i’ve done now is probably what you are looking for, change mouse theme when weston shows the “left_ptr” on the screen. (Note, that im using weston on wayland!!!)
What i’ve done is create a fully transparent left_ptr with xcursorgen, with basicly:

  • Create a directory called transparent_cursor
  • Create a fully transparent transparent_cursor.png inside this folder (i used photoshop) with size 32x32
  • create a configuration file named transparent.cfg with the following content: 32 0 0 transparent_cursor.png
  • Now call xcursorgen tool: xcursorgen transparent.cfg left_ptr , the new file left_ptr will be available now on the roots folder
  • Copy left_ptr file to your active theme folder (ex: /usr/share/icons/hicolor/cursors/) (* if don’t have this cursors folder, create it by hand)
  • Change your theme on weston configuration file (mine is at: /etc/xdg/weston/weston.ini) by change [shell] settings:
[shell]
locking=false
cursor-theme=hicolor
cursor-size=32
  • Now restart weston, and your “mouse icon” should be “invisible” but the touch-events still work perfectly.

Hope that it helps :slight_smile:

Regards

1 Like

Hi @anonymouse
I’m working on Enrico project and I was facing up the same problem.
Thanks to your tips I solved the problem, very thanks

1 Like