LinuxMCE Forums

General => Users => Topic started by: purps on August 20, 2013, 11:04:39 am

Title: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 20, 2013, 11:04:39 am
...until you press either up or down, and then it immediately jumps back to the standard nominal level. Very strange, and gave us all quite a fright! I ran alsamixer and the master volume would be on say 60. Play media, it immediately goes to 100. Press either up or down, and it will then immediately jump back to 62 or 58 or whatever.

I tried re-running the AV wizard, which was interesting because that started off on maximum volume as well... until I changed the level, and again it jumped back down to a much lower volume. It didn't fix the problem.

Haven't tried anything else. Has anybody else seen this?

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: _if_ on August 20, 2013, 11:50:18 am
yes I had that as well but then I got me an AV receiver and the issues went away.

btw. I believe that AV wizard is supposed to switch all inputs to 100%...

greetz
IF
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 20, 2013, 12:56:38 pm
What is this AV receiver then? I'm not entertaining the idea of buying one, just wondering if it would help diagnose the problem if I knew what it was. I guess it just bypasses your sound card?

I didn't appreciate that the AV Wizard did that. One thing I do know, is that in the past my amp has always been turned up quite high (always have to turn it down quite a lot when I put a record on using the other amp input), but when this issue I'm having now arose, the windows were shaking, I had no idea it could go that loud. Before I put it down to a "crappy sound card" that needed amplifying.

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: jamo on August 20, 2013, 02:08:05 pm
I have experienced the same. Also, if I'm on a playlist and it's automatically moving between songs then the volume setting stays but if I manually change or add a new song then it also displays this behaviour - jump to 100%, then on up/down command, jump back to where it was.

Regarding the AV receiver - basically I think the reason this is different is probably because it's using digital audio so the volume setting is not on the MD but rather on the receiver. Digital audio does not have a volume setting at all.

It's a bit of a pain (the issue) and has also made me look like a bit of a tit when the sound suddenly blasts ;-)

I would suggest watching the logs as you do this and see what messages are being sent as the song changes. ...
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 20, 2013, 04:20:12 pm
Was this following a recent upgrade for you too, jamo?

Thanks for the warning about the music playlist! Didn't think about that. Wouldn't have made for a relaxing dinner this evening.

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: jamo on August 20, 2013, 04:26:47 pm
Was this following a recent upgrade for you too, jamo?
By recent, a few months, I'd say. Put it this way - I wasn't aware of it in the past but have become aware of it more recently so something must have changed somewhere... 
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: posde on August 20, 2013, 05:43:27 pm
Are you guys connected via analog or digital, i.e. does the receiver gets controlled for volume, or the soundcard
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 20, 2013, 05:48:34 pm
Sorry should have said - analogue. I control the soundcard for volume. My amp is not controlled by LMCE.

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: tschak909 on August 20, 2013, 06:34:33 pm
Seriously, dealing with all our users special edge cases, is going to drive me to some serious drinking and drug use.

-Thom
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: posde on August 20, 2013, 07:22:25 pm
Thom,

since when is an analog soundcard a special case?!

purps,

seems there is a bug. See if you can find out more what happens in the router log.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: tschak909 on August 20, 2013, 07:26:35 pm
Specifically, look for calls to your media director's App Server, as this is what sets the mixer settings in DCE land.

