Monday, December 7, 2020

Lenovo G580 parting, and G405 maintenance


The other lenovo in the family - Lenovo G405 which my father is using, recently lost its battery and so father asked me to get a replacement (battery). But due to geographical constraints and COVID I could not do that. Also my recent visit was going to be only a day so I decided to just go ahead and overhaul my Lenovo G580 and give it to father.
That meant a number of things - open up chassis and clean it up, replace it's dead battery, check out keyboard if it's going to fail again, and few small things.
Luckily I had just couple of years ago opened this one up completely and replaced it's CPU's thermal grease, and it's been running quite cool. It seldom goes over 57 degrees which is great for a 2016, 28nm part with 35W TDP.
So I spent 3-4 hours getting all this done. Got a Lapcare replacement battery for 2000Rs which will be good for another couple of years. Rest all looked great. Then last month I visited my hometown and exchanged laptops.
Now the G405 which I got was mechanically fine, though full of dust. It needed major cleaning. I unfortunately don't have any pics before cleaning, but below are some after cleaning.










That took a lot of work. Basically scrubbing, wiping and more scrubbing. This laptop has sort of matt look and a wet cloth does not work as well.
Instead you need a brush - a toothbrush which I used - along with some soapwater, ensuring none of that goes in the electronics. And all this followed by a wipe with  dry microfiber cloth.
Thankfully on electronics side, besides the battery, everything else is functional. So I'll spend some cash to get a replacement battery. And this laptop will be as good as new. It's about 6.5 years old and has held up pretty good. 
So that's all for now! Cheers!

Tuesday, December 1, 2020

Dashcam for CAR

Driving in Indian road traffic is an adventure. And when someone may crash into you, you can never tell. So it makes complete sense to have some sort of surveillance for the car.
I spent about INR4500 ($62) and got this below car dashcam. 

This chinese-made ( There are some europian-designed made-in-china dashcams but they are costly! ) dashcam can record in upto 1080P resolution and supports upto 128GB SD Cards.
I am using a 32GB SD Card and it can record upto 7Hrs of footage in 32GB, and then it starts overwriting older files. The footage is of decent quality, you can catch other vehicles number-plates in daylight. One good thing with this particular model is it comes with hardwire-kit and you can directly plug it into your car's fusebox and that means your single cigarette-lighter port remains free to use during driving.
This camera has a capacitor inside which can help save emergency videos in case of a collision / crash.
It also has a gravity sensor to detect collision and automatically save next 10 seconds video footage. Though I found the sensor to be sensitive to our potholed roads, and I have to set the sensitivity to high. 
It can also record audio of conversation inside the car. And it's removable from the mount, which means you can take it with you to download the videos etc at home comfortably.
It's performed well during my long road trip and I think from security point of view it's an excellent addon.

New member in family - Maruti Suzuki Celerio VXi AGS

This actually happened in Sept-2020, but I do have a backlog of things to share - tech or non-tech.
So Celerio is a small hatchback, with 1.0Ltr engine that produces 68BHP power and 90nm torque. It's modest and cheap enough to fit my budget. It cost me about 6Lac INR i.e. $8250. This variant I bought is a middle variant and it comes with AGS a.k.a. AMT. AGS which stands for automatic gear shift, and AMT which stands for Automatic Manual Transmission.
This particular automatic transmission is the cheapest automatic transmission, in that there's a simple sensor and actuator with a control unit to operate the actual manual transmission. And as such it's not performance oriented, quite slow to operate but does get rid of the clutch pedal and gives excellent economy.
So my reason for buying an automatic was simply the city traffic. Another point is a simpler car to mess with for my wife who is not comfortable with manual transmission. What other things does this car comes with then? Actually not much! There's ABS which is now compulsory, engine is BS-VI compliant since that's compulsory. I spend about INR8.5K extra to get passenger-side airbag while the driver-side is compulsory. There are parking sensors, all 4 power windows, AC and heater but only vents at the front and... nothing more. There's no infotainment, no automatic climate control, no DRL's even!
But that's okay, the seats are comfortable and ground clearance is very good. In fact I did a 1100km road trip just recently and it went perfect!! Cheers!!

Thursday, August 20, 2020

VNC Startup file for Mate Desktop

#!/bin/sh

# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
#. /etc/X11/xinit/xinitrc
/usr/bin/mate-session

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &



Wednesday, July 29, 2020

