• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › General Discussion v
« Previous 1 ... 147 148 149 150 151 ... 368 Next »

A question for the devs, 100% cpu in linux with nvidia drivers
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
A question for the devs, 100% cpu in linux with nvidia drivers
03-20-2014, 06:37 AM
#1
Toxicshadow Offline
Member
***
Posts: 54
Threads: 14
Joined: May 2009
I am trying to find an answer to a question that has been bugging me for a while regardning nvidia (linux) and cpu usage.

Dolphin is one of many applications that makes 1 of my CPU cores lock at 100% whenever it is running.

One developer (of FS-UAE) I breifly spoke to about the issue said that the nvidia driver sits in a busy wait loop while waiting for vblank
causing the CPU to max out. He implimented a different sync option called "swap fence" that fixed the issue.

This problem also effects Wine applications etc...

Is there a particular function within the nvidia api that is called by dolphin which polls the vblank state? Is this a known issue with
no known workaround at this moment in time?

I appreciate that dolphin is a cpu intensive emulator but I am confident that this issue is not a result of insufficient cpu as it
happens even when I am on the opening "wrist strap" screen.

Specs:

Linux Mint 16 (x86_64)
i7 @ 3.4
Nvidia GTX770 (334.21)
6 gig ram

I use gkrellm to monitor my cpu usage.

Any information that may help me research the problem or point me in the right direction so that I can contact nvidia would be
appreciated.

Thanks.
Find
Reply
03-20-2014, 04:34 PM (This post was last modified: 03-20-2014, 04:35 PM by degasus.)
#2
degasus Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,828
Threads: 10
Joined: May 2012
On dolphin, this isn't because of any driver issue. Our video thread usually waits in a busy loop for new commands from the cpu thread. We've tried to use some syncing and or sleeping here, but as the round trip time is important for performance, the busy loop was the fastest way.

btw for nvidia, there is an evironment variable to control this busy loop behavior: __GL_YIELD
http://ftp.download.nvidia.com/XFree86/Linux-x86_64/334.21/README/openglenvvariables.html

btw2: you should try __GL_THREADED_OPTIMIZATIONS=1 on dolphin
Find
Reply
03-21-2014, 05:27 AM
#3
Toxicshadow Offline
Member
***
Posts: 54
Threads: 14
Joined: May 2009
Many thanks for the information you have provided.

When vsync is enbaled in the graphics options using the following call from terminal results in a much better cpu usage with bursts at 100% instead of a constant high cpu usage:

__GL_THREADED_OPTIMIZATIONS=1 __GL_YIELD=USLEEP dolphin-emu

Hopefully this can be applied to other applications with simalar results Big Grin
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode