Kodibuntu sound and Linux weirdness in general
#1
First of all I would like to say that I resolved the issue I was having with there being no sound in desktop mode. I would also like to say that I've been using Kodi for awhile on various computers, and when it works, it works fine and I like it. But when it doesn't work, god help you if you're normally a Windows user.

I'm posting this not because I solved the issue, but because I have no idea how I solved it. In fact technically it should not be working yet now it is.


Okay lets start at the beginning. I was using an old Dell Optiplex GX-620 as a general purpose video player and YouTube machine, running Kodibuntu. It worked well for what it was, but a Pentium 4, even a high end one (3.4 Ghz) just doesn't have the horse power for YouTube anymore. Well I had a Socket FM1 CPU that I got for free and a spare stick of DDR3, so I decided to purchase a suitable motherboard and build a system with better horse power.

I purchased an MSI A55M-P33 motherboard, put the CPU (technically APU, an AMD a3400) into it, 2 GB of RAM, an old PCi WiFi card and it was ready to go.

Except there was no sound.

My first troubleshooting step was to reinstall Kodibuntu from scratch. I had initially just taken the hard drive from the GX-620 and popped it in the new machine. Linux being generally okay with moving from one chipset to another I figured I'd pop in the HDD and that would be the end of it. But it wasn't, so I formatted and reinstalled. That didn't fix the issue.

Eventually after trying various things inculding updating Kodi to 16.1, and verifying that the sound hardware did indeed work by installing an old copy of Ubuntu, I formatted and reinstalled Kodibuntu again. Using tips from this forum I got the sound to work in KODI itself. The issue is my new motherboard technically has two sound cards, one HDMI and one analog... weird since this board does not feature an HDMI port, but moving on...

I now had sound in Kodi proper, but the desktop mode still did not have sound. I tried playing with settings in alsamixer, no luck. Then I saw the post about creating a file in the /etc folder asound.conf I believe.

So I set out to try that but there was another problem. By default the kodibuntu installation does not have a text editor as far as I can tell. So I went to the package manager and picked one to install with an easy to remember name... kwrite. So just install that and simple, right?

264 MB of packages later... all that just so I can make a text file? And being a Windows user I expected the new program to appear in the "start menu" or some kind of shortcut or icon that I could click on to open it. Nope! Had to open it from the terminal.

Now here is where it gets really weird. I followed the steps to make the asound.conf file, but when I went to save it, I was denied due to permissions... I should have done sudo kwrite I guess. However then I heard a blip and saw a notification for a multimedia device. Went to YouTube and sure enough the sound was working!

Sound now works in Kodi and the desktop mode, but there is no asound.conf file. I checked the /etc folder, looked for hidden files, and it is not there. Sound continues to work even after rebooting the system. There's no volume control, but running alsamixer I can adjust it.

So how the heck did I fix it? And, this is a question that goes back to ~2001 back when I first tried Mandrake linux... Why is linux in general still so weird and user unfriendly in certain spots after so many years? I mean it has gotten a bit better and if you're going to use it for a few specific tasks you'll be fine, but dig deeper and it's still a nightmare.
Reply
#2
Take a look at this:

http://forum.kodi.tv/showthread.php?tid=...pid2202824

You either need pulseaudio to have sound while in desktop mode (but this will break your sound in Kodi as there is no DTS-HD or DolbyTrueHD while using pulseaudio) or you set your system using an asound.conf like explained in the link above.

To get things together...you first need to check which device you need. This is done with:

Code:
aplay -l

after you know which device you want to use, change the values for "device" and "card" to the matching ones of your system in the asound.conf.

That should do the trick.

For further reading:

PulseAudio (wiki)
Reply
#3
You didn't fix anything, and there is no weirdness. If you have sound in Kodi, (reboot and ) you get sound in desktop through the same device automatically.
Reply
#4
@Soli:

