Archive

Archive for the ‘Kubuntu’ Category

Listen up, Kubuntu: the enraging tale of sound over HDMI

August 4th, 2013 2 comments

Full disclosure: I live with Kayla, and had to jump in to help resolve an enraging problem we ran into on the Kubuntu installation with KDE, PulseAudio and the undesirable experience of not having sound in applications. It involved a fair bit of terminal work and investigation, plus a minimal understanding of how sound works on Linux. TuxRadar has a good article that tries to explain things. When there are problems, though, the diagram looks much more like the (admittedly outdated) 2007 version:

The traditional spiderweb of complexity involved in Linux audio.

The traditional spiderweb of complexity involved in Linux audio.

To give you some background, the sound solution for the projection system is more complicated than “audio out from PC, into amplifier”. I’ve had a large amount of success in the past with optical out (S/PDIF) from Linux, with only a single trip to alsamixer required to unmute the relevant output. No, of course the audio path from this environment has to be more complicated, and looks something like:

Approximate diagram of display and audio output involved from Kubuntu machine

As a result, the video card actually acts as the sound output device, and the amplifier takes care of both passing the video signal to the projector and decoding/outputting the audio signal to the speakers and subwoofer. Under Windows, this works very well: in Control Panel > Sound, you right-click on the nVidia HDMI audio output and set it as the default device, then restart whatever application plays audio.

In the KDE environment, sound is managed by a utility called Phonon in the System Settings > Multimedia panel, which has multiple backends for ALSA and PulseAudio. It will essentially communicate with the highest-level sound output system installed that it has support for. When you make a change in a default Kubuntu install in Phonon it appears to be talking to PulseAudio, which in turn changes necessary ALSA settings. Sort of complicated, but I guess it handles the idea that multiple applications can play audio and not tie up the sound card at the same time – which has not always been the case with Linux.

In my traditional experience with the GNOME and Unity interfaces, it always seems like KDE took its own path with audio that wasn’t exactly standard. Here’s the problem I ran into: KDE listed the two audio devices (Intel HDA and nVidia HDA), with the nVidia interface containing four possible outputs – two stereo and two listed as 5.1. In the Phonon control panel, only one of these four was selectable at a time, and not necessarily corresponding to multiple channel output. Testing the output did not play audio, and it was apparent that none of it was making it to the amplifier to be decoded or output to the speakers.

Using some documentation from the ArchLinux wiki on ALSA, I was able to use the aplay -l command to find out the list of detected devices – there were four provided by the video card:

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0

and then use aplay -D plughw:1,N /usr/share/sounds/alsa/Front_Center.wav repeatedly where N is the number of one of the nVidia detected devices. Trial and error let me discover that card 1, device 7 was the desired output – but there was still no sound from the speakers in any KDE applications or the Netflix Desktop client. Using the ALSA output directly in VLC, I was able to get an MP3 file to play properly when selecting the second nVidia HDMI output in the list. This corresponds to the position in the aplay output, but VLC is opaque about the exact card/device that is selected.

At this point my patience was wearing pretty thin. Examining the audio listing further – and I don’t exactly remember how I got to this point – the “active” HDMI output presented in Phonon was actually presented as card 1, device 3. PulseAudio essentially grabbed the first available output and wouldn’t let me select any others. There were some additional PulseAudio tools provided that showed the only possible “sink” was card 1,3.

The brute-force, ham-handed solution was to remove PulseAudio from a terminal (sudo apt-get remove pulseaudio) and restart KDE, presenting me with the following list of possible devices read directly from ALSA. I bumped the “hw:1,7″ card to the top and also quit the system tray version of Amarok.

A list of all the raw ALSA devices detected by KDE/Phonon after removing PulseAudio.

A list of all the raw ALSA devices detected by KDE/Phonon after removing PulseAudio.

Result: Bliss! By forcing KDE to output to the correct device through ALSA, all applications started playing sounds and harmony was restored to the household.

At some point after the experiment I will see if I can get PulseAudio to work properly with this configuration, but both Kayla and I are OK with the limitations of this setup. And hey – audio works wonderfully now.




I am currently running Ubuntu 14.04 LTS for a home server, with a mix of Windows, OS X and Linux clients for both work and personal use.
I prefer Ubuntu LTS releases without Unity - XFCE is much more my style of desktop interface.
Check out my profile for more information.

