Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buggy Mouse Cursor on webOS 24 (9.x) #466

Open
mariotaku opened this issue Oct 22, 2024 · 68 comments
Open

Buggy Mouse Cursor on webOS 24 (9.x) #466

mariotaku opened this issue Oct 22, 2024 · 68 comments
Labels
bug Something isn't working compatibility Issues or information about device compatibility input Issue about keyboard/mouse/gamepad webos-9

Comments

@mariotaku
Copy link
Owner

Moonlight Version

1.6.x

Device Type

webOS TV

Device Model

2022+ models with webOS 9 upgrade

Device OS

webOS 9

Host OS

None

Host Software

None

Host Setup

No response

Bug Description

On models running latest webOS 24 (9.x), magic remote control becomes unresponsive after starting a streaming session. This also affects usage outside Moonlight.

Reproduction Steps

No response

Expected Behavior

No response

@mariotaku mariotaku added the bug Something isn't working label Oct 22, 2024
@Archimedes1986
Copy link

I started to dig deeper into this issue, and here’s what I’ve discovered so far:

Not Triggering the Bug:

  • It works fine as long as only the directional buttons are used, without engaging the pointer feature of the LG remote.
  • It also functions properly with an attached USB controller (Xbox).
  • Opening the stream overlay with the controller (LB + RB + Start + Select) does not trigger the bug.

Triggering the Bug:

  • The bug occurs when mouse input is used during streaming (tested with a USB mouse).
  • The pointer feature of the LG remote triggers the bug during streaming.

What I’ve Tried:

  • I experimented with nearly all input options in various combinations, but there was no effect.
  • I tested different streaming resolutions, including native 4K, in case it was a scaling issue with the absolute mouse feature, but it made no difference.

Observations:

After closing Moonlight, the TV does not completely bug out. Sometimes it becomes responsive again, even to the magic remote. However, the stuttering consistently reappears the moment I use the scroll wheel. As soon as the cursor disappears, the TV remains responsive as long as only digital inputs (LG remote buttons or gamepad) are used. I have QuickStart+ enabled. Powering down does not immediately resolve the issue. However, leaving the TV in soft standby (without a full power cycle) for about five minutes completely resolves the bug until it is triggered again in Moonlight.

I further investigated CPU usage before, during, and after the bug. Even during the extreme stuttering, the TV remains responsive on the SSH terminal. The results of the "ps aux" command showed no increased CPU usage associated with the bug. To confirm this, I triggered the bug and opened the "System Information" page in KODI, which has a CPU graph. Interestingly, when I used the scroll wheel on the remote to trigger the bug, the CPU load even slightly decreased.

The time it takes for the TV to become responsive again after using the scroll wheel varies widely; sometimes it becomes responsive again after a few seconds, while other times it takes half a minute. The entire situation strangely reminds me on the behavior of a system that is running out of VRAM or maxing out the GPU. Unfortunately, I have no knowledge of how to debug GPU issues or how to check VRAM/GPU load.

#before bug

ps aux | sort -nrk 3,3 | head -n 10
<
root      2452 15.5  7.9 423136 162812 ?       SLsl 22:12   0:25 /usr/bin/com.webos.app.home {"@system_native_app":true,"reason":"undefined","interfaceVersion":2,"event":"launch","interfaceMethod":"registerApp","appId":"com.webos.app.home","preload":"full","parameters":{"snapshot":true}}
root      3413  9.6  0.5 109492 11044 ?        SLl  22:12   0:15 /usr/sbin/sdx
root      5102  9.5  2.5 181428 51680 ?        Sl   22:13   0:13 node /media/cryptofs/apps/usr/palm/services/com.palmdts.devmode.service/devmode-helper.js
root      2640  7.8  0.5 355996 10536 ?        SLsl 22:12   0:12 /usr/sbin/pqcontroller
5168      6066  7.3  4.0 391464 82868 ?        SNLsl 22:13   0:08 /media/cryptofs/apps/usr/palm/applications/netflix/bin/netflix.bin {"@system_native_app":true,"reason":"preload","interfaceVersion":2,"event":"launch","interfaceMethod":"registerApp","appId":"netflix","preload":"partial","parameters":{}}
root      2177  5.8  3.5 345180 71840 ?        SLsl 22:12   0:09 /usr/bin/surface-manager -platform eglfs_webos
6774      6189  4.9  6.1 502772 125160 ?       SLl  22:13   0:05 /media/cryptofs/apps/usr/palm/applications/youtube.leanback.v4/cobalt {"@system_native_app":true,"reason":"preload","interfaceVersion":2,"event":"launch","interfaceMethod":"registerApp","appId":"youtube.leanback.v4","preload":"semi-full","parameters":{}}
root         1  4.8  0.4  16100  8492 ?        Ss   22:12   0:08 /sbin/init portProtection criu_enabled AR_PWR_DET cmdEnd
root      3781  3.7  1.0 523308 20624 ?        SLl  22:12   0:05 /usr/sbin/iconnectivity
root      1754  2.7  0.3  50564  8108 ?        Ssl  22:12   0:04 /usr/sbin/ls-hubd --conf /etc/luna-service2/ls-hubd.conf

