Fixing headphone jack in Ubuntu 20.04

Posted on 2 Comments

As weird and funny as it may sound, Ubuntu isn’t able to play sounds on my laptop‘s 3.5mm headphone jack. Yes, the gentle, innocuous, innocent headphone jack that we all love and use. And mine’s not even a super-fancy laptop with uncommon hardware. It’s a Dell Inspiron 7000 series laptop with an Intel chipset. How more commonplace can things get than this?

After fiddling around for quite a bit, I was finally able to get it to work. I guess the issue has something to do with (the notorious?) PulseAudio.

Anyway, the trick for me was to use a little utility called hdajackretask. It’s part of the alsa-tools-gui package and helps you retask (remap or whatever) your PC’s audio ports (including internal speakers and HDMI). Read the documentation here (simple and fun): https://fossies.org/linux/alsa-tools/hdajackretask/README

Install it using this command:

sudo apt install alsa-tools-gui

Next, open the app from either command line (hdajackretask) or menu. Here’s my overriden configuration for reference (headphone, right side):

Hit Apply Now, and boom! Headphones are finally working. It’s important to note that this is not a silver bullet that will fix all jack-related sound issues. It just so happened in my case that retasking was necessary. I have to do it every time I plug in my headphones (even with the boot override installed). Weirdo, I know, but at least it works.

You may receive this error when you apply the overrides. I guess it’s totally fine to ignore it. It’s probably because of a restart of pulseaudio system. Things work despite the error.

Feels to weird that it’s 2020 and such retasking has to be done manually!

Note that getting my Bluetooth audio devices to work – especially my AirPods – remains a pain in the you-know-what.

Made the switch back from Mac to Linux

Posted on 2 Comments

After serving me dutifully for more than 4 years, my MacBook Pro 13″ (early 2015)’s battery died. It was a terrible sight. I was in the mid of a programming spree when that happened. There was a powercut and, whoosh, everything disappeared from the screen. It was puzzling at first. I thought my laptop had shutdown under the strain of my app’s build process. On powering it on again, my Mac appeared to behaved normally. That was until I noticed the battery health icon in system tray. All of a sudden, it was asking me to service the battery and power source was set to power adapter.

CreditMake Tech Easier

I was stunned, to say the least. I immediately googled around and found a few things to try and fix the situation, like tips mentioned in this article (reset SMC and all). Unfortunately, nothing worked for me. I was left with no option but to accept that my MacBook was not going to be the same.

During the next few days, I continued to use my Mac with adapter as power source. With frequent power cuts, it was annoying to see the laptop shutdown suddenly and then waste precious time restore everything. For a while, I considered getting a new battery. What held me back was its prohibitive cost (Rs. 10-12k) and lockdown due to COVID-19. To make matters worse, my MacBook strangely got slow and sluggish. I could feel a noticeable 20-30% reduction in speed and power. Software builds took more time, browsing and scrolling web pages were janky, etc.

For the next couple of weeks, I resorted to using my wife’s old, insanely under-powered laptop. It was hard at first, but when I had set it up with Ubuntu Linux things got a lot better. I could run VS Code, Docker, Firefox, all at once. It took some time and patience to get used to the new speed standards, but at least this thing was presently more reliable than my no battery MacBook.

Days passed by. I continued to do my daily work on the oldie, and found myself not touching my MacBook for days at a stretch. It was a weird feeling – I had never not opened my Mac at least once a day in all of its four years.

In the following days, I started feeling like getting a new laptop. For a professional programmer like me, a laptop was his “tool of the trade”, and it was not wise to keep using an old tool on the cost of productivity. After a couple of days research I settled on Dell Inspiron 7591. It was a far cry from the premium world of Apple laptops, but it was respectably ahead in terms of sheer performance.

I’m typing this post from my new laptop, running Ubuntu side-by-side with Windows. Linux is my primary OS once again, and I’m happy to be back. Although, to be honest, I will certainly miss my Mac’s convenience and premium feel. But the new thing has a lot of good stuff to offset that:

  • way more power*
  • larger screen
  • decently lightweight
  • a nice keyboard
  • I can finally play games again 😎

