Toshiba Satellite R630 power button replace.

This is reasonably easy but you will have to take off the whole underside/back/bottom plate of the laptop. A client managed to break the power button on their Toshiba R630-141 laptop. The button is a single plastic part that consists of the button, a plastic spring leaf and a complex base.

With the screen shut, and upside down, remove the battery (and the power and any other cables if still plugged in). On the underside (base) , unscrew all the screws. There are two main sizes of screws but the short ones have a tiny “F4” printed near them on the case so not too much of an issue if they are mixed up with the longer screws. Remove the 3 cover plates (hard disk, memory and an unused docking port). The back cannot come off until one of the screws under the hard disk cover plate is also removed (it is obscured by the cover plate). Remove the hard disk by lifting the disk up and unplugging its SATA socket. This is attached to a ribbon cable and it has a plastic backed cushion. I did the hard disk removal too but I don’t think it is really necessary. If you do not remove the hard disk then note that the hard disk has no other clamp so be careful it doesn’t fall out and dangle from its ribbon cable when you are looking at the power switch from the front panel.

The whole base should now be removable but you will have to lift the DVD side first to then clear the sockets from the plastic holes on the USB port side. If it isn’t lifting then you may have forgotten a screw. You should now have the back removed and will see the hinges. The power switch is near the power socket. You will have to…

  1. remove the screw that holds that hinge down,
  2. lift up the hinge (it is very stiff but you can do this by your fingers) to clear the plastic cable guide,
  3. ease out the cables (twin, grey and black) and remove the plastic cable guide,
  4. remove the power socket (its cable unclips and it slides up)
  5. unscrew one silver screw that is closest to the power socket on the CPU board and another that is diametrically opposite on this board (these two screws loosen the power/CPU board).

This will allow the CPU board power socket edge near the radiator grills to be lifted up enough (at least 1 cm) to remove and replace the power switch plastic parts that are hidden underneath it.  The power switch button is not screwed in but the plastic casting has guide holes and a plastic spring clip. It is fed down, with the guide pin keeping it in alignment, and then the plastic spring clip clips into the front cover plastic with a firm click. You should see that the button is correctly in its hole (which is what you push from the front).  You can carefully open the front cover to see that the power switch is correctly seated.

Reassemble in reverse order,

  1. Blow out any dust on the base cover. It will have significant dust on the grill
  2. add the CPU board screws (2x)
  3. add the Power cable and socket
  4. add the Cable guide, feeding the twin cable into guide
  5. Push back the Hinge onto the cable guide (it will be stiff) and screw to clamp down cable guide
  6. Refit the hard disk and its plastic backed cushion if you had removed this.
  7. Refit base, click in the USB socket side first. Check no gaps or pinched cables
  8. Re-Install all screws, remember F4 screw holes are the short screws
  9. Reinstall all cover plates

The laptop is now repaired. Reinstall the battery, and power up. Keep an eye on things you may have disturbed such as, CPU cooling, memory sizes, WIFI signal strength, DVD operation, audio jack.

The power button replace should take just over one hour.

Fixing your dedicated IP sending reputation with outlook/hotmail

If you have a mail server with your own dedicated address that you host your own web sites on and send your own emails then you could have your emails rejected by Microsoft properties such as hotmail and outlook.com for no reason other than the IP address space you are in (e.g. the /24 ) has had spammers even though your specific IP address doesn’t SPAM.

You’ll get a rejected message such as,

550 5.7.1 Unfortunately, messages from [x.x.x.x] weren't sent. Please contact your Internet service provider since part of their network is on our block list (AS3140). You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors. [DB5EUR03FT061.eop-EUR03.prod.protection.outlook.com]