Installing Netflix on Kubuntu

July 27th, 2013 4 comments

The machine I am running Kubuntu on is primarily used for streaming media like Netflix and Youtube, watching files off of a shared server and downloading media.

I decided to try to install Netflix first since it is something I use quite often. I am engrossed in watching the first season of Orange is the New Black and the last season of The West Wing.

Again, I resorted to Googling exactly what I am looking for and came across this fantastic post.

I opened a Terminal instance in Kubuntu and literally copied and pasted the text from the link above.

After going through these motions, I had a functioning instance of Netflix! Woo hoo.

So I decided to throw on an episode of Orange is the new Black, it loaded perfectly…. without sound.

Well shit! I never even thought to see if my audio driver had been picked up… so I guess I should probably go ahead and fix that.

What is this, text for ants? Part II

July 27th, 2013 No comments

Back to my shit-tastic eyesight for a moment.

Now that we have our Bluetooth devices installed, I can now sit in front of my projector, instead of in the closet, to fiddle with the font scaling.

We will want to go through the process of pulling up the System Settings again. Why don’t we refer to this image… again.

Computer Tab

The next step to to select Application Appearance, it looks like this.

System Settings Fonts

This will bring you into this menu where you will select Fonts from the toolbar on the left hand side.

Fonts

In the next screen you can change the font settings. There is a nice option in here that you can select to change all the fonts at once… spoiler, it is called “Adjust all fonts”. This is what I used to change the fonts to a size that my blind ass could see from the couch without squinting too much.

You can also force font DPI and select anti-aliasing, as you can see below. For the most part, this has made it possible for me to see what the hell is going on on my screen.

For my next adventure, I will be trying to get Netflix to work. Which I have heard is actually pretty simple.

Fonts

Installing Bluetooth devices on Kubuntu

July 27th, 2013 No comments

This is actually a much easier process than I imagined it would be.

First: Ensure your devices (mouse, headphones, keyboard, etc…) are charged and turned on.

Next click on the “Start” menu icon in the bottom left of the desktop screen.

Then click on the “Computer” icon along the bottom, followed by System Settings.

Computer Tab

This will take you into the System Settings folder where you can change many things. Here we will select Bluetooth, since that is the type of device you want to install.

Bluetooth Menu

I took these pictures after I successfully installed my wireless USB keyboard and mouse. So you know I am not bullshitting about this process actually working.

Like most Bluetooth devices, mine have a red “Connect” button on the bottom. Ignore the sweet, sweet compulsion to press that button. I’m convinced it is nearly useless. Instead, use the “Add devices” method, as seen here.

Add Device

More awesome Photoshop.

Now, if you followed my first instruction (charge and turn on your Bluetooth Device) you should see them appear in this menu. Select the item you would like to add and click next. This will prompt you to enter a PIN on the device you wish to insyall (if installing a keyboard), or it will just add your device. If you have done this process successfully, your device will show up in the device menu. If it does not, you fucked up.

 

What is this, text for ants? Part I

July 26th, 2013 No comments

Unlike many people who may be installing a version of Linux, I am doing so on a machine that has a projector with a 92″ screen as it’s main display.

So, upon initial installation of Kubuntu, I couldn’t see ANY of the text on the desktop, it was itty bitty.

Font for Ants

I can’t even read this standing inches away.

In order to fix this, I had to hook up an additional display.

Thankfully, living in a house with a computer guru, I had many to choose from.

In order to get my secondary display to appear, I had to first plug it into the display port on the machine I am using. I then had to turn off the current display (projector) and reboot the machine so that it would initialize the use of my new monitor.

Sounds easy enough, and it was, albeit with some gentle guidance from Jake B.

From here, I am able to properly configure my display.

The thing I am enjoying most about Kubuntu so far is that it is very user friendly. It seems almost intuitive where each setting can be found in menus.

So these are the steps I followed to change my display configuration.

I went into Menu > Computer > System Settings

Computer Tab

Check out my sweet Photoshop Skills. I may have taken this picture with a potato.

Once you get into the System Settings folder, you have the option to change a lot of things. For example, your display resolution.

System Settings

Looks a lot like the OSX System Preferences layout.