Intel Core i5-9300H
16 GB DDR4 2666 MHz RAM
512 GB SSD
NVIDIA GeForce 1050 GTX

* My Dell Inspiron 7591’s configuration

Here’s the customary desktop screenshot:

Ubuntu 20.04 running on my new Dell Inspiron 7591

DigitalOcean is fun, but is it worth it?

Posted on Leave a comment
Courtesy: https://www.cloudways.com/blog/host-wordpress-on-digitalocean/

It’s fun! No doubt about that. If you are a web developer or a cloud enthusiast like me, you will love DigitalOcean. I found it to be a true personification of creating cloud infrastructure that scales as you grow. Unlike the wild pricing jungles of Azure and AWS, DO has a pretty neat price sheet. Creating and deleting VMs is stupendously easy. They have done a great job with their community documentation, which has now evolved into a gold standard for everything servers.  And it’s reasonably cheap! Is there anything to NOT like with DO? Let’s see.

I have moved my blog (this website) from Arvixe (cheap shared hosting, batshit customer support) over to DO (fully managed VMs, apparently great customer support), including my domain. Through Let’s Encrypt, I now even have my very own SSL certificate (see that green https thing in browser’s address bar?). I have hardened my LAMP installation to my liking.

I had opted for the cheapest plan ($5/mo), where my VM’s performance is comparable to what we get in shared hosting. Frankly, $5/mo is not a big amount to pay in exchange for full control of the server and a great technical support.

With the help of their one-click apps, I am very much looking forward to deploying Ruby on Rails and Node.js applications some time in the future.

P.S. If you sign up at DigitalOcean using my referral link, you will get $10 to start with. Wish I knew about it while I was signing up 🙁

An updated system

Posted on Leave a comment

opensuse 13.2 Plasma 5.5
My current desktop: opensuse 13.2 Plasma 5.5

I have been away from developments in the larger Linux world since quite some time. I’m not a distrohopper any more. I’ve kinda settled down on my (childhood) favorite openSUSE. I’d installed version 13.1 about two years ago on my brand new laptop. A few days ago I decided to update my KDE 4 to Plasma 5. To be honest, the KDE Frameworks 5 fad hadn’t really caught my attention until only a week ago when I stumbled across KDE’s latest release announcement. I was bowled over by the screenshots! The looks, the elegance, the finesse… everything was perfect. So I instantly took the decision.

Sadly, there’s no officially supported way to install Plasma 5 in openSUSE 13.1. I tried, but ended up screwing my installation. So I did a full distro upgrade zypper dup. 2GB of package updates and a few hours later, I was on a 100% working openSUSE 13.2. Nothing broke during the upgrade and all my settings were preserved. Plasma 5 turned out to be as good as it had seemed in the screenshots.

I’ve been living happily ever after. True story.

P.S.: A bit off-topic: After months of inactivity, my Raspberry Pi is back on its legs after I finally fixed its SD card issue (caution: please seriously consider safely switching off your Pi every time). Now I’m working on a top secret IoT project using my Pi. Shhh…

Moved to a new webhost

Posted on Leave a comment

Here I am. With Arvixe. After 8 years with DreamHost, I made the move to save money. Shit loads of money. Hosting with DreamHost was a smooth and wonderful but expensive journey. Their support and technical expertise are unmatched, things that came in pretty handy while hosting a Linux distro (Granular, remember?).

In its heydays, Granular was a darling of experimental distro hoppers. I hope it was a worthwhile, pleasant experience for all its users. Coming January it will be 7 years since Granular’s last release. Plans for Granular 2 could not materialize for various reasons, chief among those being the decline of PC. People are going mobile. It’s not unusual for someone’s first device being a tablet or a smartphone. That translates to a huge decline in Linux userbase in an already highly saturated distro market. So I took the hard decision I to finally pull the plug on Granular, my dearest creation.

Anyway, coming back to topic. Arvixe has the most competitive prices of all quality US-based hosts. They even offer 1 domain free-for-life with all their plans. Sweet. It’s been only 5 days since the switch, but so far so good.

Something that DreamHost offers for $120/yr is available at Arvixe for just $48/yr (and they accept discount coupons :)). So paying that sort of money to DreamHost for hosting just one website (this one) didn’t make sense anymore.