All is not lost as you can have the IP mitigated and removed from the block. To do this you’ll have to do the following,

  1. Make sure that your SPF records are acceptable. Without valid SPF records then you’ll find that your emails will be marked as SPAM by servers such as gmail anyway.
  2. Register your IP addresses in the Smart Network Data Services program (SNDS). From this you can monitor the ‘health’ and reputation of your registered IPs by providing data about traffic such as mail volume and complaint rates seen originating from your IPs.  It is in the tools of the SNDS that you will see which of your IP addresses are blocked. To register, visit http://postmaster.live.com/snds/
  3. Then register for the Junk Email Reporting program (JMRP) so that when an Outlook.com user marks an email as “junk”, you will get a copy of the mail. This will allow you to see what you are sending is being marked as junk and to track down email traffic you did not send. To join, please visit http://support.msn.com/eform.aspx?productKey=edfsjmrpp&page=support_home_options_form_byemail&ct=eformts
  4. Remember to CONFIRM the SNDS/JMRP agreement that is sent to your registered email, This is an electronic signature using the Docusign system.
  5. Once you have done this then leave this for 48 hours and confirm that you are not getting any SPAM reports. It is unlikely anyway if it is just an IP that is blocked but the SNDS/JMRP changes take 24-48 hours to propagate.
  6. Now you can request a mitigation of your IP block using the following link, https://support.microsoft.com/en-us/getsupport?oaspworkflow=start_1.0.0.0&wfname=capsub&productkey=edfsmsbl3Fill out the details demanded by the form and submit. Fairly quickly within an hour you should get a number of emails posted to your contact email and hopefully,  if your IP address was just accidentally been discriminated against because of the address block, get a reply that your IP address has been conditionally unblocked (“These IP(s) have been unblocked, but may be subject to low daily email limits until they have established a good reputation.“) . It’ll still show up blocked in SNDS for another day as the blocked list is only updated daily. After a day then your IP should disappear from the SNDS system.

    If you are bulk mailing people then it is simpler and far easier to do that via a bulk emailer such as Mailchimp or  Mailerlite and to not use your own server. Leave your server for your own individual emails.

Fixing the Western Digital excessive load/unload problem with idle3-tools

I have an always-on machine (self made Ubuntu 16.04 based using retail parts) that is lightly loaded in CPU but is continually writing to the hard disks. I recently added a Western Digital 2TB drive ( WDC WD20EZRZ-00Z5HB0 ) about 2 weeks ago (368 hours) and noticed that the Load/Unload cycles was over 30,000.
The other two drives, both WD Blue 1TB ( WDC WD10EZEX-08M2NA0 ) showed up with less than 100 on 15,000 hours so something was very wrong with this new drive in my system.
The fix is to adjust the wdidle3 setting from its default of 80, which means 8.0 seconds, to a bigger number such as 129, which means 30 seconds.

The number on newer drives is not just divided by 10 but is staggered scale so 1-128 is divided by 10 but 129-255 is in 30 seconds increments (129 = 30sec, 130 = 60sec and so on) for newer drives but it is just divided by 10 for older drives. I do not know what is deemed new or old manufacturing date for WD drives.

You can read and set the wdidle3 parameter using hdparm -J option but it has a very cautious warning message as the option is experimental.

You can read the S.M.A.R.T value for the Load/Unload using smartctl from the command line, (or GSmartControl using a GUI) and the ID is 193 thus,

sudo smartctl -A /dev/sdc | grep "^193"

I get…

193 Load_Cycle_Count 0x0032 190 190 000 Old_age Always - 31283

where the 31283 is my current, but now stable, excessive count.

To set the parameter I downloaded and used the idle3-tools from http://idle3-tools.sourceforge.net/ This is a small program that you just untar and make or you can install it with,

sudo apt-get install idle3-tools

I set my drive with…

sudo idle3ctl -s 129 /dev/sdc

…which for new drives means 30 seconds ( and -s 130 would mean 60 seconds and so on) . After you set the value in the drive you must turn off the power to your computer (drive) as the value is read at power up. So do a shutdown and then power off.

I have no idea why Western Digital do what they do but it is not that friendly unless you delve deep. Reading the WD support forums the problem is from many years ago and is still taking place today. I expect to be able to install a disk and not have it artificially age itself but adapt to the load. Equally I have no idea yet if the 30 second value I have set is a better compromise. It has stopped the value increasing and if my programs stall then the disk will unload reasonably early.

Increasing the economic cost of WordPress logins to bad client browsers

With the recent attack on Workpress sites it struck me that if all logons were more expensive in CPU to the clients and if this CPU burden was used to generate crypto currency then whilst normal logon demands would not impact any one legitimate user, a distributed brute force attack would be slowed and at the same time financially aid the attacked web sites. This would thus offset the economic cost to sites that are brute force attacked.

