Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Thursday, January 24, 2019

Revive your old PC - Part I - Hardware Upgrades - Portable Computers


After years of usage, time comes for every computer to be revived. For the first stages, utility cleanups, reinstalling the OS may improve the performance, but with loads of security patches, upgrades, fixes etc. every Windows system becomes too heavy to bare at some point.



Though Microsoft hoped to revamp its operating system legacy by introducing Windows 10, the old systems actually became to feel really slow.

Eventually, you decide to buy a newer and faster machine. But, there are alternatives otherwise.

This post shows you the alternatives you have other than buying a new system for your need for speed.

You can achieve your goal both by upgrading some hardware for a reasonable cost as well as installing alternative operating systems. I will explain both.

Part One: HARDWARE

Facts About Components
1. In the last 10 years, CPU's haven't actually developed much other than adding more cores to the architecture to manage the applications better. Yes, the fastest commercially available CPU in the market is the new Intel Core i9-9900K (5 GHz), which is priced around 800$ including the mainboard that supports it. Otherwise, the latter is the  Core i7-3970X which is stuck at 3.5 GHz, but still very pricey.

2. Memory modules' speeds haven't increased much either. Instead by adding more memory to the existing systems proved that it does improve Windows performance. Of course there those overpriced gaming memory modules, but that's not what we are talking about here.

3. The traditional hard disks (HDD) have a streamlined alternative these days: the solid-state drives (SSD), which are generally a box packed with an IC, where chips are embedded, that are counted to be more reliable, eco-friendly, robust, faster than the traditional hard disks.

Though the world isn't still sure enough about the SSD's reliability, it is speedy indeed. Even the most basic ones are at least 20x times faster than the fastest commercially available HDDs. Plus, their price range is nearly equal to hard disk prices!

4. Graphics Processors (GPU): Though the manufacturers boast about the performance of their GPUs, they haven't developed so much in the last 10 years also, other than the improvements that are made to it. The bit rates are increased, the memory levels are steady and the graphics are more stable by adding more cores to the processors, just like the CPUs. As a downside, for some reason I cannot fathom, the power requirements of the GPUs have increased beyond boundaries, as there are some commercially available GPUs available out there with nearly 500W power requirements. These GPU's feed on direct power with a cable connecting to the power outlet of the PSU in the PC casing (the traditional power was obtained via the bus on the mainboard).

The other fact is, desktop PC's are getting less popular day-by-day as the cost of ownership of mobile machines become less. I admit I see more portable machines these days than I did 10 years ago. But as you have already discovered, mobile machines are not so upgradable as desktops machines. I will try to shine a light to both of them in parallel.


1. Hardware Upgrade: 

1.1 Laptops / Portable Computers

Upgrading the hardware of your existing portable isn't so much possible, it is not impossible.

1.1.1 Hard Disk
If you wish to revamp your old machine, the first thing you should consider is replacing your old hard disk (HDD) with a new SSD. It is the main hardware on your system that makes it SLOW !!

Windows operating systems use a lot of memory and hard disk utilization due to its virtual memory management system. Due to the constant read/write of HDDs, the waiting periods and more the annoying hourglass will be on your screen.

First things first, check online for a reliable and budget SSD for your laptop/portable. Most preferred reliable brands are KingstonSamsung, WD, Sandisk. The price of a new SSD is as low as 30$ these days.
Please note:
1. The ideas here are for computers that have been manufactured 2005 onwards as the older machines may have IDE ports instead of the SATA ports which are compatible with today's mainstream and sorry, there are no SSD's with IDE ports. Check your hardware specs to be sure.

2. Though newer SSD's have SATA 3.0 ports which provide faster throughput, they are backwards compatible with SATA 2.0 and SATA 1.0 technology and are still faster than the regular HDDs.

3. Most of the premium laptops, the hard disk isn't very easy to access and may require a technician to replace it for you.  


1.1.2 Memory (RAM)
Most probably the original OS installed on your system was good enough in the good old days, but with so many patches, antivirus software and loads more stuff it has become very little and insufficient. When RAM becomes insufficient, it loads more burden on the HDD as the operating system tries to compensate the loss by using more virtual memory; disk utilization.