#while Bugging out and beeing unresponsive :
ps aux | sort -nrk 3,3 | head -n 10
<
root      2640  7.8  0.4 356072  9168 ?        SLsl 22:12   0:35 /usr/sbin/pqcontroller
root      2452  7.6  7.8 431080 159928 ?       SLsl 22:12   0:35 /usr/bin/com.webos.app.home {"@system_native_app":true,"reason":"undefined","interfaceVersion":2,"event":"launch","interfaceMethod":"registerApp","appId":"com.webos.app.home","preload":"full","parameters":{"snapshot":true}}
root      3413  4.1  0.5 109492 10600 ?        SLl  22:12   0:18 /usr/sbin/sdx
root      2177  3.7  3.5 344784 72244 ?        SLsl 22:12   0:17 /usr/bin/surface-manager -platform eglfs_webos
root      5102  3.0  2.1 182836 43700 ?        Sl   22:13   0:13 node /media/cryptofs/apps/usr/palm/services/com.palmdts.devmode.service/devmode-helper.js
root      4037  2.6  0.4 182044  9692 ?        SLsl 22:12   0:11 /usr/sbin/lginput2
root      7314  2.4  2.4 221988 49616 ?        SLl  22:18   0:03 /usr/bin/com.webos.app.voice {"@system_native_app":true,"reason":"preload","interfaceVersion":2,"event":"launch","interfaceMethod":"registerApp","appId":"com.webos.app.voice","preload":"partial","parameters":{}}
6774      6189  2.2  6.0 501748 124428 ?       SLl  22:13   0:09 /media/cryptofs/apps/usr/palm/applications/youtube.leanback.v4/cobalt {"@system_native_app":true,"reason":"preload","interfaceVersion":2,"event":"launch","interfaceMethod":"registerApp","appId":"youtube.leanback.v4","preload":"semi-full","parameters":{}}
5168      6066  2.1  4.0 391464 82700 ?        SNLsl 22:13   0:08 /media/cryptofs/apps/usr/palm/applications/netflix/bin/netflix.bin {"@system_native_app":true,"reason":"preload","interfaceVersion":2,"event":"launch","interfaceMethod":"registerApp","appId":"netflix","preload":"partial","parameters":{}}
root         1  1.9  0.4  16628  9216 ?        Ss   22:12   0:08 /sbin/init portProtection criu_enabled AR_PWR_DET cmdEnd
>


after beeing "responsove" again:
ps aux | sort -nrk 3,3 | head -n 10
<
root      2640  7.8  0.4 356072  9148 ?        SLsl 22:12   0:46 /usr/sbin/pqcontroller
root      2452  6.7  7.6 435876 156692 ?       SLsl 22:12   0:40 /usr/bin/com.webos.app.home {"@system_native_app":true,"reason":"undefined","interfaceVersion":2,"event":"launch","interfaceMethod":"registerApp","appId":"com.webos.app.home","preload":"full","parameters":{"snapshot":true}}
root      2177  3.2  3.5 344784 72364 ?        SLsl 22:12   0:19 /usr/bin/surface-manager -platform eglfs_webos
root      3413  3.1  0.5 109492 10600 ?        SLl  22:12   0:18 /usr/sbin/sdx
root      4037  2.7  0.4 182044  9692 ?        SLsl 22:12   0:16 /usr/sbin/lginput2
root      5102  2.3  2.1 182836 43700 ?        Sl   22:13   0:13 node /media/cryptofs/apps/usr/palm/services/com.palmdts.devmode.service/devmode-helper.js
6774      6189  2.0  6.0 501748 124168 ?       SLl  22:13   0:10 /media/cryptofs/apps/usr/palm/applications/youtube.leanback.v4/cobalt {"@system_native_app":true,"reason":"preload","interfaceVersion":2,"event":"launch","interfaceMethod":"registerApp","appId":"youtube.leanback.v4","preload":"semi-full","parameters":{}}
root      7314  1.9  2.4 221988 49616 ?        SLl  22:18   0:05 /usr/bin/com.webos.app.voice {"@system_native_app":true,"reason":"preload","interfaceVersion":2,"event":"launch","interfaceMethod":"registerApp","appId":"com.webos.app.voice","preload":"partial","parameters":{}}
5168      6066  1.6  4.0 391464 82688 ?        SNLsl 22:13   0:08 /media/cryptofs/apps/usr/palm/applications/netflix/bin/netflix.bin {"@system_native_app":true,"reason":"preload","interfaceVersion":2,"event":"launch","interfaceMethod":"registerApp","appId":"netflix","preload":"partial","parameters":{}}
root      4082  1.4  0.3 193536  7776 ?        S<Ll 22:12   0:08 /usr/sbin/webos-bluetooth-service

