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

MacOS : When Retroarch is fullscreen, WindowServer consumes 190% CPU #17480

Open
2 tasks done
leskenazi opened this issue Jan 27, 2025 · 2 comments
Open
2 tasks done

MacOS : When Retroarch is fullscreen, WindowServer consumes 190% CPU #17480

leskenazi opened this issue Jan 27, 2025 · 2 comments

Comments

@leskenazi
Copy link

Is there an existing issue for this?

  • This is a bug in RetroArch frontend
  • I have searched the existing issues

Description

When Retroarch is fullscreen, WindowServer consumes 190% CPU, while when Retroarch is in windowed mode, WindowServer consumes 25% CPU.

I have an external monitor attached to my MacBook Pro.

My setup :

Hardware Overview:

Model Name: MacBook Pro
Model Identifier: MacBookPro12,1
Processor Name: Dual-Core Intel Core i5
Processor Speed: 2,7 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 3 MB
Hyper-Threading Technology: Enabled
Memory: 8 GB
System Firmware Version: 489.0.0.0.0
OS Loader Version: 540.120.3~37
SMC Version (system): 2.28f7

Intel Iris Graphics 6100:

Chipset Model: Intel Iris Graphics 6100
Type: GPU
Bus: Built-In
VRAM (Dynamic, Max): 1536 MB
Vendor: Intel
Device ID: 0x162b
Revision ID: 0x0009
Metal Family: Supported, Metal GPUFamily macOS 1
Displays:
Colour LCD:
Display Type: Built-In Retina LCD
Resolution: 2560x1600 Retina
Framebuffer Depth: 24-Bit Colour (ARGB8888)
Main Display: Yes
Mirror: Off
Online: Yes
Automatically Adjust Brightness: No
Connection Type: Internal
Acer V247Y:
Resolution: 1920x1080 (1080p FHD - Full High Definition)
UI Looks like: 1920 x 1080 @ 60.00Hz
Framebuffer Depth: 24-Bit Colour (ARGB8888)
Mirror: Off
Online: Yes
Rotation: Supported
Adapter Type: Apple Mini DisplayPort To VGA Adapter
Adapter Firmware Version: 1,03

System Software Overview:

System Version: macOS 12.7.6 (21H1320)
Kernel Version: Darwin 21.6.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 7:48

Expected behavior

WindowServer should stay at 25% CPU whether retroarch is in fullscreen mode or in windowed mode.

Steps to reproduce the bug

MacBook pro with external display

Launch retroarch in windowed mode on the external display

Image

Check Activity monitor, WindowServer process is around 25% CPU

Image

Set Retroarch fullscreen on external display

Image

Check Activity monitor, WindowServer process is around 190% CPU

Image

Version/Commit

1.20.0 (Git 6412f4f)

Bisect Results

No response

Present in the nightly version

I don't know

Platform & operating system

MacOS 12.7.6 (21H1320)

Affected Cores

No response

Environment information

Hardware Overview:

Model Name: MacBook Pro
Model Identifier: MacBookPro12,1
Processor Name: Dual-Core Intel Core i5
Processor Speed: 2,7 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 3 MB
Hyper-Threading Technology: Enabled
Memory: 8 GB
System Firmware Version: 489.0.0.0.0
OS Loader Version: 540.120.3~37
SMC Version (system): 2.28f7

Intel Iris Graphics 6100:

Chipset Model: Intel Iris Graphics 6100
Type: GPU
Bus: Built-In
VRAM (Dynamic, Max): 1536 MB
Vendor: Intel
Device ID: 0x162b
Revision ID: 0x0009
Metal Family: Supported, Metal GPUFamily macOS 1
Displays:
Colour LCD:
Display Type: Built-In Retina LCD
Resolution: 2560x1600 Retina
Framebuffer Depth: 24-Bit Colour (ARGB8888)
Main Display: Yes
Mirror: Off
Online: Yes
Automatically Adjust Brightness: No
Connection Type: Internal
Acer V247Y:
Resolution: 1920x1080 (1080p FHD - Full High Definition)
UI Looks like: 1920 x 1080 @ 60.00Hz
Framebuffer Depth: 24-Bit Colour (ARGB8888)
Mirror: Off
Online: Yes
Rotation: Supported
Adapter Type: Apple Mini DisplayPort To VGA Adapter
Adapter Firmware Version: 1,03

System Software Overview:

