Posts tagged with "ubuntu"

ubuntu power management

(Intended date of release 2012/02/13. Procrastination…. Finally released today.)

After upgrading to Ubuntu 11.10(Oneiric Oncelot) I had a unique problem with my machine that was not googleable. All I could see is a symptom where my CPU fans would start full speed and keep blowing for a while. While they were up all my CPUs would be at 100% utilization. On various occasions that this would happen I had to restart the machine as it became unresponsive. Often times this would happen at nights when the machine is not being used.

Recently when I was researching how to manage power settings with LUbuntu(which is harder than it sounds) I found that powernapd was something that Ubuntu running in background to manage power usage of the machine components. This sounds like a reasonable thing to run since Ubuntu now supports Netbooks, Notebooks and Desktops all at the same time. In my case since I am running Ubuntu on a desktop it did not need such strict power management.
I decided to try and turn this daemon off. Now my CPU utilizations reflect the amount of processor power my currently running applications use and there is no fan whirring anymore.

ProTip: Tweak your Ubuntu – Lubuntu is minimalistic so use Ubuntu Gnome to tweak LUbuntu settings.

Airport Express as Remote Speakers for Airplay - Also with Linux

I have an airport express that I used to use as my wireless router when I travel. Very convenient and useful when hotels do not provide a wireless.(Yes I am looking at you Marriott.) Airport Express thanks to apple technology also supports airplay to play music over the air, and/or printer sharing via a USB connection.

I was hoping to connect my desktop and my laptop to my music system which is located in another room than these machines. Apparently airport express can connect with your existing wireless router as a client(yes they have thought of everything) allowing you to do exactly that.
Here is a list of quirks you need to remember when you try to set it up as a wireless client.

  1. Prerequisites – Note down the channel number your current wireless router is transmitting on – anywhere between 1-11. (numbers higher than 11 are not supported in the US.)
  2. Plug in the airport express and connect it to your mac using the ethernet cable.
  3. Start airport utility – which will try to detect any airport devices but will not find any.
  4. Hard reset by pressing the reset button with a paper clip for atleast 10 seconds. The light blinks rapidly when you are holding the pin and then in 30 seconds becomes steady – this means that airport express is restarting.
  5. Now rescan on the airport utility – it should find one device with name ‘Base station xxxxxx’ – with last 6 digits from the mac address. It should have a yellow icon next to it – indicating that it has not connected to the internet.
  6. Perform a Manual Setup – DO NOT hit continue.
  7. Change the channel number that is automatically set on the airport express to the one from your wireless router.
  8. In ‘Wireless’ connect the airport express as a client – select ‘Join an existing wireless network’ – select appropriate SSID of the wireless router.
  9. Browse through other tabs if you are interested in the details – else click ‘Update’.
  10. The airport express should restart and reappear on the Airport Utility. This usually takes over a minute. When it reappears it should appear with the new name you chose and with a green light next to it – indicating it was able to connect to your wireless router.
  11. If everything was successful and airport express liked the ‘Enable for Airplay’ selection you made – you will see a red light in the stereo socket light up. Connect your speakers to airport express and you should be able to airplay your music using iTunes.

Notes:

  1. You may encounter “AirPort Utility was unable to find your AirPort wireless device after restarting.” One of the reasons for this is that Airport express cannot connect to your router with WPA2 or any other security.(Look at Airport Express Amber Light for more details.)
  2. To ensure security I disabled ‘SSID broadcast’ and enabled MAC filtering on my router. I added the MAC addresses of my Airport Express(Airport Admin Utility will show those addresses when it detects Airport Express.)

To allow your linux machine to connect and airplay to the airport express you need install pulseaudio’s drivers and support for remote audio protocol by running airtunes with Linux

1 sudo apt-get install pulseaudio-module-raop paprefs
2 
3 # (I am not making this up- The protocol is Remote Audio Output Protocol - raop)

Setup pulseaudio to enable remote speakers as described in PulseAudio settings.

Once it is installed you may need to restart your Linux machine. On restarting you should see your newly available remote speakers in your Sound Preferences. Now you should be able to stream from your Linux machine too.

And you are done.
Enjoy remote streaming.

Streaming Media from Ubuntu to Bravia

Over this weekend I set out to connect my Ubuntu machine with my Sony Bravia TV.( With inspiration from Sachin Dharmapurikar and DLNA.)

Googling yielded a number of techniques to stream media from linux over the home network. Some that did suit Bravia and some that did not. The easiest one to work with was minidlna server. Snappy install and my Bravia recognised it like any other streaming website. I am running the minidlna server for my music and photos and all the content that is in DVD/mpeg2 format.(How to install on linux)

I do have some videos that came to me as avi and minidlna does not support transcoding. (There are some that describe how to do it with Windows but no out of the box solution with linux yet.) Google for PS3 Media servers I stumbled upon a PS3 Media Server for Linux – which is a java application that streams and transcodes nicely.

To get the video to be non-jittery and avoid ffmpeg/tsmuxer crashing I had to tone the transcoding down to Lowest Quality. Even with that the video is pleasing albeit a bit grainy in some cases. Documentation suggests allocating more memory or CPU might help.

To support all this I also installed a bunch of libraries described by many to help
transcode, mux and display thumbnails.. The instructions are for mediatomb but these libraries work with other dlna servers.

Next stop Getting mediatomb to work on linux and bravia

Setting up wireless usb card on Ubuntu - Lucid Lynx

I have faced the same problems with Wireless Networking as mentioned by many on the web.
I tried Hardware Compatibility List for Linux and many links on that list. In an attempt to install custom drivers I would always end up with a network card that would detect wireless but never would communicate over wireless. After going through a number of cards and uninstalling and installing drivers I found one that worked really well without resorting to the ndiswrapper solution(dealing with anything windows just feels unclean). Finally I found a card that worked and also provided native linux drivers.The wireless usb card that worked was – D-Link DWA-125 with Ubuntu Lucid Lynx.It also helped that D-Link in fact published a linux driver for their wireless usb card

Flash on Linux

Last night when struggling to get Firefox to play with Ubuntu and Flash I found this
forum.

The instructions that worked for me are as follows

1. Remove all installations of flash (9, 10.. )
2. Remove all installations of gnash
3. Remove all installations of swfdec
4. (Basically remove everything that conflicts with flash player – some of these things come bundled with Ubuntu)
5. Remove any file in “/usr/lib/firefox/plugins” with the word flash in its name.
eg. libflashplayer.so or in my case alternate-flashplugin.so.

6. Once you have verified that all this has gone (You could use about:plugins url in your firefox to see all the plugins you have along with their associated file types) – reinstall the latest version of flash player from adobe website.

7. You should have Hulu.com working.

Hope this helps someone who is trying to do the same.

“Now when someone asks – Do you have Flash working on Linux – you know what to say”