Good news is, though your system is old, the memory modules are still globally available as brand new and 2nd hand. Depending on the specification of the RAM compatible with your system, you can upgrade your RAM for a fairly reasonable price up to 8Gb (on some systems it's 16Gb). Please refer to your system's manual for a compatible memory module specification. Good brands for memory modules are once again Kingston, Samsung and Adata. I strongly suggest avoiding buying used memory as no one sells memory modules unless there's something not right about them.

In most systems, it's a simple DIY task which I can guide your through (there are thousands of DIY videos on Youtube for changing memory modules specific to your hardware). Only on a small proportion of systems the memory modules are inaccessible by the user and may require a technician's intervention.

1.1.3 Battery
Yeah, it must be dead a long time ago, right ? Most probably the manufacturer either does not sell the spare battery still or it's available at a price of a new system! Good news is there are OEM batteries that can be trusted that are available globally; also that cannot be trusted. Depending on the model of your system a spare battery can be bought from sites such as Amazon or AliExpress.

I have refined the search links but you will still need to refine it more depending on the brand and the model of your system.


Revive your old PC - Part II - Hardware Upgrades, regarding desktop PCs' will be in my next post.


Thursday, November 8, 2018

Linux - Google inc. to Google LLC.


As Google has decided to change it's name over night from Google Inc. to Google LLC and updated it in the software repos accordingly, many distros update services started to give errors whilst trying to verify the Google Chrome's repo signatures. 


Tthis error message is meant to ensure that the new entity named Google LLC you are fetching Google Chrome updates from is the same as Google, Inc. that your system trusts and knows its signature. By accepting the change, you asking your system to trust Google LLC and accept Google Chrome updates from it in the future.
The error generally states: "Repository 'http://dl.google.com/linux/chrome/deb stable Release' changed its 'Origin' value from 'Google, Inc.' to 'Google LLC'"
To resolve it, simply in terminal type "sudo apt update" and select Yes.



Saturday, June 9, 2018

How to block cryptocurrency mining in web browser? (Part-2 - Solutions)

For the first part, please refer here.

How to block cryptocurrency mining in web browser?

In my previous blog on the subject I had given brief information on how the website owners were secretly trying to monetize by running cryptocurrency mining scripts on your browser, causing your cpu to spike. The common symptom is your CPU gets too hot too quickly when you visit a website (and most probably drains your battery too quickly). 

This method is commonly known as coin-hive mining or cyrptojacking.

How to detect if the site is running cyrptocurrency mining on your web browser?

Check for your browser's CPU usage. Sadly the mining javascript code has been optimized for Windows OS's as it's the most common OS out there. Reseach shows that Internet Explorer and Google Chrome are the ones who gets the most of the polarity as the script allows the browsers to run in the background, even the window is closed. 

But this doesn't mean it doesn't affect other OS'es such as the OSX or Linux. It does. As the most browsers are platform independent and it is executed on the browser, the cryptojacker code functions worse than on Windows computers as it can result in spiking your CPU utilization over 200%.


  1. So first step is to select from browser settings to stop allowing it to run in the background (most people allow their browsers to run in the background due to the addons in the browsers such as the mailcheckers). If the the browser CPU usage is above 50% this generally means, someone is using your CPU without your permission. 
  2. If you know your way around in Windows, you can block access to the mining sites from your windows hosts file (you need admin permission to modify the file). This way by blocking particular domains your browser won’t be able to connect to these domains. We can edit the hosts file and redirect it to 0.0.0.0. Your hosts file is located at C:\Windows\System32\drivers\etc subfolder.

For Linux users. type sudo nano /etc/hosts which will give access to your hosts file. Just add the addresses of the domains to the host file as stated below. 



3. Use browser Chrome browser extensions to block cryptojacking websites from Google web store. Frankly I was going to advise the extension "No Coin", but, though it worked perfectly in the begining, as the developer has stopped updating the code, it does NOT work anymore. Most probably, cryptojackers found a way to bypass the blocker, which makes the addon useless (most sites on the net refer to No Coin as being the best addon, but it's not. That's why I have shared this information). 

Instead I am advising to use "minerBlock" which a simple, lightweight addon which works perfectly. The extension uses two different approaches to block miners. The first one is based on blocking requests/scripts loaded from a blacklist, this is the traditional approach adopted by most ad-blockers and other mining blockers.


The other approach which makes MinerBlock more efficient against cryptojacking is detecting potential mining behavior inside loaded scripts and kills them immediately. This makes the extension able to block inline scripts as well as miners running through proxies.

There's also a minerBlock extension available for Firefox browsers, which also functions perfectly. 

BEWARE: MinerBlock addon should be only installed from Chrome Webstore or Firefox web store as it is known that some n00b has created a fake version of this addon, which when installed, instead of blocking cryptojackers, it plays a loop of videos in the background, causing your cpu to spike. 

4. Though it's not my first preference, you can also block the cryptojack sites by adding custom filter to your Ad Blocker (AdBlock Plus is the best so below are for Adblock Plus)

In Chrome, click on the menu button, More tools, and then Extensions. Find Adblock Plus, click on Options, click the “Add your own filters” tab at the top, and in the text field that appears enter ||coin-hive.com/lib/coinhive.min.js and click +Add Filter. (Note: This is only an example of a domain to be blocked. The complete list can be downloaded from here)

In Firefox, select the Firefox menu (Tools on OS X and Linux), choose Add-ons, and find Adblock Plus. Choose Preferences to access the Adblock Plus profile, click on Filter Preferences, hit “Add filter subscription” and add coin-hive.com/lib/coinhive.min.js. (Note: This is only an example of a domain to be blocked. The complete list can be downloaded from here)

On Android, open the Adblock Plus application and select Filter Subscription. You can’t select multiple filterlists, so you’ll have to change your filterlist subscription.


References:https://www.bleepingcomputer.com/news/security/fake-minerblock-extension-repeatedly-playing-videos-in-the-background/

https://fossbytes.com/block-cryptocurrency-mining-in-browser/

https://venturebeat.com/2017/09/21/adblock-plus-can-now-protect-your-computer-from-being-hijacked-to-mine-cryptocurrency/