-Thom
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 20, 2013, 09:11:38 pm
Sorry, I was just reporting what I thought was a potential issue, which it looks like it is. Now that is established (and it's not just me being a wally), I will make a ticket.

(FYI it's a valve amp, so while on/off is controlled by a plugin module, I don't want it to be any more "integrated" than that because I need to turn it on early so it can warm up).

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 21, 2013, 11:31:54 pm
Ticket created http://svn.linuxmce.org/trac.cgi/ticket/1878

Router log, MD in question is "living room" (moon102).http://pastebin.com/ihLd2guh

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: tschak909 on August 21, 2013, 11:35:49 pm
I'm wondering, if you run alsamixer in an ssh window, does the master value change spontaneously?

-Thom
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 21, 2013, 11:48:18 pm
It does indeed (should've mentioned that), and as soon as I press volume up or down, it instantly jumps back down to the correct level.

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: tschak909 on August 21, 2013, 11:49:41 pm
Keep it up there, and make note of when it jumps back up. It'll help me track this down.

-Thom
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 22, 2013, 12:03:22 am
It only ever jumps up to max when I play any media. The level is normal, then I press 'play', and bam it's at max less than a second later (according to the MD's alsamixer).

I will post a new log without pressing any volume controls (if that's what you're asking?).

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: tschak909 on August 22, 2013, 12:06:27 am
yup, that would help. It seems we're doing something _really_ stupid.

-Thom
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: Crumble on August 22, 2013, 12:18:15 am
LOL @ thread!   Come on Thom let us in on the funny.  What is stupid?  In english though please.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: tschak909 on August 22, 2013, 12:22:38 am
by WE I mean the guys writing the code.

-Thom
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 22, 2013, 12:37:37 am
Well I made my contribution... and checked I wasn't sitting on the remote control or anything like that  ;D

New log, so I played a video for about 1 minute, and then pressed a volume button, and then killed it.

FYI just killing it, without pressing a volume button, keeps the master level at 100% according to alsamixer.

http://pastebin.com/j7KdTZWR

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: tschak909 on August 22, 2013, 12:41:48 am
purps - as a test, can you do the following,

In the web admin:
Advanced > Configuration > events > create advanced event

Type whatever you want in the description, select Media Player > Watching media, or Listening to media, for audio or video respectively.

create, you'll see the event in the list, select Criteria

select Create new segment

Select FK_EventParameter

next to event parameter, Select FK_Room

Select the appropriate room.

Then save. The criteria is now defined.

click on Edit Event Commands

under Device, find your App Server, that is the child of your media director, and select it.

Then use the Set Volume command

In the volume device data, put in a number. click save.

Reload router.

Play something, see if your volume value sticks.

-Thom
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 22, 2013, 01:21:31 am
I am afraid it does not - still jumps to 100%. Pretty sure I did all that right.

I'm hitting "Test command" for the Set Volume aspect of the event, and it's not changing the volume level according to alsamixer - is that a problem? That should work, shouldn't it?

In case it's relevant, I also tried using MH Set Volume (via Media Plug-in on the core) for that part of the event, but that doesn't work either (either with the 'Test command' button or when playing media).

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: tschak909 on August 22, 2013, 02:53:12 am
If you see the command happening in DCERouter.log, then the volume jump is happening AFTER the watching media event.

hm.

-Thom
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 22, 2013, 07:07:39 pm
http://pastebin.com/s9rgnkym

This log is with the watching media test event in place. Again I let the media play for a minute without touching the volume buttons (it jumped up to 100% as before), but after 1 minute I did the "Test Command" button for the volume level - the volume level stayed at 100%. Then I pressed a volume button, and then I killed it.

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: phenigma on August 22, 2013, 07:40:05 pm
I have had this happen to me after an upgrade perhaps twice in 5 years.  I did a little checking at the time but was unable to determine the cause.  In both cases rebuilding the MD from the webadmin fixed the issue.  :)

J.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: tschak909 on August 22, 2013, 07:44:55 pm
If what phenigma says doesn't help,

can you please temporarily rename /usr/pluto/bin/SoundCards_AudioVolume.sh to something like SoundCards_AudioVolume.sh.disabled?

And see if the problem persists?

I'm looking to see if one of the sound card scripts is the cause.

Don't forget to rename it back.

-Thom
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: jamo on August 22, 2013, 08:54:03 pm
Hi Thom

I tried renaming /usr/pluto/bin/SoundCards_AudioVolume.sh as you suggested. Afraid it doesn't seem to stop the problem happening.

Will try the MD rebuild now.

How about you, Matt?
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 22, 2013, 10:10:00 pm
As it happens, I was just carrying out the MD rebuild as per phenigma's advice in this thread http://forum.linuxmce.org/index.php/topic,13350.0.html

(Hadn't done it up until now as we were troubleshooting this volume issue).

So I ran Diskless_CreateTBZ.sh and rebuilt the MD. Same issue. Probably not relevant, but now the PCM volume level doesn't appear in alsamixer - only the master.

The dist-upgrade I was trying to do originally now works without any errors incidentally, so now both my core and MD are bang up to date.

I also tried renaming SoundCards_AudioVolume.sh, and the issue persists (I assume this was to be done on the MD, not the core).

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: phenigma on August 22, 2013, 10:15:03 pm
So I ran Diskless_CreateTBZ.sh and rebuilt the MD. Same issue. Probably not relevant, but now the PCM volume level doesn't appear in alsamixer - only the master.

:(

J.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 23, 2013, 10:43:12 pm
I upgraded another MD (slightly different hardware, it has an nVidia onboard soundcard as opposed to intel) to see if it would have the same issue, and it does. Probably doesn't help, but there it is.

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: phenigma on August 24, 2013, 06:41:20 am
wtf?  Does  a rebuild on that system have any effect?

J.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 24, 2013, 05:59:06 pm
Nope, sorry should have said I rebuilt it. The first MD was rebuilt as part of that dist-upgrade issue. Had the same dist-upgrade issue with the MD I'm talking about now, but that's neither here nor there, I wanted to rebuild it anyway to see if it sorted the volume issue, and it didn't. To summarise:

MD without upgrade or rebuild - no volume issue.
MD upgraded (with those pluto errors), no rebuild - has the volume issue.
Rebuilt and re-upgraded (solving pluto errors) - has the volume issue.

Consistent with both MDs.

FYI I have another MD which is identical hardware-wise to the first one, which I haven't yet upgraded and doesn't have the issue, just in case it's useful for any troubleshooting.

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: phenigma on August 24, 2013, 07:10:18 pm
Okay.  I'm grasping here.  Do you have any audio pipes setup on these MDs?

I could be way off, but here's my current working theory:

App Server only controls the volume when there are no audio pipes defined.  If you define an audio pipe then app server will set a volume level on the analog card and pass volume commands to the device defined by the audio pipe.  I can only speculate that app server may think it is not the audio controller and therefor setting an arbitrary value and ignoring the volume commands.

???  tchak?  Does that sound plausible at all?

That also doesn't explain why this has happened after an upgrade, unless something got changed in the DB, hence my pipe questions...  grasping.

J.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: tschak909 on August 24, 2013, 07:30:29 pm
Yes, this sounds about right...

-Thom
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 24, 2013, 07:43:31 pm
Volume commands are not being ignored. When the volume jumps up to 100% when media is played, and then pressing a volume button brings it back down again. Then, the volume buttons are working normally.

No audio pipes. The first MD has the amp coming off the soundcard (i.e. analogue). The second MD is the same (i.e. analogue), as it's just a monitor with built-in speakers.

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 24, 2013, 07:52:10 pm
I just removed my TV (connected to the first MD, living room) in LMCE admin, reboot and then set it up again from scratch so there was an audio pipe in place.

Same issue, volume jumps up to 100% according to alsamixer. However, pressing the volume doesn't bang it back down again (not surprising, as the volume buttons are controlling the TV due to the audio pipe, right?).

I then removed the audio pipe as per my normal setup, and same issue.

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: phenigma on August 24, 2013, 08:39:14 pm
Try this:

edit the /etc/pulse/daemon.conf and set "flat-volumes = no", reboot.  Let me know if that has any effect.

J.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: tschak909 on August 24, 2013, 09:06:32 pm
oh no, are we being bitten by Pulseaudio?!

grrrr....

I mean, we do need to move to it at some point, but....grrrrr.....

-Thom
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: l3mce on August 24, 2013, 09:09:10 pm
No... this is me

It has to do with set vs change audio. Something I am doing to make sure audio isn't a problem, somehow the old value is stuck. Ill fix it.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 24, 2013, 11:40:09 pm
Try this:

edit the /etc/pulse/daemon.conf and set "flat-volumes = no", reboot.  Let me know if that has any effect.

J.


I actually went to try this first, thinking it was a Pulse Audio issue... but was straight away thwarted when I found that daemon.conf didn't exist.

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: phenigma on August 25, 2013, 12:05:54 am
Ah.  Okay.  It does on my core.  Pulse may be configured for per user mode on the mds.

J.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 27, 2013, 02:44:16 pm
Ah.  Okay.  It does on my core.  Pulse may be configured for per user mode on the mds.

J.

/etc/pulse/daemon.conf doesn't exist on my core either!
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: phenigma on August 27, 2013, 06:32:59 pm
/etc/pulse/daemon.conf doesn't exist on my core either!

Well, that's not the problem then.  It sounds like it's L3's audio change.

J.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: l3mce on August 28, 2013, 05:35:38 pm
Please edit /usr/pluto/bin/SetupAudioVideo.sh and hash out "alsactl store" on lines 166 and 170. Also /usr/pluto/bin/AVWizard_Run.sh lines 437 and 476 for good measure... then reboot. Should fix this.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: tschak909 on August 28, 2013, 06:36:43 pm
Is there a corresponding alsactl restore somewhere that also needs to be pulled?

-Thom
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on August 28, 2013, 11:02:59 pm
Hate to be the bearer of bad news, but I'm afraid it hasn't worked.

l3mce, I carried out your instructions just on the MD, and rebooted. When that didn't work, I did it on the core as well (I assume this shouldn't be necessary). I turned everything completely off just to be sure before firing it all back up again.

Cheers,
Matt.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: l3mce on August 29, 2013, 05:32:30 am
Is there a corresponding alsactl restore somewhere that also needs to be pulled?

-Thom

Well I cannot have forever funked ALSA by throwing a store or two at it. On reboot that shouldn't matter for shit. You can't hoze ALSA throwing a store val once... can you?
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: jamo on August 29, 2013, 08:14:32 am
Please edit /usr/pluto/bin/SetupAudioVideo.sh and hash out "alsactl store" on lines 166 and 170. Also /usr/pluto/bin/AVWizard_Run.sh lines 437 and 476 for good measure... then reboot. Should fix this.
Thanks! Will check this out and let you know.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: l3mce on December 09, 2013, 05:50:20 am
Hello ladies.

I am back and done fixeded it. Turns out that my entire routine for audio was pissing off Xine_StreamFactory, which is looking for hard coded values, which I expanded to handle a lot more HW by assigning a device number. I then also reorganized the whole scheme so it wasn't finding anything it was hard wired to receive. Shockingly this was the only side effect of not looking where I was going or came from.

Bumbling through code is fun, but unwise. Good idea to grep source for everything you are toying with.

It is fixed in 1204. Will backport and pos will cook a package in a day or so. Will just need to update pluto-boot-scripts and it won't plague you further. Sorry for the trouble.

Big ups to phenigma for finding the prob.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: jamo on December 09, 2013, 07:47:58 am
Awesome... thanks for this l3 and phenigma. Can't wait to try out 12.04 as well.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: phenigma on December 09, 2013, 03:01:48 pm
Thanks L3!  Glad I could help and I'm glad we were able to finally find the issue!!

J.
Title: Re: Following upgrade, media on MD starts at maximum volume
Post by: purps on December 09, 2013, 03:09:43 pm
Thanks awfully chaps! Will retry upgrade in due course.

Cheers,
Matt.