Category Archives: pc

Cannot downgrade Xiaomi Router 3 firmware to development version

I bought a Mi Router 3 for the express purpose of installing Padavan firmware on it, but lo and behold, I could not for the life of me install the BIN file for the 2.11.20 development version of the firmware (see here and here) as, when choosing the BIN file from the browse file dialog of the router web interface, the popup just went numb, no action, no buttons, no upload activity. Tried many times it with Firefox Chrome and even Internet Explorer AND Edge, NOTHING!

Then, I found in a forum (can’t remember for the life of me where) that there is an alternative method do to it:

  1. Put the BIN file in an empty USB pendrive
  2. Turn off the router (unplug the power)
  3. Place the USB stick in the router
  4. Press the reset button on the back of the router, and while keeping it pressed plug in the power, and STILL keep the reset switch pressed
  5. Stay there like this for a while contemplating on the meaning of existence
  6. In my case I noticed that after a while (10-15 secconds maybe?) the front led was flashing in a different way than when it just booted up, so I figured I could finally leave the reset switch be
  7. I connected to after a while when the front led became static blue and, go figure, the firmware had downgraded

lftp and source: Is a directory error

I was running lftp with the -f switch to launch the usual mirror command, working fine with a few ftp servers at first, but when I added another sync with a pure-ftpd server something stopped working as intended: the message

source: Is a directory

appeared and nothing more happened, only after I pressed Enter the script went on with the execution.

What helped me was this discussion.

so I changed my script, and instead of having

open host
user username password
mirror blahblah

I used

open -u username,password host
mirror blahblah

and everything was magically fine!

Why? NO IDEA. Who cares. Works now.

Windows 10 bluetooth not working on Asus UX51VZ and Centrino Advanced-N 6235

Long story short, my bluetooth mouse, a Logitech Mx Master 2S, disconnected out of the blue, first times I just had to turn off and on bluetooth on windows, once the bluetooth device was automatically disabled because “it caused problems” and I had to restart, finally it stopped working altogether, always telling me “try connecting your device again”. I tested it with every other bluetooth device I had handy, to no avail.

Wasted maybe half an hour, on my almost nonexisting free time schedule (AAARGH)

So finally I had the nice thought of checking, from device manager, if there were updated drivers for the chipset responsible for wireless (WiFI and Bluetooth), a Centrino Advanced-N 6235. I updated it since it automatically downloaded new drivers, restarted as I was asked, and even if wifi kept being shitty, the bluetooth mouse finally connected, as did my android phone.

Change user of transmission-daemon under Debian and Raspbian

UPDATE: Cristian commented adding a nice solution (which I didn’t personally test though, so it’s on you):

  1.  run chmod 775 on the download folder, with -R option (recursive on subfolders):
    sudo chmod -R ug+rw folderName
  2.  add your own user (the one you need to be able to access the downloaded files) to debian-transmission group, or any other group that the transmission daemon belongs to:
    sudo usermod -a -G groupName userName

And that would be all.

Though, after some tinkering that occurred as of june 2019, I found that my original, following, solution has a -probably- nicer “feature” for someone: the config folder of transmission is saved in your own home under the .config/transmission-daemon/ folder, instead of /var/lib/transmission-daemon/, in my case this saved some waste of time because I had the home folder backed up, while the rest of the system was installed from scratch.

This is the original article with the original solution.

I have a raspi3 running transmission daemon downloading to an external USB drive shared via Samba. I don’t want to keep using debian-transmission user with the daemon since just switching to my user account having the access rights to the external USB is much simpler.

I had it already nice and running before, but updating the daemon with apt-get messed everything (and lost all the running torrents as well) so I had to rediscover the procedure once again, and for posterity (and myself for future occasions) I’m writing it down here.

All the missing torrents appeared again after I solved the issue.

Periodically I myself come back here, since at every update of transmission, the service username is restored to the default value, and my Web UI doesn’t work anymore. That’s my cue to open my own tutorial and follow it.

