These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

Linux

 
  • Topic is locked indefinitely.
 

sound lag, only in Tranquility [fixed]

Author
Fraksken
The Scope
Gallente Federation
#1 - 2016-07-28 11:40:58 UTC  |  Edited by: Fraksken
Some time ago I went from mac OSX to linux. It might be important.
I am running Debian 8.5 on an imac mid 2011.

Everything works great. I would really like to thank CCP Snorlax for his invested time in the client.
Everything works great, except for the sound, going over USB and only in Tranquillity. I have tested in Singularity. There I have no problem what so ever. everything plays nicely.
I tested with :

  • the speakers of the imac: no problem.
  • analogue headset (with audio jack): no problem
  • old usb headset: laggy sound
  • brand new kingston hyperx cloud II headset ... over usb: laggy sound.


The best I can describe the issue is "sound lag". Each sound is played fully, and crisp. There is no noise and the volume is good. The sound output, however, plays for half a second and pauses for half a second, creating a very painful effect.

I understand there's no support for the Linux client from CCP. But if anybody came across this problem, please let me know. If anybody managed to fix it, please post a fix and if anybody may have an idea on how to troubleshoot this, give a suggestion.

To be clear, troubleshooting to this point has shown there is only a sound issue when connecting an USB headset and playing sound through it on the Tranquillity server. Other servers, other games and other speakers work fine.


Best regards
Ravow
Republic Military School
Minmatar Republic
#2 - 2016-07-29 03:34:33 UTC  |  Edited by: Ravow
USB soundcard/headphone are not actual audio hardware. The processing is all emulated in the CPU and the result, transfered via USB. If you use a normal wine, it will probably eat a whole CPU core and if the audio emulation drivers is running on the same core, it will do just what you actually get.

Check if you have spare cpu core doing nothing and isolate the Wine process in a specific core so it stop moving all around trashing your L1/L2 cache (not core 0), it might help. You might be able to move the USB audio processing to another core too, that I don't know, but if you don't find it, chance that it's actually running on core 0.

That's why I don't touch to emulation "hardware", especially in my case when I run like 20 VMs so spare cpu core doing nothing, don't exist.. I'm sticking to a real PCI sound card (with hardware mixer to remove the need of a sound server) and analog headset.

these two thing might fix it too :
-Search "Raise the IRQ priority of your sound card" on google, that might help if it can'f find enough cpu time..
-And put your CPU governor to performance

Edit : USB2 and 1 hove some high CPU utilisation on transfer sometime (you probably did notice by copying stuff in a USB key)
Fraksken
The Scope
Gallente Federation
#3 - 2016-07-29 06:41:24 UTC
Hey Ravow,

Thank you so much for your guidance!
I understand your analogy, though I am quite new to use wine. I'll start going through the documentation, but if you got some ready commands to achieve this, that would be great.

The machine has an 3.4GHz quad-core Intel Core i7. There is also 16GB RAM configured and it has the AMD Radeon HD 6970M with 2GB GDDR5.

As I understand correctly, the game may be trying to run everything in one core, and this is bad. it needs to get split up on several cores.

It is strange though that in Singularity this problem does not present itself what so ever. I have perfect sound there. Could it be that Singularity runs much lighter, thus causing no issues?

I'll have a look into this all now. Hope I can report back some progress.
Fraksken
The Scope
Gallente Federation
#4 - 2016-07-29 06:58:06 UTC
I can confirm that the wineserver used by the eve client (both for singularity and tranquillity) is using only 1 core. The eve launcher is using all 8 threads.
This may very well be the root cause of a lot of problems. Time to hit the wine mans.
As I understand, thanks to the recent update, I can create a new empty wine bottle and run eve from there.
I tried that yesterday, but didn't get very far. I was sad the regular UI of wine is gone.

Time to redouble my efforts and make it work.

Thanks again Ravow to point this out.
Ravow
Republic Military School
Minmatar Republic
#5 - 2016-07-29 13:51:47 UTC
It's not really wine fault, they do there best but converting D3D to OpenGL take a lot of CPU. they are trying to thread that, with the CSMT patches but that rest limited (ie, you eat two whole core instead of one because you still don't top up your video card)

The solution is usually to give CPU to the system driver by adjusting priorities and pining EVE on a specific core (with taskset).

Also, as you have AMD video card, you can try using Opensource drivers with NINE and bypass that D3D->OpenGL Shenanigans and feed D3D9 directly to your driver, freeing a lof of ressource (fps go way up) and that allow you to use to use vsync and so extra frames are converted to extra idle CPU with can fix your problem (if putting governor to performance and adjusting priority and pining EVE CPU does not work).
Fraksken
The Scope
Gallente Federation
#6 - 2016-07-29 22:20:17 UTC
Hey Ravow,
Thanks again for your reply.

After some messing around with the cores, I found there was no change running the game over the 8 threads.

I however did find following:
According to the WineHQ Sound page, this is a bug in wine, specifically for debian. What is strange to me is that it only affects the Tranquility server.



Fraksken
The Scope
Gallente Federation
#7 - 2016-08-08 19:06:06 UTC  |  Edited by: Fraksken
Read till the end before doing anything!

I gave up and ordered some jack splitters. The HyperX Cloud II headphones are connected through a 4-pole audio jack to the remote (HyperX 7.1 sound card). The sound card is connected through USB to the computer.
I took out the sound card, connected the head phone with the jack splitter and connected it analogly.
I had sound, but could not use my microphone.
Bad idea.

After looking around a bit, installing several packages and listening to a lot of bad feedback and beeps, I managed to get the sound working as it should, for all applications, including EVE.

I will recount the shortest path to get this working, but please note that this set-up is rather unique. If you have similar problems, you may also want to play with the settings a bit.

First off, Debian has 2 audio drivers installed, or that's what I understand. These 2 work together apparently.
Don't remove pulseaudio or alsa.

I advice to install the following packages:


  • USB CEC Adaptor communication Library (libcec2-2.2.0-dmo1) (I am not sure if this one is required. The name kinda hinted me to install it)
  • alsamixer (terminal app)
  • pavucontrol
  • pavumeter


First, launch alsamixer. Notice it by default being on the pulseaudio driver and device.
I changed the device to be the on-board (not the HyperX 7.1) soundcard. There I enabled anything capable of producing input (it was the S/PDIF that did the trick for me). You can move with the < and > arrows, increase/decrease volume with the up/down arrows. You can toggle input (capture) with the spacebar. you can toggle the mode with the M key.

Next I launched the pavucontrol. For me the following settings work:
Configuration:

  • Barts HDMI Audio [Radeon HD 6800 Series] (the onboard gfx card): Digital Sterio (HDMI) Output (unplugged)
  • Built-in audio: Analog Stereo Duplex
  • HyperX 7.1 Audio: Digital Stereo Duplex (IEC958)


Input Devices:

  • HyperX 7.1 Audio Digital Stereo (IEC958) Port: Digital Input (S/PDIF)
  • Built-in Audio Analog Stereo Port: Microphone


Output Devices:

  • Barts HDMI Audio [Radeon HD 6800 Series] Digital Stereo (HDMI) Port: HDMI/DisplayPort (unplugged)
  • HyperX 7.1 Audio Analog Stereo Port: Analog output


Keep the pavucontrol open and launch all your applications using sound (EVE, TeamSpeak, ...)
In teamspeak go to options => Capture and set the capture device to HyperX 7.1 Audio Digital Stereo (IEC958). Enable Continuous Transmission (just for a moment to configure pavucontrol) and click Begin Test.
In pavucontrol in the recording and playback tab teamspeak will appear.
The same will be true for EVE and any other application with an active sound stream. (Only active soundstreams. That is why we enabled Continuous Transmission in TeamSpeak. You can disable it after your settings are correct.)

Recording:

  • Teamspeak: HyperX 7.1 Audio Digital Stereo (IEC958)


Playback:

  • TeamSpeak: HyperX 7.1 Audio Digital Stereo (IEC958)
  • c* Music Player: HyperX 7.1 Audio Digital Stereo (IEC958) (this is my music player)
  • exefile.exe HyperX 7.1 Audio Digital Stereo (IEC958) => This is EVE



Discard all what is above. It's wrong.

The following is the way to get the correct sound output:

Disable the USB audio (HyperX 7.1 audio: Off) in pavucontrol
Enable the built in sound.
Start EVE. You will get nice, non-shaky sound through the speakers.
Go back to pavucontrol and enable USB audio (HyperX 7.1 audio: Digital Stereo Duplex)
Disable the built-in sound and in the playback tab make sure the sound is set to your USB device.

Finally. This works.

Edit: This has probably to do with the audio stream being started with different parameters.