Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / High pitched whine, usually above 800x600 - anyone else get this?

Author
Message
Neco
18
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Waterloo, Wisconsin USA
Posted: 25th Apr 2010 23:31 Edited at: 25th Apr 2010 23:33
I'm really at a loss as to why this is occuring, other than to say I strongly believe it is something about the way DB itself handles setting the display mode?

The sound is clearly coming from my Tower, as turning off both my monitor and my speakers do not dampen the noise, and I can tell by simple proximity it is coming from the Tower.. I am suspecting its GPU related, but again I am at a loss as to why it is happening.

It doesn't matter what the screen mode is (Windowed, Windowed full screen desktop, full screen dedicated, etc) but when it is said above 800x600 I will start hearing this noise, until I close my DB program..

It will go away if I set a SYNC RATE, or specify SYNC OFF but obviously that would produce complications for the speed a program might run at, etc.. And it seems using high resolution timers is more encouraged for consistent performance vs SYNC limiting as well.

For instance, I did a search for line wrapping code, as I will definitely need this for my TextRPG project.. One piece of code I tried out was from this thread

http://forum.thegamecreators.com/?m=forum_view&t=75810&b=6

Setting SYNC OFF, or a SYNC RATE clearly impacts the performance of this example (and I don't know if its because its outdated or whatever) where the wrapped text produces several lines, that are drawn slowly, as opposed to immediately just showing up as most normal stuff would..

I also had an issue with TDK's example:
http://forum.thegamecreators.com/?m=forum_view&t=122891&b=6

Pasted as is into DBpro and run, it shows a blank screen until the window itself is either moved, or I hit enter.. commenting out the SYNC ON / RATE code fixes that issue however.. The whining noise is of course there.. TDK's example will also perform faster than the previously noted example linked above.. But definitely is impacted by SYNC being declared at any value as well (on/off / rate / whatever)

Sync Off makes it slow as a lead brick also.. So I know the performance issue is likely due to my not understanding much about how SYNC works.. But it seems setting SYNC OFF, or SYNC ON: SYNC RATE is the only way DBPro will NOT make this noise in resolutions above 800x600.. And to introduce more weirdness.. TDK's example will exhibit the whining noise even at 800x600 windowed or full screen..

I can run any other program or game, watch a video, etc.. And I never encounter this problem.. So I am really wondering if people know about this, and know what it is about DBPro's display mode methods that may be causing it - and any potential work arounds?

If its a weird bug from an old version that would be nice to know... although I -should- be fully patched to the latest non-beta version (despite my DBpro editor claiming otherwise via the help menu)..


Hope I didn't put anyone to sleep with this long post... but this is a problem that is bugging me to no end, as I can't develop a game or play test it at all with these kinds of issues happening. Hope someone has an idea or fix

sladeiw
17
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 26th Apr 2010 00:28
Disclaimer: What follows is only an `educated` guess!

Possibly refresh rate related.
What OS & video card do you have?
If you have XP you can go to display properties - settings - advanced - adapter - list all modes. From there you can choose all the refresh rates that your video card & monitor can support. Try a few different refresh rates in a mode above 800x600 and see if you get the same noise.
Neco
18
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Waterloo, Wisconsin USA
Posted: 26th Apr 2010 00:38 Edited at: 26th Apr 2010 00:41
I have Windows 7, x64.
8800GTS 512MB, latest drivers, DX, etc.. Seems only DarkBASIC apps do this though.. even some examples from the help files (well the ones I could ge to run, anyway).

SyncMaster XL2370 (LED backlit), 1920x1080 native. Refresh rate choices in native are 59/60 hz..

I'll see about playing around with the resolution and refresh rates, in a little bit.. But I still don't understand how that would affect an application running in a -window-

sladeiw
17
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 26th Apr 2010 00:43
Not that then

The other thing maybe is PSU, when a dbpro app runs it grabs 100% cpu (or core) usage, which can cause a high-pitch electronic `whine` from the PSU as it is put under increased load. Do you get the same from a high-spec game? What wattage PSU do you have?
Neco
18
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Waterloo, Wisconsin USA
Posted: 26th Apr 2010 01:06 Edited at: 26th Apr 2010 01:09
I have an Antec Neopower 550W. It's SLI certified, although I am only running a single GPU, but I do have the CPU overclocked from 2.13 to 3.2Ghz. Very minor bump in the Northbridge, and CPU voltage to keep it stable. Admittedly I do have concerns it could be either the GPU or PSU starting to show age after a couple years, but I'd rather not believe it at this point, since the problem only seems to occur with DarkBASIC based applications..

Otherwise the rig runs fine. I've never had any other games do this, the most recent I've run is Dragon Age Origins. I've also done plenty of video encoding via Avisynth using CPU intensive filters (stuff that makes it crawl at 5fps or less)and x264 encoding, etc.. In my experience video coding is much more brutal on an overclocked system than any game ever has been, as I know from past experience an otherwise stable system will still lock up under strenuous encoding..

That being said.. I will also revert my O/C back to default speeds as well to rule it out. But in general no other applications I've had, have caused this to happen.. Even previous versions of DarkBASIC that I've played around with in the past (I think from the 6 or 7.x line) I don't recall causing this issue..

Perhaps I'll also try the beta version linked on the forums to see what it does as well.. And as a last resort, when my Dark Game Studio package finally arrives (seems I don't get DarkGDK until I get DGS), I can try and find some Visual C++ code demos that set resolution and / or 3D via C++ commands and not DBPro to see what happens then as well.