A little bit of cheating with Symlinks

So here I was trying to install Stremio which is a video streaming program. And this was linux- a debian VM install. And I successfully installed the deb file I could download from their website. But it would not run. When I started it from the terminal I got a library version mismatch error for libx264. The version stremio was looking for was 152. I had 148 and 155 on the system but stremio would not take them.

So I went ahead and tried to cheat my way via a symlink. The symlink to 155 would not work because of some change in one of the functions. But when I tried it out with 148, voila!! It worked!

Small victories!

Thursday, June 11, 2020

PlantUML- great tool for sequence diagrams

Recently I have been searching for various tools for UML diagrams. I checked out Dia, but did not like it because I could not figure out how to create a number of diagrams with it. Then I came up on plantUML and I thought to create a sequence diagram and see how well it works.
Turns out it's great! ( At least with sequence diagrams as per my limited experience! )
Ex. Consider below file:

@startuml
actor Foo1
boundary Foo2
control Foo3
entity Foo4
database Foo5
collections Foo6

Foo1 -> Foo2 : To boundary
Foo1 -> Foo3 : To control
Foo1 -> Foo4 : To entity
Foo1 -> Foo5 : To database
Foo1 -> Foo6 : To collections

@enduml



This above file generates this beautiful graphics. Excellent!
Cheers!!

Sunday, June 7, 2020

Fixing Debian 10 on a desktop

Fixing the desktop Debain 10

I have this office provided desktop with me. And it has a version of Debian thats upgraded from Debina 7 to Debian 10. Frankly it's terrible at booting. Takes anywhere from a minute and half to 2-3 minutes sometimes. So I know a lot many things are broken inside. But I did not have time to take a look at the software side and just let it be. And another ting to note is, it has 16GB of RAM so once booted things run smooth.

So with quarterly release done, the workload decreased and I got some time to take a look at this thing on weekends. First thing always is to note how bad things are, get hold of some logs and just list whatever broken thngs you can see around in first glance and then go about cleaning and fixing things one by one. So like I mentioned above it takes anywhere from 1.5 minute to 3 minutes just to boot up. My goal is to get it to boot in less than a minute, since this has a HDD. I have Linux Mint and a SSD in my 7Yr old laptop and it boots in about 15-20 seconds. Really SSD's are a boon since the speed bump they provie the system is tremendous. And ideally if you have a slow system, with limited amount of RAM and a HDD, you can bump up the RAM and put in a SSD and you can see a sizeable bump in performance even with all the remaining old hardware. E.g. my old laptop comes with a Pentium B950 dual core 2.1GHz processor and still it flies around really well with 6GB RAM and this SSD.
Anyway coming back to the desktop, whats broken?
1. There's some unneeded software which I need to weed out.
2. There's a waiting for suspend/resume error.
3. There's a driver related error for rtl_nic/rtl_8169 something.
4. Systemd startup and services need to be optimized.
5. Any unneeded mounts need to be removed.

Okay. Lets start.

I installed Synaptic which is THE best package manager for Debian based Linux's. But it's not in much use these days because the distro builders want someting resembling Apple AppStore or Google Play Store. I mean yeah, they look good. But functionally, synaptic is still king of the hill. So I used synaptic and looking in Installed packages section I could see 10-15 softwares which I don't use and can be removed. A few of these has heavy startup services like PostgreSQL.
I removed all these and saved about 600MB of space and possibly few seconds of startup time.

Next waiting for suspend resume. This I learned is because of incorrect SWAP file configuration. So I opened /etc/fstab and found some unwanted entries, and incorrect SWAP entry. Fixing everything and rebooting should have solved this error. But not!! Something else is still broken. Turns out you also need to update initramfs. So edit "/etc/initramfs-tools/conf.d/resume" and remove the swapid there if you are not going to use suspend-resume or don't have swap like I do. Or put correct Swap UUID in case you have and want to use it.
And then run "update-initramfs -u"  and reboot. Yey!! That fixed this.

Next I wanted to tackle driver error but my internet went down so could not get the required driver.

So I went looking into Systemd analyse command for offending commands and critical path to check what's most broken in startup. Found a few usual things like NetworkManager.WaitOnline. Disabled few services and rebooted. Huh seems faster.

Then I again went into /etc/fstab and found some mounts for /dev/sdb1/2 but I don't have dev/sdb so removed these. And rebooted. Then I checked things with timer in my android phone, and voilla!! We are booting in ~55-60 seconds. Good.