So, here are the things you need to do:

  1. run sudo service transmission-daemon stop just in case
  2. edit /etc/init.d/transmission-daemon to have USER=username
  3. edit /lib/systemd/system/transmission-daemon.service to the same effect
  4. run sudo chown -R user:user /etc/transmission-daemon/
  5. run sudo chown -R user:user /var/lib/transmission-daemon/
  6. restart the service with sudo service transmission-daemon start


According to a comment of this article, this might not work for you, so instead you might want to follow this guide instead:

Create STL from DICOM with 3D Slicer

Pretty much a self reference post, based on Slicer v. 4.6.

  1. Open the relevant DICOM set.
  2. Open the Crop Volume module
  3. In “Input ROI” dropdown select Create new AnnotationROI
  4. In the slices view adjust the selection so only the interesting area is covered (if you cannot see the delimiters of the crop rectangle, then zoom out the slice view -dragging with right mouse button- until it’s visibile, then move/resize it panning the slice view -dragging with middle mouse button- and then finally rezoom until you are satisfied adjusting the selection)
  5. Click on the Crop! button and see how the slices are cropped to the set area
  6. Open the Editor module (you can select the GenericAnatomyColors palette)
  7. Click on the coloured rectangle on the Label: row, and choose your relevant structure (if you’re here you probably want bone)
  8. Click on ThresholdEffect button (third from last from the effect buttons)
  9. In the Threshold Range input area that just appeared set a starting value of 300 HU (Hounsfield Units) which usually is a good starting density value for bone
  10. You will see the relevant areas blinking in the slices images, and you can adjust the density range by using the small arrow buttons on the side of the lower value of the range
  11. When satisfied, click Apply
  12. Click on the MakeModelEffect button, first from last, and right after click Apply
  13. After a while (depengin on how large is the ROI and how complex is your structure) the rendered model will appear in the 3D view
  14. Click on the SAVE button in the top tools bar, and deselect every entity except the last one (usually named bone if you followed this tutorial), and then choose the STL format in the dropdown on the side (VTK format is selected by default), plus change to your needs the saving folder, and press the Save button
  15. Profit!

Share mysql and apache folders from windows XAMPP to linux XAMPP

This is a replica of the article by jultech from 2007 for posterity and data-replication purposes.

When dualbooting between windows (first OS installed) and linux, do this:

~ # mv /opt/lampp/var/mysql /opt/lampp/var/mysql.BACKUP
 ~ # ln -s /mnt/windisk/path/to/XAMPP/mysql/data/ /opt/lampp/var/mysql
 ~ # mv /opt/lampp/htdocs /opt/lampp/htdocs.BACKUP
 ~ # ln -s /mnt/windisk/path/to/XAMPP/htdocs /opt/lampp/htdocs

This creates a backup of the original XAMPP folders in linux, and them symlinks them to the windows disk mounts.

Restart XAMPP to have th configuration running.

Thank you jultech.

Fix mount: unknown filesystem type ‘isw_raid_member’

You may also get ‘linux_raid_member‘ instead of ‘isw_raid_member‘, usually it’s the same.

So you probably have run through other tutorials telling you not to mount directly but to mount the raid instead…. but you have no raid!

Maybe though, you HAD a raid back in time, and you removed it leaving the disks as separate storage, and in that case there would be “rogue” raid metadata on the disk that makes linux (mint in my case) think it is a raid, and get confused.

Thanks to Chris_F I finally solved it, you need to use dmraid (install it if it’s not on the system, via apt-get) to remove those orphan tags:

sudo dmraid -rE /dev/sdb

In my case, this instantly showed the disk in file manager.

Enable Dolby Digital Live Surround 5.1 in Far Cry 4 and Watchdogs

Self reference, and also a heads up for those people looking into listening to 5.1 surround sound in Far Cry 4 and Watchdogs which usually play no sound when Dolby Digital is enabled.