@mariotaku
Copy link
Owner Author

@Archimedes1986 Wow. I appreciate your great insight! When you feel laggy, the TV doesn't appear to have performance issue, but the sample rate of cursor movement becomes buggy. Your discovery will help me narrow down the root cause!

@mariotaku mariotaku added compatibility Issues or information about device compatibility input Issue about keyboard/mouse/gamepad webos-9 labels Oct 30, 2024
@mariotaku mariotaku pinned this issue Oct 31, 2024
@mariotaku
Copy link
Owner Author

mariotaku commented Oct 31, 2024

I'll create a series of test builds to pinpoint the issue. Please let me know how the test build performs!

(pinging users from #461) @Pjero @davidspiess @RedGuilhas @Archimedes1986


Test build 1

This version disables some cursor related features to see if they cause issue.

download webos-snapshot-4b8d9b0a (GitHub account required)

@lavocatt
Copy link

I've been experiencing this bug too on my C3, I can try to test a few builds in the coming weeks if that helps.

@rgomezgo
Copy link

Using the last main update, Moonlight performs better, but periodically my screen freezes permanently so I need to reboot the TV.
Magic cursor performs better, is usable but when I close Moonlight, the rest of TV funcions perform lagged. Configuration button and volume buttons also perform lagged when running Moonlight

@lavocatt
Copy link

Using the last main update, Moonlight performs better, but periodically my screen freezes permanently so I need to reboot the TV. Magic cursor performs better, is usable but when I close Moonlight, the rest of TV funcions perform lagged. Configuration button and volume buttons also perform lagged when running Moonlight

Yea, that's exactly what's happening to me as well. Within moonlight, everything works smoothly, but once I quit the app, the magic pointer gets laggy, it stays that way until I hard reboot the tv (get the powercord of the wall socket).

@mariotaku
Copy link
Owner Author

@lavocatt @rgomezgo Thanks for the report. Sounds like the changes are not related to the cursor issue. Could you please try the following steps?

  1. Turn on TV and ensure cursor works normal.
  2. Open Moonlight, and see how magic remote works, but don't start streaming
  3. Quit Moonlight, to see if cursor issue occurs.

@lavocatt
Copy link

1. Turn on TV and ensure cursor works normal.
2. Open Moonlight, and see how magic remote works, but don't start streaming
3. Quit Moonlight, to see if cursor issue occurs.

With that exact protocol, there is no issue with the magic cursor.

@mariotaku
Copy link
Owner Author

@lavocatt Did you install the snapshot mentioned above? (Not the one in the release)

@lavocatt
Copy link

lavocatt commented Oct 31, 2024

@lavocatt Did you install the snapshot mentioned above? (Not the one in the release)

Ah no sorry, that was the release. I'll have a test at the snapshot later.

@lavocatt
Copy link

Just tested now with the build mentioned above, and I have the same result. No problem with the magic cursor.

@davidspiess
Copy link

@mariotaku i tested Test build 1 and i experience no more mouse cursor issues in this release.
I also tried the v1.6.24 release, here the cursor issue still persists.

@mariotaku
Copy link
Owner Author

@lavocatt @davidspiess Thanks for your testing. With the test build 1, will the cursor having issue after you finish streaming?

@davidspiess
Copy link

No cursor issues after streaming.

@mariotaku
Copy link
Owner Author

mariotaku commented Nov 1, 2024

Test build 2

Thank you so much for the test. Could you try streaming and quit to see if the cursor is having issues?

@davidspiess

@davidspiess
Copy link

@mariotaku still no issues. During streaming i see now two mouse cursors. The cursor from Windows and the one from the magic remote.

@mariotaku
Copy link
Owner Author

mariotaku commented Nov 1, 2024

Test build 3

This build attempts to reset cursor on quit.

Please let me know if the cursor works after quitting from moonlight!

@davidspiess
Copy link

With build 3 the bug appears, as soon as i start streaming.

@joeknock90
Copy link

Just picked up an LG C4 today and am experiencing this issue in 1.6.24. Would be happy to test any builds.

@mariotaku
Copy link
Owner Author

mariotaku commented Nov 4, 2024

Thank you for testing it out! Seems that it's going to be tricky to solve, so I bought a main board of OLEDC2. It needs some time (1~2 weeks) to arrive, and after that I'll focus on solving this issue (also try to solve the crashing issue of Kodi).

image

The board with shipping ($36.59) and cables ($15) would cost around $150.

Your donation, with any amount would be highly appreciated. Hopefully I could cover the cost of the boards I bought :)