Even more than my system annoying me, it bothers to think of the potential problem I could have with users complaining about the same issue and not knowing what to tell them / how to fix it..

So I guess I'll report back as I slowly check things off the list.

As one last note.. I did find and play around with some camera code (I think it was another example from TDK.. blue background and green "grass" with some dots/texture on the grass) and if I rotated the camera so the ground was out of view and the screen was pure blue - the whine would dissapear..

However just moving around, etc it would oscillate to all different kinds of pitches.

James H
19
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 26th Apr 2010 01:49 Edited at: 26th Apr 2010 01:58
You should determine exactly where the high pitched whine is coming from - I would guess its the fan in your graphics card or motherboard fan; nvidia drivers usually set fan speeds at 30% by default with automated control of the fan speed based on the gpu temperature. However I would think other games would also heat the card up, so it really depends on how demanding the games are on the gpu. For example BF2 on highest settings at 1024*768 won`t heat the gpu beyond 60 degrees on mine, so the fan never speeds up beyond 65% when playing - the noise only becomes highly noticable above 70%. I reckon that 800*600 is a little too soon to start kicking the fan speed up though; so it could be a fan thats either faulty or dieing from wear and tear which is making a lot of noise when spun beyond a certain rpm, which may be quite low. I don`t think its the psu though because dbp grabs 100% cpu usage whatever the resolution - which would also rule out the cpu fan. It could be a fan covering the northbridge on the mother board; on my motherboard it is auto controlled - I know that with my old motherboard which was exactly the same board as I have now, it had a fault on the board that meant the mcp northbridge temperature ran hot all the time and affected the throughput of data for the top pci-e slot only. I could plug my card (8800gt) into the affected slot and games would run for a few minutes then the system would freeze and the screen would be garbled with an almost uniform pattern of mess - apparently typical for such a problem. If I plugged it in the other slot everything was fine. (The affected slot was slot 1 though they are designed to work independantly). In my case the fan over the mcp was fine but the mcp was faulty when I got it.

Edit - although its been best part of an hour I missed your last post.
Quote: "...if I rotated the camera so the ground was out of view and the screen was pure blue - the whine would dissapear..."

Sounds like the less gpu strain the better.
Quote: "However just moving around, etc it would oscillate to all different kinds of pitches."

That could still be a fan but it also sounds like elctrical interference - could be that overclocking - I have 680i lite SLI and when I overclocked my cpu I found that I could not have the option spread spectrum on in my bios. This sounds like it could be the culprit.

Also do what nightmare says in the next post.
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 26th Apr 2010 01:52
If you want to rule out a fan problem, try speeding them up in speedfan to see if they make the same noise you're hearing.

Rawwrr. Sig Fail.
Newcastle is awesome
Hodgey
16
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 26th Apr 2010 02:09
Hi, I get the same whining problem as well, and as you said a sync rate will fix it. I've learnt that a sync rate of 60 is generally consistent with minor changes in fps.

I checked the cpu usage on a program that created the whining noise (one without a sync rate, see below) and one with a sync rate. The one with a sync rated used less cpu usage, about half that of the program without a sync rate.