System Version: macOS 12.7.6 (21H1320)
Kernel Version: Darwin 21.6.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 7:48

Relevant log output

[INFO] RetroArch 1.20.0 (Git 6412f4fee)
[INFO] === Build =======================================
[INFO] CPU Model Name: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
[INFO] Capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE42 AES AVX AVX2 
[INFO] Version: 1.20.0
[INFO] Git: 6412f4fee
[INFO] Built: Jan  4 2025
[INFO] =================================================
[INFO] [Input]: Found input driver: "cocoa".
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] [Core]: Version of libretro API: 1, Compiled against API: 1
[INFO] [Core]: Geometry: 320x240, Aspect: 1.333, FPS: 60.00, Sample rate: 48000.00 Hz.
[INFO] [Video]: Set video size to: 960x720.
[INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
[INFO] [Joypad]: Found joypad driver: "mfi".
[INFO] [Video]: Found display server: "apple".
[INFO] [Audio]: Set audio input rate to: 48000.00 Hz.
[INFO] [CoreAudio3]: Using buffer size of 24576 bytes: (latency = 64 ms)
[INFO] [Audio]: Started synchronous audio driver.
[INFO] [Microphone]: Initialized microphone driver.
[INFO] [Display]: Found display driver: "metal".
[INFO] [Playlist]: Loading history file: "/Users/Laurent/Library/Application Support/RetroArch/config/content_history.lpl".
[INFO] [Playlist]: Loading history file: "/Users/Laurent/Library/Application Support/RetroArch/config/content_music_history.lpl".
[INFO] [Playlist]: Loading history file: "/Users/Laurent/Library/Application Support/RetroArch/config/content_video_history.lpl".
[INFO] [Playlist]: Loading history file: "/Users/Laurent/Library/Application Support/RetroArch/config/content_image_history.lpl".
[INFO] [Playlist]: Loading favorites file: "/Users/Laurent/Library/Application Support/RetroArch/config/content_favorites.lpl".
[DEBUG] [Audio]: Started audio driver "coreaudio3" (is_shutdown=false)
[INFO] [CloudSync] begin succeeded
[DEBUG] [Audio]: Stopped audio driver "coreaudio3"
[DEBUG] [iCloud] found 1 results looking for manifest.server
[DEBUG] [iCloud] successfully fetched manifest.server, size 6973
[INFO] [CloudSync] server manifest fetch succeeded
[INFO] [CloudSync] created manifest with 65 files
[WARN] [CloudSync] opened local manifest
[INFO] [CloudSync] created manifest with 65 files
[INFO] [CloudSync] created in-memory manifest of current disk state
[INFO] [CloudSync] finished processing manifests
[INFO] [CloudSync] wrote /Users/Laurent/Library/Application Support/RetroArch/downloads/manifest.local
[INFO] [CloudSync] finished after 3.057751 seconds, 0 files uploaded, 0 files downloaded
[INFO] [Config]: Saved new config to "/Users/Laurent/Library/Application Support/RetroArch/config/retroarch.cfg".
[DEBUG] [Audio]: Started audio driver "coreaudio3" (is_shutdown=true)
[DEBUG] [Audio]: Started audio driver "coreaudio3" (is_shutdown=true)
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[DEBUG] [Audio]: Stopped audio driver "coreaudio3"
[INFO] [Core]: Unloading core..
[INFO] [Core]: Unloading core symbols..
[DEBUG] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
@warmenhoven
Copy link
Contributor

I can't reproduce this.

Hardware Overview:

Model Name: MacBook Pro
Model Identifier: MacBookPro14,2
Processor Name: Dual-Core Intel Core i7
Processor Speed: 3.5 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 4 MB
Hyper-Threading Technology: Enabled
Memory: 16 GB
System Firmware Version: 529.140.2.0.0
OS Loader Version: 577.140.2~22
SMC Version (system): 2.44f6

macOS 13.6.9 (22G830)

Granted I'm on a slightly newer MacBook than you, and a newer OS rev. But I don't think this is RetroArch's fault, nor that there should be anything RetroArch could do to adversely affect the window server in this manner.

Also, don't use the metal video driver, use vulkan. (I tested with glcore and metal as well and still couldn't reproduce it.)

@leskenazi
Copy link
Author

I switched to the GL video driver and it fixes the issue for me, thanks for the suggestion.

Vulkan gives me a blank screen thought.

Image

Thanks for your help.

Best regards,

Laurent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants