You are not logged in.

#1 2015-09-22 09:37:04

reygoch
Member
Registered: 2015-02-11
Posts: 9

Alsa doesn't save sound settings and Games runs slow with high CPU

I have a decent "work" laptop (6GB ram / 245 GB SSD / Intel i5 / Integrated graphics). My previous OS of choice was Windows but I switched to Arch because of more powerful tools I need for my job.

But it's not all work big_smile, and I want to play some games like Wakfu or Minecraft. Those usually ran without fan making a sound on my Windows setup but now they are very non-performant and have high CPU usage.

I first used proprietary Java from AUR, but than I switched to officially supported implementation on Arch. That made no difference.

I'm pretty sure my Intel drivers are installed and set up correctly but I could be wrong here (actually I'm hoping I am). So,... are intel drivers for linux of lower quality or have I possibly messed something up? (or is Java shittier on linux?)

One last thing. Alsa doesn't want to save my sound settings. I use "jack" headphones, and I need to unmute them every time I restart my PC. I have opened alsamixer, found my headphones and unmuted them.

Than I tried following:

reygoch [HW03] λ alsamixer 
reygoch [HW03] λ alsactl store
alsactl: state_lock:125: file /var/lib/alsa/asound.state lock error: File exists
reygoch [HW03] λ sudo alsactl store

It doesn't want to save as regular user, so I sudoed it, and than it supposedly save settings but it is the same thing when I restart my PC.

Offline

#2 2015-09-22 12:12:52

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: Alsa doesn't save sound settings and Games runs slow with high CPU

Sudo alasactl store should save the settings. If its not, there are a couple of things:
-What is the output of aplay -l (that is lowercase L). For me, having HDMI and a generic audio card caused a few issues until I forced the generic card usage. You can also change audio devices in alsamixer by hitting F6 to test first.
-Make sure you are in the audio group. THIS should help with that.
-You could try removing /var/lib/alsa/asound.state and manually specifying the save file location like so: sudo alsactl --file ~/.config/asound.state store. You could then run that file at boot via .xinitrc or simillar. Thought this should be more of a last resort imo, as it might break configuration or confuse your future self (happened to me once when I was using non-standard paths).

It sounds like your sound (no pun intended) is working though. I find it rather odd then that you're having trouble saving the config.

As for minecraft, I have no idea why it would eat your CPU, let alone how Linux handles Java applications. You could say I want nothing to do with Java. Considering every ounce of Minecraft is destructible, that might spike CPU usage. If you had better performance in Windows though, you could try running minecraft under WINE and see if it makes any difference. Other than that, I can't help you with Java/Minecraft stuff. Sorry sad

Last edited by JohnBobSmith (2015-09-22 12:13:28)


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#3 2015-09-23 08:01:29

reygoch
Member
Registered: 2015-02-11
Posts: 9

Re: Alsa doesn't save sound settings and Games runs slow with high CPU

Thanks for your reply, but it didn't help big_smile (I don't want to save to nonstandard route so I didn't try that tip). Here is my output from aplay -l :

reygoch [~] λ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC282 Analog [ALC282 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

My sound does work, but when ever I want to switch to headphones from speakers, I have to open alsamixer switch from default to Intel PCH and unmute my headphones to get sound. After that it works for a session but everything resets when I restart PC.

Offline

#4 2015-09-24 09:24:23

reygoch
Member
Registered: 2015-02-11
Posts: 9

Re: Alsa doesn't save sound settings and Games runs slow with high CPU

Ok, so I managed to figure out why Java startup was slow. I had to add my hostname to /etc/hosts file, for some reason java is very confused if I don't do that and it takes about 1 min to start any app.

Now I just need some way to fix alsa and java performance sad

Offline

#5 2015-09-25 04:55:06

gnox
Member
Registered: 2013-05-18
Posts: 90

Re: Alsa doesn't save sound settings and Games runs slow with high CPU

For alsa :
systemctl status alsa-restore
systemctl status alsa-store

If they are disabled just enable them.

If java is using too much cpu increase its heap size maybe is doing a lot of GC.

Offline

Board footer

Powered by FluxBB