Without sync rate, higher cpu usage, creates whining noise


With sync rate, lower cpu usage


I think using the sync commands everytime you (and I) have a loop should be beneficial.

I don't know why the sync commands would be impacting on the text wrapping example though.

A clever person solves a problem, a wise person avoids it - Albert Einstein
Neco
18
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Waterloo, Wisconsin USA
Posted: 26th Apr 2010 02:29 Edited at: 26th Apr 2010 02:32
Those are interesting results Hodgey, glad to know I'm not the only one with the problem though..

I seriously doubt this is a fan issue also.. My NB does not have a fan. My CPU Heatsink is a Noctua NH-U12P with two 120mm low speed Noctua fans in push pull (as well as push pull Noctua intake/exhaust). They are not controlled by PWM or anything like that.

My GPU fan does not spin up during this issue - nor would I expect it to.. It is one of those blower ones that you know you hear when they spin up as well.. The noise is distinctly electrical in nature, much like any high pitch whine you might get from a CRT TV, etc. Although that may beg the question, maybe my fan speed is set too low and the temp its sitting at is "getting to the card" on the whole..?

I can understand GPU strain, but again a simple script such as the following...



Will cause it to start emitting that whine.. Yet any other highly intense 3D game will not so much as produce a peep from my computer... SYNC RATE 60 or SYNC OFF will fix it... So it is all just very weird, imho.. It just sucks because I am a really bad pessimist.. Anything that can go wrong will happen to me.. i.e I finally invest $100 in DBP and some plugins, and before I can even begin developing I get smacked in the face with this annoying issue


Will have to wait until tomorrow to do any real further testing though as I need to shower and head to bed so I can get up for work.. Will definitely test @ stock Mobo/CPU settings tomorrow though and report back.

sladeiw
17
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 26th Apr 2010 02:40 Edited at: 26th Apr 2010 02:40
Quote: "
try speeding them up in speedfan to see if they make the same noise you're hearing."


Definitely worth trying that, although I assumed the noise you're hearing is not a fan noise - you seem pretty clued-up and your PC is obviously not something you picked up at PC World! In my experience there is a very distinct difference between fans whining and electronic components.

One easy check is how the sound emerges. Fans will `ramp up` over a period of time (seconds to minutes), electronic interference or similar is more likely to just `appear`.