This is a very different strategy from plugins which mine visitors. A logon is a client solicited  request whereas a mining plugin that mines visitors is unsolicited use of the client CPU.

Most human users of WordPress sites stay logged on through  cookies so a one-off load (which could be dynamically adjusted to only kick in inversely proportional to the attack rates) would not be noticed. An attacking client though would suddenly find that WordPress logons become ever increasingly more expensive in client side CPU. The greater the attack rate then the more crypto currency mined for the benefit of the attacked web site.

This would not create a new opportunity for attackers as any attacker that has control of client machines would just mine crypto currency locally on the machine without all the hassle of attacking other machines.

yarn install fails as it is using cmdtest package and not yarn

yarn was previously provided by cmttest and these are very different programs to yarn the package manager.  If you are using software sources (e.g. FarmBot.io)  that are managed through yarn (you will find a yarn.lock file with the software source) but when you try and run yarn install and then you get e.g.

yarn install
ERROR: [Errno 2] No such file or directory: 'install'

then firstly check to make sure that cmdtest is not installed.

sudo apt remove cmdtest

You would install yarn with

sudo apt-get install yarn

See the yarn packager web site for more details on installation.

United Kingdom must remain in the European Union

The United Kingdom must stay in the European Union.

A minority of nationalists have told a large number of lies to skew a gerrymandered advisory poll that has been used by a belligerent government to ignore the future of over half of the electorate to protect its parliamentary seats from the minority of nationalists.

The current Prime Minister May does not represent us.

The United Kingdom has done well in the EU and will do well in the EU in the future. It will not do well outside of the EU free trade area. The Government is trying to take away our citizenship of the world’s richest region. It is absurd and will be undone or it will be the undoing of the United Kingdom.

Gmail always marks emails as SPAM due to invalid SPF.

Two parts to this but essentially Gmail will put incoming emails into the Gmail SPAM folder if you have not configured SPF correctly on your sending domain DNS. It will only say,

"Why is this message in Spam? It's similar to messages that were detected by our spam filters. "

Rather than explaining this exactly, and assuming your test email is not written like a ‘409 letter, then your problem is always related to SPF records.

To make sure gmail will deliver emails from your private servers i.e. on your own domain and not a well known public email domain, you MUST have defined the SPF records correctly for your domain.

Here is a list of what can have gone wrong:

Your server uses IPv6. Gmail will default to IPv6 connections if your SMTP handling server has both IPv4 and IPv6. So you MUST add the IPv6 IP address to the SPF record.

You have incorrectly formatted the SPF record e.g. you have accidentally added double quotes around the record when using a web-style DNS record editor on your DNS/registrar.

To see what SPF records gmail found then select the Spam folder in Gmail and click your spammed email and then pick “More” (which is to the right of the display in the Gmail next to the reply button, and then pick “Show Original”.

You need to find the section for SPF and you now need to look for two things,

Authentication-Results: mx.google.com;
       spf=neutral (google.com: 2b01:499:56:1000:54a9:28c6:0:1 is neither permitted nor denied by best guess record for domain of listbounces@bam-monaco.org) smtp.mailfrom=listbounces@bam-monaco.org

A GOOD result is,

Received-SPF: pass (google.com: domain of listbounces@example.org designates 2b01:499:56:1000:54a9:28c6:0:1 as permitted sender) client-ip=2b01:499:56:1000:54a9:28c6:0:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of listbounces@example.org designates 2b01:499:56:1000:54a9:28c6:0:1 as permitted sender) smtp.mailfrom=listbounces@example.org

 

Joomla 1.5 quirk in [20151206] – Core – Session Hardening patch

The Joomla 1.5 (EOL) patch to the session.php file has a quirk in it that raises a warning notice. The advisory is

[20151206] – Core – Session Hardening

but if you blindly copy that file to your system then you will end up with a web site that raises many error messages,

Notice: Only variable references should be returned by reference in /libraries/joomla/session/session.php on line 343

I thought there would be a fix for this but when I googled for that message I found thousands of hits to broken Joomla web sites. Yes, hundreds of web sites are busted in that they have lots of error messages ! The fix I have done is easy, edit the NEW session.php file you have downloaded and edit this as follows to pass a variable back,