Did I get this wrong?....while rebooting Kodibuntu you will end up in Kodi again. To get the desktop mode you have to exit Kodi and then select the specific session you want. After you have logged in and are in Lubuntu, AFAIK, you don't have sound in a browser (for example) automatically.

Maybe I'm completely wrong, but that was what I always thought about.
Reply
#5
Kodibuntu includes a boot script that automatically populates .asoundrc in the home folder on boot.
On a new install it might default to analog, when you change to the hdmi output in Kodi settings and reboot, .asoundrc will then be populated with the sound output settings derived from Kodi. Therefore desktop sound happens pretty much automatically, but might require a reboot after the initial install.

One small problem is that sometimes, If you happen to boot and/or then reboot once again, with your display off or hdmi cable unconnected, depending on your display/avr etc, kodi might overwrite the sound settings because hdmi sound doesn't exist. The boot script will also then overwrite the .asoundrc file. The solution is to simply reboot with you display on and then logout into lubuntu. I don't think I have had this happen in Jarvis, but then again I seldom reboot, and if I do chances are that my display is powered on.

The boot up scripts also has a mechanism to prevent this. If .asoundrc has been populated by the boot script, you can open it and comment out a specific line that the script looks after. If found, it will not modify .asoundrc .
Reply
#6
But rebooting wasn't what fixed it. I explained exactly what I did and it started working right after it failed to write the asound file. Like a split second afterwards.

No HDMI cable, as I explained in the above post, this board does not have a physical HDMI port.
Reply
#7
Your mind played tricks on you. Try to manually edit .asoundrc, and the sound *will* dissappear, proving that you didn't fix anything but it was the boot-up script doing it's job all along. Or try changing audio devices in Kodi and reboot, you'll se that desktop audio will follow Kodi.

A DVI output can be seen as a HDMI ouput. Disregarding physical dimensions of the connector, they are the exact thing. (contrary to what a google search might tell you) However, in your post, you did not mention whether it was analog or HDMI (DVI) Audio you were after, which might or might have been a factor.
Reply
#8
Right. I know that DVI is HDMI but usually without sound.

And no my mind did not play tricks on me.

I was after analog sound. Had the speakers hooked up, verified that the sound hardware worked by using another operating system. Had no analog sound in desktop mode until I did what I did.

Whatever it's working now. Either it was a glitch in the software that corrected itself, or divine intervention.
Reply
#9
I should really let this slide, but here you write a long post complaining about sound weirdness in Kodibuntu or Linux in general; And even though you got probable answers, you don't even try to verify any of it. Which makes me trying to help you kinda useless and a waste of time.

If you want to believe it was a glitch in software (which was triggered by you trying to create a file in a restricted folder) or divine intervention, then by all means do. But that is not going to float in the Linux forum, and no way helps your initial question.
That's just not the way it works.

Reading the specs of the motherboard, it seems to be a 2+6 channel soundcard, with 8 channel sound possible only when using both "front" and "back" connectors at the same time. It's probably works by combining the front and back channels into "one" 8 channel ouput in the Windows driver. Which again probably means that the analog output in seen as 2 sub devices in Linux. You're probably using the back connector whereas the front connector is the default. You changed the default sound device in Kodi, rebooted (possibly without remembering it, therefore believing it's a glitch or divine intervention) and got the same defaults in desktop after the bootup script did its job.

Quote:Now here is where it gets really weird. I followed the steps to make the asound.conf file, but when I went to save it, I was denied due to permissions... I should have done sudo kwrite I guess. However then I heard a blip and saw a notification for a multimedia device. Went to YouTube and sure enough the sound was working!
? The Lubuntu desktop is silent. You don't get any sound until there is supposed to be sound.

Quote:Sound now works in Kodi and the desktop mode, but there is no asound.conf file. I checked the /etc folder, looked for hidden files, and it is not there. Sound continues to work even after rebooting the system. There's no volume control, but running alsamixer I can adjust it.
As mentioned before there is no asound.conf file created.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodibuntu sound and Linux weirdness in general0