Then I did not get any more time but till next weekend to look at the realtek driver issue. And when I got time it turned out that you need below repo:
#realtek firmware
deb http://ftp.de.debian.org/debian stretch main non-free
deb-src  http://ftp.de.debian.org/debian stretch main non-free

So I added this and then sudo apt update
and sudo apt install firmware-realtek

And reboot.

And yes, the rtl_firmware related error is gone. But I also realized that dmesg gives some permissions error. And I have never seen anything like this on Ubuntu or Linux Mint. Actually dmesg is great to quickly check out system startup and notice broken startup. In fact I swa this below line:
/lib/systemd/system/winbind.service:8: PIDFile= references path below legacy directory /var/run/, updating /var/run/samba/winbindd.pid → /run/samba/winbindd.pid; please update the unit file accordingly.

Which means samba config probably has some issue.

Anyway, first fix dmesg permission issue. Solution is :
% sudo sysctl kernel.dmesg_restrict=0
kernel.dmesg_restrict = 0

And put this in a file below to make it permenant:
$ sudo su
# echo "kernel.dmesg_restrict = 0" > /etc/sysctl.d/10-local.conf
# Ctrl + D

$ cat /etc/sysctl.d/10-local.conf
kernel.dmesg_restrict = 0
 

Done! Next thing is this samba issue! But a quick google search told me it's just a warning and should be fixed in any coming Samba updates. Okay then.

Cheers!!!

Sunday, May 17, 2020

Upgrading Debian 7 to Debian 10 Adventure

Upgrading to Debian 8 from 7 
Jessie from wheezy

1. Perform full system backup 

2. Upgrade existing os version. 
apt-get update && apt-get -V upgrade

3. Get current status 
lsb_release -a 
uname -a 

4. Change repositories 
Replace wheezy with jessie manually or as below:
sed -i 's/wheezy/jessie/g' /etc/apt/sources.list 

Also update any files if present in /etc/apt/sources.apt.d 

5. Perform full system update 
apt-get update && apt-get -V upgrade 

If required reboot 

Update 1: Debian 7 Wheezy to Debian 8 Jessie update done.
And Debian 8 Jessie to Debian 9 Stretch upgrade also complete. The upgrades were taking too long. And looking at the terminal messages I realized, I could have saved a lot of the time if I would have cleaned up the system earlier. There's a lot of stuff like mono, OpenJDK, perl, python,  ruby which I'm never going to use.

Anyway to Buster now.

Update 2: I spent a lot of time cleaning up the system and then made the changes to start Buster update. Thankfully it went fairly quickly. 
I also ended up installing Mate DE since I hate Gnome. There were couple of things like proxy setting which I needed to remove. 

Now it's alright and I'm well set up to move ahead. 

Saturday, May 9, 2020

Scooter ownership TCO

Recently I decided to do a bit of TCO calculation on this Hero Duet scooter that we have been using. It's not the greatest experience I have had, but then this is the first family vehicle that I have owned. And I expected it to be a little pricey because of the number of repairs we have had to do.
But for last year or so the scooter has been running great with only helping of regular servicing. So check out the TCO!
Cheers!!

Thursday, April 23, 2020

Selecting new phone plan

I use a Reliance Jio SIM as my one and only cellphone number. I used to have another, but I found little use for that. So I discontinued that other SIM card. It was a Vodafone SIM and I had bought it thinking I would be using it when I visit my hometown. Turns out it's not usable there. So adios.
Coming back to Jio, it was working so far so good for a while. And it was quite cheap. Then they increased the fares about 4-5 months ago. And it was costing ~Rs 7 per day. This was for unlimited Jio-Jio calling, ~300minutes free to other telcos, and 1.5GB daily cellular data.
Now I got home internet, so I thought to cut costs on this. The current plan goes for INR555 for 84 days. This includes 1.4GB 4G cellular data per day, 300 min calling to other telcos, and jio-jio free. That's Rs 6.6 per day. Now I'm not even using 30minutes calling per day. And due to home internet my cellular usage has gone down. So I decided to go for some other cheaper plan. This one is INR1299 for 336 days. Comes to Rs. 3.8 per day. So better this way. I'll save 1022 INR per day. That's about a month's broadband bill.
Cheers!!

Sunday, April 19, 2020

Work from Home Experience