--- /home/admin/Downloads/JOOMLASESSEIONHARDENFIX/sessionNEWSESSIONHARDEN.php
 +++ /home/admin/Downloads/JOOMLASESSEIONHARDENFIX/sessionNEWBORKEDEDITED.php
 @@ -339,8 +339,13 @@
 $error = null;
 return $error;
 }
 -
 - return $this->data->getValue($namespace . '.' . $name, $default);
 +
 +// removed this next line as it generates a Notice: Only variable references should be returned by reference error
 +// return $this->data->getValue($namespace . '.' . $name, $default);
 +// and define a variable with the data to be returned....
 +
 + $getnamespacenamedata = $this->data->getValue($namespace . '.' . $name, $default);
 + return $getnamespacenamedata;
 }

/**

If you don’t know what to do with this change to get rid of that error message then you are going to have to find someone who has some PHP/Joomla experience to edit the files for you.

No posts in WordPress after server/php migration due to obsolete/broken plugin

The scenario is that you restore you files and database to a new host and then when you access the dashboard (as well as the front end) you see no posts. They are listed i.e. All (nnn) Published (x) Draft (y), but there are none displayed.

Equally, you upgraded the current server to a new version and this upgrades the php version.The site may work (with blank list of posts) or the site may break and the frontend or administration cannot be accessed.

We had this and for us it was a very stale plugin that should have deleted years ago (Psychic Search) !.

If this happens to you and you have back-end access to the administration interface then deactivate all plugins that are old until the site comes back correctly.

If the site is so broken that you do not have access to the administration interface then you can use FTP to go to wp-content/plugins and then go through the change date and from the oldest dated plugin, download it (to take a backup) and then delete the plugin. When WordPress tries to load the now-deleted plugin then it can’t and the plugin becomes deactivated. This should get you back into the site and you can then use the administration interface to either install a updated version of the broken/obsolete plugin or an equivalent that does have support for your host/php version.

Acer Aspire ONE no WIFI in Ubuntu due to hardware switch state

Intermittently when an Acer Aspire ONE suspends in Ubuntu 14.10 then the WIFI does not come back. The hardware switch (a non-latching slider switch on the front right hand side of the laptop) has no effect. Rebooting and disabling/enabling Networking has no effect.

The rfkill list command will show,
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: yes

One way I found to clear this is to power down the laptop and then hold the WIFI switch to the right i.e. in the on position and then use the power switch to turn on the laptop as normal but keep the WIFI switch held on. You should see the little orange WIFI  LED blink once and once the laptop is starting to boot up after the BIOS display then release the WIFI switch so it flips back to the left/off position.

The WIFI should be back to normal now and the rfkill list will show Hard blocked: no.

Older Transmission-gtk stops working after Ubuntu 15.04 upgrade

Upgraded my development machine from Ubuntu 14.10 to 15.04 and found an odd quirk with Transmission-gtk. The symptom was that Magnet links would not load from Firefox even though magnet is associated with transmission-gtk (to see this go to about:preferences#applications in Firefox and search for magnet)

I ran the transmission-gtk from a terminal and got,

transmission-gtk: error while loading shared libraries: libminiupnpc.so.8: cannot open shared object file: No such file or directory

This was strange as the packages depended upon libminiupnpc.so.10 so I then did a which transmission-gtk and it was /usr/local/bin/transmission-gtk and not the expected /usr/bin/transmission-gtk and I then remembered that I had manually installed Transmission version 2.83 on top of the older package manager version because the older package manager version of Transmission-gtk  in Ubuntu 14.10 would intermittently crash. As an aside if you really want the manually installed 2.83 version to run in Ubuntu 15.04 then you can symbolic link the relevant library with this,

cd /usr/lib/x86_64-linux-gnu
sudo ln -s libminiupnpc.so.10 libminiupnpc.so.8
sudo ldconfig -v

I eventually decided to uninstall the manually entered version by going to my source built directory and doing a sudo make uninstall

After you have uninstalled the manually entered version then a which transmission-gtk should return /usr/bin/transmission-gtk

The Transmission version with Ubuntu 15.04 is now 2.84 (onwards).

Once you have fixed it that the transmission-gtk can launch then clicking magnet links in Firefox now works.

FreeSWITCH bootstrap libtool not found – missing libtool-bin

Was rebuilding FreeSWITCH source and had upgraded my test machine Ubuntu from 14.10 to version 15.04 so I did a make uninstall on FreeSWITCH and reran the bootstrap.sh but it came up with the error of libtool not found.

Libtool (2.4.2) was installed but what I found is that I had to add libtool-bin with,

sudo apt-get install libtool-bin

Then bootstrap.sh worked fine.

Windows XP stalls when opening DOCX.

A client has a Windows XP machine (due to be migrated) and it was very slow to open DOCX documents. This stalled Outlook when Outlook launched DOCX attachments and it stalled explorer from the File Manager too. The fix was simple – right mouse the document properties and reset the “Open with…” to the same Office program and the problem goes away.

ASUS X51R laptop CMOS battery bad causes blank screen no boot

The ASUS X51R laptop exhibits a strange failure when its built-in CMOS battery is dead or low. Rather than having some kind of fall-back it basically ceases to operate from power-on. In some cases it will post a message about CMOS battery low but when you continue then it stays on a blank screen and doesn’t boot. Most of the time it will just power to a blank screen i.e. the laptop seems to startup and have fans and disk startup but no further POST or booting into the operating system. The “Zz” light may be on all the time but that is not relevant.

A client got this problem – one day it was booting fine and the next it was a blank screen so there is no early warning of impending failure.

The CMOS battery is a 3 Volt CR2032 style battery. These last for around 7 years so always keep them in their packaging so you can see the expiration date. Ideally use a new battery from a trustworthy supplier for a client laptop as it takes a long time to replace.

To change the CMOS battery you need to do a complete tear down of the laptop to the motherboard. There is nothing unusual with this teardown – if you have never stripped a laptop then this is not a job for you. I have done a lot so this was pretty trivial tear down,

– remove main battery, memory, hard disk, and WIFI
– remove all visible screws on bottom and back (they are all different sizes so draw a picture and keep them in separate piles),
– push in the 3-tabs at top edge of keyboard and lever out keyboard (unclip ribbon cable),
– lay screen fully back and lever up plastic covers on screen hinges and the curved plastic cover that is in the middle that is over the screen cables to motherboard plugs
– unclip the screen cables from the motherboard and flip over and unclip the WIFI cables and poke the wires out as you remove the screen (the screen itself just stays assembled to its hinges with 2x WIFI cables and 2x multi-way screen cables attached)
– unscrew the screws that you can see that were being hid by the keyboard and that were hidden by the screen that hold the top cover down
– unclip the narrow touchpad ribbon cable and pop up the top cover,
– unscrew the screws on the motherboard – there is a arrow-head symbol near each hole that marks which holes are used but ideally draw a picture and keep the screws seperate,
– unclip the fan assembly and cable, the speaker cable (towards middle front of motherboard) and battery feed ribbon cable and remove the DVD/CD drive if it’s not yet removed (it should slide out as its retaining screw is removed),
– carefully lift out the motherboard,
– you will see the battery on the bottom – it is a standard fitting – use a screwdriver to pop in the retaining tab and then remove and dispose – remember which way it was oriented but the +ve case side should be up (-ve small disk side down),
– do not use your fingers to touch your new battery but remove it from its packaging and clean your new battery with a clean dry cloth and then insert into the socket without touching it with bare hands. The reason to not touch it is that your hands have oil on them and over many years this can corrode.
– Re-assemble in reverse order.

Before re-assembling fan then please clean out the dust. There is nothing special to remember on re-assembly.

When assembled then it will boot instantly without any problems. The date and time will be wrong (reset to 2007 or similar) but you can easily reset this. With a new CMOS battery the laptop should last for another 5-7 years. The whole job takes about 1.5 hours.

Opera slow Flash due to multiple plugin locations enabled

I use Opera as one of a number of browsers for testing purposes. Noticed that Flash was jumpy (Opera 12.16 with flash 11.2 r202 on Ubuntu 14.04 64 bit). It took a while to find the problem but I believe that it was due to multiple flash plugins enabled. To see what plugins are enabled go to,

Opera -> Page -> Developer Tools -> Plug-ins

(or the shortcut URL of opera:plugins )

If you see multiple locations of the Shockwave flash enabled then disable all except one e.g. leave the one located at,  /usr/lib/mozilla/plugins/libflashplayer.so enabled.

Restart Opera and hopefully this may clear your problem.