This was tested and works in my configuration using a Sound Blaster USB Surround Pro X-Fi, and doesn’t involve any patch or hack, but a simple linear procedure; the first step is to download the latest drivers from Creative website (may ’14), and then, as the good sir melgu said on steamcommunity:

  • Open Creative Entertainment Console
  • Click on the Dolby Digital Live icon
  • Check the second box (a warning will appear, read it to undestand what it does, then accept clicking Yes)
  • Open Change Sound Card Settings from Windows Start Menu, and set the entry Speaker (Sound Blaster blahblah) as the default peripheral
  • Test your games


Power efficiency of ATX PSU, power adapters and UPS

This article goes hand in hand with my previous one, since the findings I report in here are those that led me to update the power source of my server.

When you buy a PC, usually the PSU is the last of the worries: the more Watts it’s got, the better, as it can handle all the power hungry hardware you plug to it. Also, usually, this is “just right”, as we use our main PC for just a few hours per day (as long as you make sure you either use suspend for short pauses, or hibernation for longer ones, so you don’t waste energy while you’re not actually using it).

When it comes to servers tho, that are made to run 24/7, power efficiency is of paramount importance, because, make your own calculations, a single watt, year-wise, will be going to cost you something. Using my estimates, and living in Italy, for each watt of consumption of any always-on electric appliance, I will pay, after a year, about 1.75€. Not much in itself, but try and multiply it by 100.

Also, the more power you use, the more you end up polluting the environment, and raising the earth temperature.

So, of the 100, 150 or 200W-whatever that your PC drains, how many do you think are really needed to run the PC, and how many go wasted in the form of heat? For each fan you need inside you PC, you are raising one notch the waste-index of the computer.

Giving for granted the waste of power that goes into the hardware itself, I am going to talk about what regards power supply units, the PSU boxes that nawadays are very nonchalantly sold in the range of 500W-1000W. Do yourself a favour and buy a wattmeter (kill-a-watt or whatever you call it) and measure the power absorbed by your home computer, it will surely be way lower than the maximum rating of the PSU it’s using; the more the real load is distant from half the nominal power of the PSU, the more you’re wasting in heat, since the efficiency of a PSU is a gaussian curve that has its peak (be it 70% in the old fashioned PSU’s, or up to 86% in the newest ones) at 50% the maximum load. In other words, if the hardware in your PC drains 100W, you should get a 200W PSU, even if nowadays it’s hard to find one, so it’s still better a recent 86+ 5ooW one.

For a simple comparison: my current server, before I did the complete switch described in my previous post, was equipped with a 350W PSU, the only one I had available, and it drained little more than 42W in idle. One day, I had too much free time in my hands and went scavenging for other PSU’s, so I had the chance to test it with a 250W PSU, and the drain lowered to 39W, while, with a very old, and supposedly very inefficient, 120W PSU, the drain went even lower at 37W. As soon as I bought and installed a PicoPSU, and connected it to a PSU brick rated 12V@3A that I had from an old external disk, I got a surprising 29W drain while in idle, a total saving of 13W off the 350W PSU. Translates to roughly 23€ savings in a year… the amount it costed me to buy the PicoPSU from the US. A break-even after a year is a good break-even, I say.

Uninterruptible power supplies are another source of waste, even if you would never suspect it: my car-battery modded UPS drained an additional 10W in idle; thinking about it, though, it makes sense, as with a UPS you’re doing an additional conversion, from 220V to 12V, or from 12V again to 220V (in the PC it goes even one more time from 220V back to 12V), which is intrinsically inefficient. In a year, 10W would mean 17€, more than what I paid for a 120W 12V fanless power adapter from China; I already had the car battery, so again a one-year break-even by exchanging the UPS with a plain AC/DC 12V adapter, good!

Low power consumption server with integrated car battery UPS

I wrote in another post how I simply attached a car battery to a standard market UPS to give it even more juice; in that occasion, several users commented how I committed several shortcomings regarding the assembly.

Also taking into consideration that comments, this morning I rearranged the power supply of my home server to make it more silent and power efficient/independent.