As you all may know India has been on Lockdown from 24March to now 3rd May due to COVID-19 pandemic. My current company has thankfully provided us with Work from Home facility. Things are grim in industry, with many companies cutting work force even though Govt and labor ministry having specifically asked companies not to cut work force.
My company has decided to provide as many facilities and with one hardware setup locally available, and couple more with other peripherals available remotely, I'm having good productivity. Also on financial side, we are not asked for paycuts for at least this month, so it's good going so far. Though I am not sure similar things would continue next few months. Anyway I am prepared with enough finance to last at least 3-4 months.
Few points regarding work from home:
1. Working in office is very comfortable. I don't have a proper desk at home. Or rather the nook I call desk is ill suited for heavy work involving more hardware. It's good enough for single laptop only. So now I have a makeshift setup where the monitor and other hardware is occupying couple of chairs and I have to make do with another chair. It's not comfortable. But thankfully I am taking small breaks to be as much comfortable as possible.
2. VPNs are slow. With everybody logging in remotely, things are slow. But that can't be helped.
3. No power backup. I did not think I would be needing an inverter with some battery backup, since summers are mild here in Pune. (Nature has decided to prove me wrong this year - 40degrees through-out the day has made me miserable these last few days). But my laptop battery being dead, I don't have any power backup. So in case of power-out, I'm stuck, and if it's noon - in a oven. After lockdown, that's something I want to fix sooner.
4. Workload management. Being home we feel like we have much more time, and at times I have been lazy about getting work done. That's something I need to be disciplined about. Because otherwise I'm ending up with a zig-zag pattern where some days are 4-hour days and others are 12-13Hour workdays which completely exhaust me.

That's few things that have been bothering me. Hope I manage things better though. That's all for now. Ciao.


Got broadband - 25mbps unlimited @1250Rs per month (~$17.85)

Last month I finally went for a broadband connection. From 24th March, Lockdown was announced all over India. Thankfully my current company gave us work from home facility. I had this old laptop with few upgrades made couple of months back which was good enough. But I have been using only a cellular data connection since a long time back (almost 5 years now since I moved to Pune from Mumbai). Anyway with work needing more bandwidth I decided to go for a Cable Internet solution.
I had 2 options - Tikona Wireless internet, which has narrow-band connectivity. But I had heard of issues with Tikona's uptime. The other option was local distributor of Fivenet. Fivenet is a cable internet company. I decided to go Fivenet way. Called the local distributor, got cable installed and then visited his office which is nearby. Paid INR1750 (1250per month service + 500 installation). I.e. ~$17.85 per month for 25mbps unlimited service.
Now it's almost a month and service has been great so far. And thankfully I am having great experience working from home.

Monday, February 24, 2020

Laptop upgrade and OS install adventures

Yesterday I bought 4GB of DDR3 RAM and a 240GB MAXTOR SSD. Installed it in the lenovo laptop. And the started the vicious OS installation drama. I won't write the whole tale, but there were two issues. 1. Linux Mint's GRUB bootloader crashed when installing with UEFI on. 2. Windows won't recover existing installation. Anyway after about 5 hours I was done and Windows and Linux were humming along nicely.
Now about performance improvement: things have become great. The processor is the only slow thing in this laptop now. And even then it's adequate for most of the things I am doing on this.
Windows 7 boots in about 30 seconds. Linux - even faster. I have about 10 tabs open in Firefox including 1 GMail and couple of google drive documents. Nothing is slow. Anyway, the cost was a bit high because I got the hardware from a local shop. Online it would have been cheaper, but getting good RAM online is tricky. Anyway it was INR 2000/- ($29) for 4GB DDR3 RAM and INR 3250/- ($47) for 240GB SSD. So overall good value. Cheers!

Sunday, February 2, 2020

Ubuntu set local time

After dual booting I started getting this issue. Time would be
incorrect when I switched from windows to linux or vice versa.
Cause is the OS's consider RTC to be UTC time. And switch it to local
time. And when both consider it UTC then actual time is messed up.
So I decided to have windows keep using UTC time and switched ubuntu
to local time.

1. Disable UTC and use Local Time in Ubuntu:

In previous Ubuntu editions, you can edit the config file
/etc/default/rcS to disable UTC.

In Ubuntu 16.04, open terminal (Ctrl+Alt+T) and run the command below instead:

timedatectl set-local-rtc 1 --adjust-system-clock

To check out if your system uses Local time, just run:

timedatectl