Now that you are in this menu, you will want to select Display and Monitor from the options. Here you can set your resolution, monitor priority, mirroring, and multiple displays. Since I will only be using this display on the Projector, I ensured that the resolution was set so that I could read the text properly on the Projector Screen. Before disabling my secondary monitor, I also set up my Bluetooth keyboard and mouse, which I will talk about in another post.

This process only took a few moments. I will still have to tweak the font scaling, as I have shit-tastic eyesite.

This isn’t going well.

July 26th, 2013 No comments

Today I started out by going into work, only to discover that it is NEXT Friday that I need to cover.

So I came home and decided to get a jump start on installing Kubuntu.

I am now at a screeching halt because the hardware I am using has Win8 installed on it and when I boot into the Start Up settings, I lose the ability to use my keyboard. This is going swimmingly.

So, it is NOW about 3 hours later.

In this time, I have cursed, yelled, felt exasperated and been downright pissed.

This is mainly because Windows 8 does not make it easily accessible to get to the Boot Loader. In fact, the handy Windows made video that is supposed to walk you through how EASY, and user friendly the process of changing system settings is fails to mention what to do if the “Use a Device” option is nowhere to be found (as it was in my case).

So I relied on Google, which is usually pretty good about answering questions about stupid computer issues. I FINALLY came across one post that stated that due to how quickly Windows 8 boots, that there is no time to press F2 or F8. However, I tries anyway. F8 is the key to selecting what device you want to boot from, as you will see later in this post.

What you will want to do if installing any version of Linux is, first format a USB stick to hold your Linux distro. I used Universal USB Loader. The nice thing about this loader is that you don’t have to already have the .iso for the distro you want to use downloaded. You have the option of downloading right in the program.

After you have selected you distro, downloaded the .iso and loaded it onto your USB stick now is the fun part. Plug your USB stick into the computer you wish to load Linux onto.

Considering how easy this was once I figured it all out, I do feel rather silly. If I were to have to do it again, I would feel much more knowledgeable.

If you are using balls-ass Windows 8, like I was, the EASIEST way to select an alternate device to boot from is to restart the computer and press F8 a billion times until a menu pops up, letting you choose from multiple devices. Choose the device with the name of the USB stick, for me it was PENDRIVE.

Once you press enter (from a keyboard that is attached directly to the computer you are using via USB cable, because apparently Win8 loses the ability to use Wireless USB devices before the OS has fully booted…at least that was my experience).

So now, I am being prompted to install Kubuntu (good news, I already know it supports my projector, because I can see this happening).

Now, I have had to plug in a USB wired keyboard and mouse for this process so far. This makes life a little bit difficult because the computer I am using sits in a closet, too far away from my projector screen. This makes it almost impossible for me to see what is going on, on the screen. So installing the drives for my wireless USB devices it a bit of a pain.

However, the hard part is over. The OS is installed successfully. My next post will detail how the hell to install wireless USB devices. I will probably also make a fancy signature, so you all know what I am running.

Come on, really?!

July 25th, 2013 3 comments

So it is 9:40 PM and I started my “Find a Linux distro to install” process. Like many people, I decided to type exactly what I wanted to search into Google. Literally, I typed “Linux Distro Chooser” into Google. Complex and requiring great technical skill, I know.

My next mission was to pick the site that had a description with the least amount of “sketch”. Meaning, I picked the first site in the Google results. I then used my well honed multiple choice skills (ignore the question, pick B) to find my perfect Linux distro match.

After several pages of clicking through, I was presented with a list of Linux distributions that fit my needs and hardware.

See, a nice list, with percents and everything.

This picture has everything... percents, mints, Man Drivers...

This picture has everything… percents, mints, Man Drivers…

So naturally, I do what everyone does with lists.. look at my options and pick the one with the prettiest picture.

For me that distro was Kubuntu. It has a cool sounding name that starts with the same letter as my name.

So I follow the link through to the website to pull the .iso and this pops up.

Fuck Drupal

God damn Drupal!

I have dealt with Drupal before, as it was the platform the website I did data entry for was built on. Needless to say, I hate it. Hey Web Dev with Trev, if you are out there, I hope you burn your toast the next time you make some.

So, to be productive while waiting for Drupal to fix it’s shit, I decided to start a post and rant. In the time this took, the website for Kubuntu has recovered (for now).