On a side note, most comments were centered about me using thin cables to connect to the battery, with the reason that a car battery can deal a lot of amperes together, making a thin cable overheat, leading to possible fires. At first I credited them, but then I realized something, for which they should also get back to earth: we are not talking about shorting the battery leads for test purposes, but about using a day-to-day load, especially since it’s a low-power home server that together with accessories drain maximum 60W, which is 5amperes at 12V voltage.
Enter PicoPSU: you get a little toy able to give out up to 95W constant power (with my own model, but they make them up to 160W), which is 8amp at 12V. There is an 8 amperes current flowing through the cable running from the barrel connector of the PicoPSU… now please go and check the thickness of those cables. If those are enough for 8amps, how should 220v cable not be enough for 5 amps (tops, make it 4 on a regular basis)?

Back to us, my idea was to save the most possible on power waste, and have a silent PC that could sustain moderately long blackouts.


  1. Your favourite hardware configuration for home server/automation (I bought a D510MO from Intel, with a dualcore D510 64bit Atom, put 2GB of RAM on it, a PCI DVR card, and a 2TB Samsung disk, the cheapest I found)
  2. A picoPSU power supply or something similar (I bought for roughly 20€ off the US a PicoPSU80, rated for up to 95W max, but I’ll need way less than that)
  3. A decent 12V power adapter, preferably fanless, that can manage the load you’re going to put under it, plus some more (mine came from China, but it’s ISO and CE compliant, and apart from the build quality which looks sturdy, it can take up to a nominal 120W load, that is 10A@12V)
  4. A car battery, must not be new, but should be able to hold its charge for a while, otherwise it’s pointless to use it

Here goes.

server insides
This is how deserted the tower case (courtesy of someone who abandoned it near a garbage can) looks, but it's fine, as I have the space, and I want air to be able to circulate freely inside without needing fans.
12v barrel connector on tower case
Detail: I used a pre-existing screw hole used to hold in place the old PSU, enlarged it with a drill, and fitted the PicoPSU barrel connector inside. Notice the thin cables coming out of the connector (those are apparently perfectly safe for 8amperes).

NOTICE: Be ABSOLUTELY careful when handling the following step: never, Never, NEVER make it so the battery leads are shorted together, or you will be in for a GREAT amount of PAIN, including, but not exclusively limited to: electric shocks, fire, tools welded to other tools or to the battery or to rings (NEVER wear rings or similar metal things on you while doing this). Additional word of advice: when connecting a cable, make sure the other end is either not naked, or if you removed the coating already, put a strip of insulating tape around it, you don’t want it to make contact around; this is especially true when you have both cables connected, as the naked ends may make contact between them. When you are about to connect the battery to the load, uncover a cable end at a time (first the positive, then the negative), and not both together.

car battery negative lead
In the "car battery ups" post I wrote, several people criticized how I made the connections to the battery, both plug-wise and cable-wise. This time, I used cables 3 times larger, and since I didn't have a proper car battery clamp, nor wanted to buy one/disassemble from somewhere, I just curled the copper wire around the lead. Ugly, but in the end it's as much effective as a regular clamp (try and confute). I only had ground cables that big, so who cares, I just tagged them with coloured tape to tell them apart.
cabled car battery
Sexy. This is the final result: didn't have red insulating tape either, so I used black for negative, and white for positive.
cabled 12v 10A 120W power adapter
The cable panel for my adapter, large white cable is 220V mains input, ground cables are battery leads, and grey ones are the load (server + lcd monitor + modem/router + other stuff). Before you go and start bashing me because it's ugly: I don't care, it works and it's safe. Also, it's not visible in this picture, but each cable has its own white/black tape tags to tell if it's positive or negative lead.

Results were as following: I plugged the battery leads while the ac adapter was already powering the server, and no problem whatsoever popped up; after I did it, the wattmeter I was using immediately went down quite some figures, as the charged car battery was sharing the load together with the 12V PSU. With this setup, I can plug in/out the mains plug with no effect whatsoever on the server: load, PSU and battery are all in parallel, so it 220V inlet dies, the battery takes all the load with no hassle.

Currently, the wattemer is showing quite a lower load, since the battery was all charged: I expect it to slowly raise until full consumption, which should be little more than 42W (full stuff load, plus something more to keep the battery charged).


What would have you changed, and what do you like/dislike about this mone-morning project?