@vanAkim
Copy link

vanAkim commented Nov 6, 2024

Hello, I'm also encountering this issue but more as well. Thus, I don't know if there are the sames under the hood. Let me give more context then.

I'm using my LG C3 webOS 24 / version 9.2.0 with last Moonlight-TV version 1.6.24 loaded by webOS Dev Manager process (non-rooted TV as well).

I'm kinda new with all these new solutions, sunshine/moonlight/playnite, and even discovered this amazing repo and the webOS Dev Manager.
But it's quite easy to set up, so my windows 10 gaming host with sunshine+playnite is having no problem to stream and game on my android or another windows 11 client.
On the other hand, Moonlight on my C3, beside the cursor laggy problem once a stream was launched, is able to start the streaming with the host. But it's like it only received the first image and then completely freezes out and I can only quit the stream. But that's only what the TV is showing me, because when I use the TV controller/DualSense, let's say by moving the arrows, on the PC host, I can see the selection is moving. Actually, everything is still running, and the connection seems to work as expected. Thus, only the stream, or whatever component related to showing up the images, is frozen. Moonlight app still runs smoothly after quitting the stream.

Thus, do you think my problem could be related to the current Issue? If not, should I create another Issue?

@mariotaku
Copy link
Owner Author

Hi @vanAkim, I think it's a separated issue. FYI if you have AMD GPU, then #355 might be the cause.

@mariotaku
Copy link
Owner Author

Hello! I have some updates, I got the board and upgraded it to webOS 24 beta. However I'm unable to reproduce the issue, the cursor can be seen moving smoothly after finishing the streaming session and quitting moonlight.

Maybe that's because I only have a USB attached mouse. Does this issue affect the mouse on your TV?

@dukatan
Copy link

dukatan commented Dec 21, 2024

My 7 year old OLED model can Deal with it . Mouse us on Remote Desktop with Magic Remote . Easy and wonderful. No lags No Bug. But with the new C4 its possible :( so sad

@mariotaku
Copy link
Owner Author

Hello, I tried again with the new board (similar to B2), and haven't been able to reproduce yet.

My setup:

  1. USB attached mouse
  2. Traditional IR remote (no magic remote or wheel)
  3. Tried both absolute mouse and relative mouse on Moonlight

Steps:

  1. Launch desktop
  2. Move around with the USB mouse. Everything is smooth
  3. Press EXIT button on the remote
  4. Click "quit game" with mouse
  5. Quit moonlight
  6. Didn't notice mouse issue

@rgomezgo
Copy link

Today's check on my C3:
As I open Moonlight, try to open TV config to change audio and image modes, but it's very laggy so it takes about 10 seconds to open the menu. Then I can't use magic remote, so I have to change modes using the remote buttons. After some minutes playing, screen freezes and I have to press Home button and reopen Moonlight, but the whole TV system is laggy and doesn't react to magic remote pointer.

@tomschuetteprivat
Copy link

Hello, I tried again with the new board (similar to B2), and haven't been able to reproduce yet.

My setup:

1. USB attached mouse

2. Traditional IR remote (no magic remote or wheel)

3. Tried both absolute mouse and relative mouse on Moonlight

Steps:

1. Launch desktop

2. Move around with the USB mouse. Everything is smooth

3. Press EXIT button on the remote

4. Click "quit game" with mouse

5. Quit moonlight

6. Didn't notice mouse issue

That's what I thought, there are no issues when I use my controller to use the mouse, only when using the magic remote. So I guess the issue is related to the magic remote.

@mariotaku
Copy link
Owner Author

@tomschuetteprivat Thanks for your discovery. When you leave moonlight, is the cursor having problem with your USB mouse?
What about the ThinQ app? (It has remote cursor function, too)

@mariotaku
Copy link
Owner Author

I bought a magic remote and it should arrive before Christmas. Let's see!

@tomlavery404
Copy link

Just to add, I've had all the same issues with the buggy mouse cursor and lagging webOS interface with moonlight since updating to the latest webOS. Any mouse input at all whether it's the remote or a USB mouse would trigger the issue.

I tested build 2 linked earlier and it works perfectly again. Will stick with this build until a proper fix is put in place, thanks @mariotaku !

@mariotaku
Copy link
Owner Author

I was unable to reproduce with:

  • USB mouse
  • Magic Remote for 2023 models (MR23JP)
  • ThinkQ remote input

For now, I'll be making a new release, to temporarily apply behavior from build 2. And I'll try to make more test builds for you to test. Hopefully I can find the root cause!

@mariotaku
Copy link
Owner Author

mariotaku commented Dec 24, 2024

Test build 3 2.5

This build only applies the behavior of build 2 when the TV is running webOS 9.

https://github.com/mariotaku/moonlight-tv/actions/runs/12479804380

@Poggus59
Copy link

Poggus59 commented Dec 24, 2024

Test Build 3 2.5 works like a charm, on LG G4 TV. No more the bug, WebOs remains smooth when using or quiting Moonlight. Great job dude

@Archimedes1986
Copy link

That's great! Did you compile it yourself, or am I missing something?
If so, could you provide your .ipk file here?
Thanks to @mariotaku and merry Christmas to you all....

@dukatan
Copy link

dukatan commented Dec 24, 2024

Yes pls let us know the correct File for it.
Marry Chrismas:)

