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

5 Likes

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

Hello,

I’m new in using Toradex and TorizonCore, so sorry for refreshing the topic, but need to go to the source. I’m using Apalis IMX8 on Ixora Carrier Board connected to MCT070HDMI-B-CTP touch screen via HDMI. Before I used Apalis TK1 on Ixora. I have made both Quickstart Guides – with building image on TK1 with Yocto, and using containers and Torizon OTA on IMX8 (thank you for them). At this moment I’ve got two different images on my IMX8 boards – one of them is Reference Multimedia Image on IMX8 build with Yocto, and second is .yaml file from your tutorial consisting of two containers – Weston-vivante and kiosk-mode-browser uploaded via Torizon OTA.

I’d like to customize image based on .yaml file and add there something to hide unused cursor. I tried to add unclutter to Weston-vivante image (failed), to kiosk-mode-browser (passed, but nothing has changed), and also tried using “empty cursor” declared in weston.ini, as you described upper and also here:

I copied the files to Apalis via scp and run just Weston container with customized localizations and files:


docker run -e ACCEPT_FSL_EULA=1 -d --rm --name=weston --net=host --cap-add CAP_SYS_TTY_CONFIG -v /dev:/dev -v /tmp:/tmp -v /run/udev/:/run/udev/ -v /my_west_init/:/etc/xdg/weston/ -v /left_pointer2/:/usr/share/icons/hicolor/cursors --device-cgroup-rule='c 4:* rmw' --device-cgroup-rule='c 13:* rmw' --device-cgroup-rule='c 199:* rmw' --device-cgroup-rule='c 226:* rmw' mlorek/base-vivante:latest --developer weston-launch --tty=/dev/tty7 --user=torizon

At this moment nothing helped and I don’t know how to customize my .yaml image. I understand that Weston-vivante gives shell to run graphical applications, and kiosk-mode-browser is responsible for open browser, but which of this images should be customized? Weston-vivante I suppose, but try with empty cursor didn’t manage. In the future I’d like to add my applications on the board so to do this I should add to .yaml file 3rd image based on debian with my application inside? System based on containers is quite abstract for me if I need to add something.

Dear @ml_man ,

Can you please open a new topic as your question is also related to Torizon while this post is linked to BSP? In the meantime, we’re already having a look.

Best regards,
Guilherme

Hi @gclaudino.tx,

ok, no problem.