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

Mouse cursor lagging on MacOS build? #16100

Open
ebanner opened this issue Nov 17, 2022 · 11 comments
Open

Mouse cursor lagging on MacOS build? #16100

ebanner opened this issue Nov 17, 2022 · 11 comments
Labels
invalid This doesn't seem right

Comments

@ebanner
Copy link
Contributor

ebanner commented Nov 17, 2022

Hello,

I am new to SerenityOS (just got it to build) and one of the first things I'm experiencing is my mouse cursor movement is lagging significantly

Looking at Andreas' YouTube videos, I do not see the same kind of lag, so I figure it must be with my system

Has anyone experienced this?

output.mp4

unfortunately the above GIF doesn't fully capture how drastic of a difference the mouse lagging is (edit: changed the GIF to MP4)

Also, it wasn't clear whether I should open an issue for this or ask on the discord (I read the contributing guidelines), so apologies if I'm asking in the wrong place!

@ADKaster
Copy link
Member

The answer here is most likely "hardware acceleration". If you're on an Intel Mac you can use the macOS instructions to enable hvf. If you're on an Apple silicon Mac, you're out of luck on hardware acceleration until the aarch64 port matures enough to run userspace apps.

If you do have hvf enabled on an Intel Mac, then there might be some qemu flags or settings to explore.

@ebanner
Copy link
Contributor Author

ebanner commented Nov 18, 2022

Thanks for the response!

Which macOS instructions are you referring to? The macOS build instructions don't contain any info on hardware acceleration (though I see the Windows instructions do)

@ADKaster
Copy link
Member

Hmm! That's a good question. There used to be some text about adding entitlements for qemu, but I'm not sure where they went. bd5c782 @gunnarbeutner do you know if hvf specific instructions were removed intentionally?

@ebanner
Copy link
Contributor Author

ebanner commented Nov 18, 2022

FYI I got a segfault from running the command in those instructions (I did not carefully go through the checklist above it)

% touch entitlements.xml
% codesign -s - --entitlements entitlements.xml --force /usr/local/bin/qemu-system-x86_64
entitlements.xml: unrecognized blob type (accepting blindly)
/usr/local/bin/qemu-system-x86_64: replacing existing signature
zsh: segmentation fault  codesign -s - --entitlements entitlements.xml --force

EDIT: I populated entitlements.xml with the snippet from this link and it's no longer segfaulting.

@elcuco
Copy link
Contributor

elcuco commented Nov 25, 2022

If you have an M1 ("apple silicon") you are emulating x86 on ARM, things will be slow. Some day, you should be able to run the ARM64 version, but for you - you will be emulating x86 in pure software (QEMU) - and this will be slow.

@ebanner
Copy link
Contributor Author

ebanner commented Nov 25, 2022

@elcuco thanks for the explanation, I'm running x86_64 mac

@kleinesfilmroellchen kleinesfilmroellchen added the invalid This doesn't seem right label Dec 11, 2022
@karolba
Copy link
Contributor

karolba commented Dec 27, 2022

IMO this doesn’t look invalid - I’m running serenity on an M1 Mac and even though that emulated setup doesn’t yet use hardware acceleration, my mouse input seems to appear less choppy than the one in OP’s gif.

@ebanner
Copy link
Contributor Author

ebanner commented Dec 27, 2022

Hmm perhaps not a hardware acceleration issue then...

Though, on the hardware acceleration front, does anyone know how to check and see if qemu is actually using hardware acceleration?

@karolba
Copy link
Contributor

karolba commented Dec 27, 2022

@ebanner Could you upload the recording not as a gif so we can see the problem better?

@ebanner
Copy link
Contributor Author

ebanner commented Dec 27, 2022

Sure, any preferred file format? I saw an issue recently that had a very smooth rendering within github (I think it was a gif...?).

Short of that, I could upload a mov file.

@ebanner
Copy link
Contributor Author

ebanner commented Dec 28, 2022

Here you go! I used a mp4 (thanks chatGPT!)

output.mp4

(I also replaced the GIF in the original issue comment with the MP4)

I noticed that it seemed even more laggy than usual when I was doing this recording. I happened to just finish running a CPU intensive job (converting MOV to MP4), so it seems like the bottleneck may be my CPU (I'm on a 2015 mac).

I'll run an experiment to see if CPU usage affects how much it's lagging

Update: yeah, it's significantly more laggy when I max out my CPU

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

5 participants