On all 3 of the PC's I run DBpro on, you only need a 1-line program - "Wait key" to eventually make the fans spin up because (I'm assuming) that DBpro runs a 100% loop waiting for the key to be pressed, rather than a system-friendly wait for a Windows message. (Thus all IanM's `nice` command versions)

edit: posted before seeing above post!
Hodgey
16
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 26th Apr 2010 02:54
I found the results interesting as well Neco and another thing I forgot to mention, I get the whining noise when the program runs at 640*480.

Just curious, did you recently buy your PC or have you had it for a while? I've had my laptop for about 3 months and all of the other computers (that i have used DBPro on) haven't made this noise ( they were laptops as well ).

A clever person solves a problem, a wise person avoids it - Albert Einstein
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 26th Apr 2010 02:55
I have exactly the same problem from time to time, and i learned to do not show to PC that i notice it at all
Recently i made repair on my mobo and if this noise, is some side effect, that`s bad.Anyway i`m waiting quietly for something to burn or give up completly.I`ve learned to live with this.Can`t isolate the noise to see which part is the singer, i hope not the HDD.

Where there is a will, there is a way.
I often edit my posts, that`s who i am
Neco
18
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Waterloo, Wisconsin USA
Posted: 26th Apr 2010 02:59
I've had my core components (mobo/cpu/ram) for a year or two now at the least I think. I buy and switch out stuff as money allows, if I want/need something better.

Interesting note on wait key

I tested a script with that.. GOt the whine - then commented out the wait key command, looping a print statement endlessly..

No whine.


Also.. SET WINDOW SIZE instead of SET DISPLAY MODE produces no whine.. but the text seems to scale with it.. that may be offset by setting a different font/size though..

a blocking input command (INPUT variable$) also causes this whine to occure, just like the WAIT KEY command.. The only commonality I can obviously see is that they both block.

Neco
18
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Waterloo, Wisconsin USA
Posted: 26th Apr 2010 03:08
Ok ignore all that...cause now it doesn't

THIS IS WEIRD... ARGH!!

/goes to bed.... gonna have to learn to use SYNC RATE apparently!

Duke E
17
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 26th Apr 2010 03:31
It is a fairly common problem with graphics cards. The capacitors resonates & interferences on high loads. Like two tuning forks on a slightly different frequency beside each other that makes a third tone.
It is not harmful (overclocking can be though )

Regards
Mistrel
Retired Moderator
20
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 26th Apr 2010 04:15 Edited at: 26th Apr 2010 04:16
The sound you're hearing is from the memory chips on your graphics card. Depending on the type of load I put on the card my 8800GTS 640mb had the same problem. The problem persisted across three different 8800GTSs I tried. Replacing the PSU with a more powerful one didn't have any effect either.

I upgraded to a 9800GT 1024mb card and the sound, though still exists, is silent enough that I don't notice it unless I put my ear to the card.

Airslide
21
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 26th Apr 2010 06:47
I've been working on my GUI in DBP and noticed a very quiet but still noticeable whine myself and was thinking about making a thread before I saw this...

What's weird is that it goes away when I hold down a keyboard button

Mistrel
Retired Moderator
20
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 26th Apr 2010 07:20
If you want to know exactly where the sound is coming from roll up a piece of paper into a funnel. Put the large end to your ear and move the small end around your video card until you find the loudest spot.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Apr 2010 14:24
I get the same problem when I run my programs uncapped at a very high fps, e.g. 1000 fps. The manufacturer said it's the GPU when I asked them. The problem disappears if I cap the fps to a sensible value - you never need more than about 60 for smooth graphics in a game.

But you might want the extra fps if you're using your graphics card as a high speed parallel calculator.
JLMoondog
Moderator
17
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 26th Apr 2010 15:57 Edited at: 26th Apr 2010 15:57
I get the same noise when playing resource demanding games, I usually play on highest settings because I have a Radeon HD card and it makes pretty pictures.

One thing I notice is it gets louder the more that is on screen, especially when there are shaders in play. Weird thing is when I'm playing a game in DX10 mode it makes less noise then in DX9 mode.


Neco
18
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Waterloo, Wisconsin USA
Posted: 26th Apr 2010 16:56
That does make perfect sense to me Green Gandalf. I know a lot of game engines these days also are capped around 60 as well, so perhaps not why I pick up the whine with other stuff.

And I don't think I'd have an issue with using SYNC and learning/remembering to get it into my game loop, but at the same time it seems some people care for it and others don't use it at all.. Just curious about that from a development standpoint I guess.

I know the problems with including sync in relation to the example code in my first post I will have to try and figure out. Cause you can't have a bunch of text without line wrap

Jeff Miller
21
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 26th Apr 2010 17:12
One way around the issue of the problem occurring during a Wait Key command might be to try IanM's NICE WAIT KEY command, in his Matrix Utilities collection. It has always worked well for me.
Bloodknight
16
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 26th Apr 2010 17:16
The high frame rate is the min cause, if you have some kind of FPS counter youll see how the tone changes. So this is almost exclusively an issue with better cards, i first noticed it on the 8800GTX (i skipped 7000 series completely so not sure if they had the same issue)

The problem with V-Synch is it only works on full screen, not in windowed applications, the problem also seems to be worse in vista/7 than XP although i didnt actually track the issue on my XP machine.

If i created a small function to modify the camera view sequences i could probably get the graphics card to play the national anthem with its capacitors
JLMoondog
Moderator
17
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 27th Apr 2010 10:23
Quote: "If i created a small function to modify the camera view sequences i could probably get the graphics card to play the national anthem with its capacitors"

That would be epic.

Anyone else miss the Hard Drive drum core?


Neco
18
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Waterloo, Wisconsin USA
Posted: 27th Apr 2010 16:57
I love the noises some old hard drives used to make..

At least you knew it still worked!

CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 29th Apr 2010 03:41
High pitched whine, hey? Perhaps my ex girlfriend is in your PC...

Mine does the same thing. I used SYNC RATE 60 at the start of my app and it got rid of it.

Login to post a reply

Server time is: 2026-07-26 04:26:47
Your offset time is: 2026-07-26 04:26:47