@Poggus59
Copy link

Poggus59 commented Dec 24, 2024

Here the direct link for Test Build 3 2.5 for WebOs : https://github.com/mariotaku/moonlight-tv/actions/runs/12479804380/artifacts/2358785109

@dukatan
Copy link

dukatan commented Dec 24, 2024

@Poggus59
Copy link

No official 1.6.27 was buggy for me.

@mariotaku
Copy link
Owner Author

mariotaku commented Dec 24, 2024

I'm build v1.6.28 with this patch, it should at least not causing issues to the cursor, although you'll see doubled cursor (TV's and PC's) at this moment. Please keep this issue opened until I find a complete solution!

@rvller
Copy link

rvller commented Dec 24, 2024

Hi @mariotaku! I’ve tried the 1.6.28 build with WA, but the issue is still there on my LG OLED65C3RLA with sw version 23.20.54 (webos24/9.2.1-2604)

Hopefully this info will help

@mariotaku
Copy link
Owner Author

mariotaku commented Dec 24, 2024

@rvller What about the Test Build 2.5? Also you may need a complete restart to make sure the previous version didn't affect your TV.

@rvller
Copy link

rvller commented Dec 24, 2024

@mariotaku will try 2.5 build in a bit.

With 1.6.28 build - i’ve retested it after TV full power off - issue happens.

Also, I realized that when I face the issue - TV is totally laggy and unresponcible, but if i manage to disable the magic control cursor - e.g. just start to use the up/down/left/right buttons on remote - lag disappears… sometimes it’s even stranger - after translation via moonlight - just press Home on remote - and the cursor is fine - no lag, but if I click at least once - it becomes laggy

@davidspiess
Copy link

davidspiess commented Dec 24, 2024

I tried the 1.6.28 pre-release right now and it works flawlessly for me (G3).

@Davinel
Copy link

Davinel commented Dec 26, 2024

Same here with LG G4 for me with 1.6.28 pre-release

@rvller
Copy link

rvller commented Dec 27, 2024

Hi @mariotaku, I’m so sorry, I said 1.6.28 doesn’t fix the issue, but that’s not true (I’ve somehow installed 1.6.27 before testing). So 1.6.28 fixes the issue for me too! Thanks a lot!

ps: as expected two mouse cursors are presented (pc and webos).

@swalkerumb234
Copy link

Fixed for me. Just has the big white cursor next to my mouse cursor now which is the workaround I'm guessing.
THANK YOU!

@dukatan
Copy link

dukatan commented Dec 27, 2024

Thank you. Pre Version works .
Dont forget to uninstall the old Version First .

@AlanPieczonka
Copy link

Hi there, I wanted to share that I experienced the same issue on my LG 55C31 running version 1.6.27. However, updating to version 1.6.28 has resolved the problem.

@francoislg
Copy link

1.6.28 has solved the issue for me as well! Thanks a lot 👌

@mariotaku
Copy link
Owner Author

Hello everyone using webOS 24, can you try older releases if you have upgraded to the latest firmware?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compatibility Issues or information about device compatibility input Issue about keyboard/mouse/gamepad webos-9
Projects
None yet
Development

No branches or pull requests