So, I downloaded my .iso and am ready to move it onto a USB stick.

I’m debating whether I want to install it now or later, as I would really like to watch some West Wing tonight. I know that if I start this process and fuck it up, I am going to be forced to move upstairs where there is another TV, but it is small :(

Well, here I go, we’ll see how long it takes me to install it. If you are reading this, go ahead and time me… it may be a while.

Limit Bandwitdth Used by apt-get

October 22nd, 2012 No comments

It’s easy. Simply throw “-o Acquire::http::Dl-Limit=X” in your apt-get command where X is the kb/s you wish to limit it to. So for example let’s say that you want to limit an apt-get upgrade command to roughly 50kb/s of bandwidth. Simply issue the following command:

sudo apt-get -o Acquire::http::Dl-Limit=50 upgrade

Simple right?




I am currently running a variety of distributions, primarily Linux Mint 17.
Previously I was running KDE 4.3.3 on top of Fedora 11 (for the first experiment) and KDE 4.6.5 on top of Gentoo (for the second experiment).
Check out my profile for more information.

It should not be this hard to change my volume

December 22nd, 2011 1 comment

Normally my laptop is on my desk at home plugged into a sound system, so I never have to change the volume. However I’m currently on holiday, so that means I’m carrying my laptop around. Last night, I had the audacity to lower the volume on my machine. After all, nobody wants to wake up their family at 2am with “The history of the USSR set to Tetris.flv”. Using the media keys on my laptop did nothing. Lowering the sound in KMix did nothing. Muting in KMix did nothing. I figured that something had gone wrong with KMix and maybe I should re-open it. Well, it turns out that was a big goddamn mistake, because that resulted in me having no sound.

It took about 30 minutes to figure out, but the solution ended up being unmuting my headphone channel in alsamixer. It looks like for whatever reason, alsamixer and KMix were set to different master channels (headphone/speaker and HDMI, respectively), thus giving KMix (and my media keys) no actual control over volume.

Categories: Hardware, Kubuntu, Sasha D Tags:

Representing kubuntu

November 5th, 2011 No comments

I’ve decided to roll Kubuntu 11.10 for this round of The Linux Experiment. Why Kubuntu? Well, a while back one of my teachers used xubuntu on his laptop, and I thought it looked interesting. Before Googling the distribution, I saw a picture of a koala on imgur and the letter “k” was in my head, so now I’m stuck with Kubuntu. No seriously, that’s pretty much the logic behind the decision.

If you’ve never read this site before, I ran Linux Mint with GNOME in the original experiment and survived. Obviously this time I’ll be going with KDE so that in itself will provide a change.

Installation

The installation was very easy. I downloaded a torrent of the distribution (don’t worry, I’m still seeding!) and then used Linux Live USB Creator to create a USB stick I could boot from. I estimate the entire process took me less than 30 minutes. The only part that required any sort of thought was selecting the installation partition: either the entire drive, or a partition consisting of the entire drive. I’m still not entirely sure what I did, but I went with the entire drive. I bet that won’t bite me in the ass at all!

First impression

Kubuntu is a little odd – it looks sleek, but it sounds straight out of 1996. What I mean is that it looks fantastic, but the default sounds remind me of Windows 95. For example, this is the startup sound. There were other system sounds that made me nostalgic for Heroes of Might and Magic II – not necessarily a good thing. On the other hand, it has a very crisp layout, and although I haven’t done too much customization or organization yet, it looks promising.

My first installation was Firefox. It was easy enough to do. I hit Windows (“Meta”) + Spacebar, typed in Firefox and the OS located the browser installation for me. Thunderbird required going into the software manager, but really once Firefox is installed you can just Google everything anyway.

As for other minor comments: the keyboard shortcuts aren’t as intuitive. The Meta key on its own doesn’t seem valid as a shortcut (I’m used to bringing up my menu this way), and Meta + D doesn’t bring up the desktop like it did in Mint. The screenshot application also takes some figuring out, but I’ll get the hang of it.

Oh, and I ran into an integer overflow right off the bat. It’s from the comic widget – I’m not sure if this is a Kubuntu thing or something to do with the widget itself. Anyway, I don’t think there are that many Spanish-speaking readers of xkcd.

Coño Linux!

Ay Dios mio!

Categories: Kubuntu, Sasha D Tags: