Checking Western Digital Green load cycle per hour / Intellipark issues

I got a few Western Digital Green hard disk. I’ve read they have been rebranded blue now. It was supposed to be hard disk with long consumption, possibly lower speed due to low rotation. Low rotation, you would assume: longer-life span, since usually, mechanical devices lives longer when running slower.

But when you do realize that these Green have the shortest warranty possible (2 years against 3 or 5 for others), you wonder.

And then, when you have a hard disk that starts to fails, you learn stuff like these Western Digital Green having a 8 seconds timeout to park the drive (yeah, like in old DOS era, when you where using park before shutting off your computer). I assume it is to save energy but it takes no genious to evaluate the result if your system writes every 10 seconds, which is not un unlikely scenario.

I am not talking theory, I do have a failing Western Digital Green 2Tb (WDC WD20EZRX-22D8PB0) that is just 2 years and a few months.

With different cables and different mainboards, power supply units, etc, it sprouts:

 [ 3996.054577] ata7.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[ 3996.054580] ata7.00: irq_stat 0x40000001
[ 3996.054585] ata7.00: failed command: READ DMA EXT
[ 3996.054595] ata7.00: cmd 25/00:08:00:88:e0/00:00:e8:00:00/e0 tag 17 dma 4096 in
 res 51/04:08:00:88:e0/00:00:e8:00:00/e0 Emask 0x1 (device error)
[ 3996.054598] ata7.00: status: { DRDY ERR }
[ 3996.054600] ata7.00: error: { ABRT }
[ 3996.055191] ata7.00: failed to enable AA (error_mask=0x1)
[ 3996.056015] ata7.00: failed to enable AA (error_mask=0x1)

So what about this wdidle3 timeout and resulting Load_Cycle?

# hdparm -J /dev/sdd
 wdidle3 = 8.0 secs

# smartctl /dev/sdd -a | grep Load_Cycle
193 Load_Cycle_Count 0x0032 116 116 000 Old_age Always - 253474

253474 for recent hard disk? I’ve read the life expectancy is usually between 300000 and 1000000 load cycle count. But as reference, I’ll check my other hard drives on the workstation I put the disk to test:

# DISK="a b c d e"
# TMP=`mktemp` && for disk in $DISK; do smartctl -xa /dev/sd$disk > $TMP ; grep "Device Model" $TMP ; hdparm -J /dev/sd$disk 2>/dev/null| grep wdidle ; grep Power_On_Hours $TMP ; grep Load_Cycle_Count $TMP ; Count=`grep Load_Cycle_Count $TMP | grep -oE '[^ ]+$'` ; Hours=`grep Power_On_Hour $TMP | sed "s/\s[(][^)]*[)]//g" | grep -oE '[^ ]+$'` ; if [ x$Hours != x ]; then echo `echo print $Count/$Hours. | perl` load cycles per hour ; echo ; fi ; done
Device Model: WDC WD5000AZRX-00A8LB0
 wdidle3 = 128 ??
 9 Power_On_Hours -O--CK 075 075 000 - 18587
193 Load_Cycle_Count -O--CK 121 121 000 - 239519
12.8863721956206 load cycles per hour

Device Model: ST2000DX002-2DV164
 wdidle3 = 1 ??
 9 Power_On_Hours -O--CK 094 094 000 - 5385
193 Load_Cycle_Count -O--CK 099 099 000 - 3617
0.671680594243268 load cycles per hour

Device Model: WDC WD20EZRX-22D8PB0
 wdidle3 = 8.0 secs
 9 Power_On_Hours -O--CK 090 090 000 - 7672
193 Load_Cycle_Count -O--CK 116 116 000 - 253490
33.0409280500521 load cycles per hour

Device Model: WDC WD2001FASS-00W2B0
 wdidle3 = 128 ??
 9 Power_On_Hours -O--CK 038 038 000 - 45726
193 Load_Cycle_Count -O--CK 073 073 000 - 382183
8.35811135896427 load cycles per hour

Depends obviously of the purpose of the hard disk. Still, the affected Western Digital Green, with its 33  load cycles per hour stands out, in the wrong sense. At this rate, the first disk would reach 613000 load cycles instead of 239519 by now, likely a goner already.  And the last one would be around 1509000, a goner definitely too!

Then on a  server:

Device Model: ST4000DM005-2DP166
 wdidle3 = 1 ??
 9 Power_On_Hours -O--CK 090 090 000 - 9091 (43 85 0)
193 Load_Cycle_Count -O--CK 100 100 000 - 400
0.0439995600044 load cycles per hour

Device Model: WDC WD40EFRX-68WT0N0
 wdidle3 = 300 secs (or 13.8 secs for older drives)
 9 Power_On_Hours -O--CK 062 062 000 - 28038
193 Load_Cycle_Count -O--CK 200 200 000 - 653
0.0232898209572723 load cycles per hour

We have read too an infamous Western Digital, but not a Green, so the widle3 is much less extreme.

What about on a laptop (Lenovo 20017 IdeaPad Y550 ) ?

Device Model: WDC WD5000BEVT-22ZAT0
 wdidle3 = 8.0 secs
 9 Power_On_Hours -O--CK 041 041 000 - 43353
193 Load_Cycle_Count -O--CK 001 001 000 - 889112
20.508661453648 load cycles per hour

Gasp! But wait, isn’t it a Western Digital Blue – so, Green rebranded?

Questioned about this kind of issue, it seems that Western Digital claims “we’ve not seen the drives fail over high load/unload counts”. It may be right, maybe the problem is something else. But that the only odd thing noticeable to me. And I am apparently not the only one questioning Western Digital statements, if not challenging them.

As you can see, I got a few disk from this brand and must say even the Western Digital knowledge base entry titled “The Load/Unload counter for S.M.A.R.T Attribute 193 continues to increase under some distributions of the Linux Operating system and some Windows applications”  is not what I expect as customer. They do not question their 8 seconds timer, which is questionable – I do not care about their very own opinion about how often a system should or should not write to a disk.  They claim the issue “artificially increases the number of load-unload cycles”. There is nothing artificial, it simply does increase. They say it is no problem because they are “within design margins (drive has been validated to 1 million load/unload cycles without issue)”. But my test shows that it is out of proportions in any case, for no real added benefits.

I have to admit the issue is not new. But if you do not especially pay attention to hard drives in general, why would you be aware of it.

What to make out of this?

First, on the laptop, I’ll disable this widle3:

# apt install idle3-tools 
# idle3ctl -g /dev/sda
Idle3 timer set to 80 (0x50)
# idle3ctl -d /dev/sda

Myself, I think I’ll stay clear of Western Digital all together.





Build a simple mobile music player with mpd and a Raspberry Pi B+

Turned out that my kitchen device was not satisfying. Not for the reasons suggested in comments, not because I wanted to use cheezy OS like the ones actually supported for most tablets (last time I checked, you cannot get a decent libre OS with full hardware support) for instance. But  the Raspberry Pi B+ is just not powerful enough to browse Internet of these days with such a resolution. It is just too slow.

On another hand, for years, I had issues with a declining portable music player I have plugged into the car audio system (that have RCA connectors or otherwise only specific mp3 files support). Either it got stuck on some files, or it had problems to recharge. And even working best as it could, the random mode seemed to have a few songs in favor.

So, for less than 30 €, I ordered a tactile 3,5″ screen from Quimat. It work fines with Raspbian, provided you use their specific script that you can obtain via (otherwise the screen would  remain white):

git clone

The box isn’t perfect, on one side the screen won’t be properly supported. But I do not intend to put my paws so much on it so let’s say it is acceptable for such price.

Then, to get some acceptable music player system, I went for a mpc/mpd solution, not wanting to bother with Kodi or any complicated solution that might not work or require a dedicated system other  than raspbian.

So I ended up with mpd along with awesomewm and a few wrapper scripts for mpc just build playlist or send OSD notifications.


(since the screen I improved the icon set, removed the visible cursor)

I use cava to provide a visualizer. Access to the device is made through anonymous Samba. My -utils-mpc package carries such setup mostly based on mpc-monitor (check currently played, could be used to made stats or scrobbling later), mpc+notify (run mpc command with sendnotify call),  mpc-playlist-build, mpc-playlist-next and few sample conffiles (awesome/rc.lua, smb.conf, redshift.conf + extra details in the README about input calibration, mpd.conf).

This Raspbian was purged of systemd, because I do want unexpected troubles, and of pulseaudio, because it causes mpd sometimes to stall and works perfectly without.

All files at stored in the main mpd music directory. Any file within a subdirectory will be treated as belonging to a specific playlist.

Plugging the USB energy input on the car relevant plug generates some odd noise: it has to be plugged to an energy bank. It seems to draw very little power.

Last step was to fill the 32GB USB key serving as storage for the music directory. Turns it was quite boring to hand pick such amount of files. So I used another quite crude script to fill it, taking randomly two thirds of available files for a given directory (a band name):


if [ ! -d "$PWD/$1" ]; then echo "$PWD/$1" not found && exit; fi

LIST=`find "$1" | grep -v .JPG$ | grep -v .jpg$ | grep -v .png$ | shuf`

for file in $LIST; do
 [ -d "$file" ] && continue ;

echo $COUNT
THIRD=$(($COUNT / 3))
echo a third is... $COUNT
# div by 3 and and skip this count

if [ "$2" ]; then COUNT=$2; fi

echo but... $COUNT

for file in $LIST; do
 if [ "$COUNT" -lt 0 ]; then exit ; fi
 [ -d "$file" ] && continue ;
 #echo $COUNT $file
 COUNT=$(($COUNT - 1))
 cp -v "$file" $DEST/`basename "$file"`

Quite crude indeed. mpc-monitor could be used to make stats to, in the end, remove unwanted out. But for now it should properly replace dying mp3/ogg player that you have no control over beside the power-off and play button.

Sure, maybe there are cool mp3/ogg/whatever players out there that could come for cheaper. Not really the point, I enjoy having full control over this one, even if I am not using more than 0,001% of this power. And, BTW, I intend, for another pre-electronics vehicule, to get a proper setup with music player and GPS so any experience in this regard is worth it.





Build a simple kitchen terminal out of an old laptop screen and Raspberry Pi

On some occasion, it is practical to have a terminal in the kitchen, mainly to check on recipes. While a phone screen is not that great, a tablet would do. I do not have any tablet and I am not that fond of systems readily available on tablets. But I do have a few old laptops around plus a Raspberry Pi B+.


The following RasPi.TV‘s video explains it all:

Quite straightforward, you unmount and identify your screen. So for my Dell Latitude C640, I got a Samsung LTN141X8-L02 14,1″ screen for which I easily found a controller board kit on ebay for 21,5 €.IMG_20170122_115114.jpg

Here’s the back of the said screen, with the original inverter board still attached. The kit will include another one.

Once acquired, there is not much to think about, everything just have to be plugged where it belongs according to the seller docs:


Obviously, you need to buy also a HDMI cable and a power adapter power adapter (12V, 4A).


Obviously, as it is no tablet, it requires peripherals. I opted for a slim USB wireless keyboard with trackpad and some USB powered stereo speaker. These devices will be powered by the Raspberry Pi (a phone charger can be plugged to the keyboard to recharge it).

Finally, the charger and the Raspberry are plugged onto a power socket with 5V USB. It will be used to put on/off the whole.

Afterwards, I put the screen within a cheap photo frame and fixed the rest on some board.

That frame looks too fragile, though, I would recommend to build a proper one instead.


1/ Raspbian desktop

I first tried some default Raspbian. Epiphany web browser is as bad as you cannot even set a default webpage without editing the .desktop files. And once it is done, it crashes on mediawiki standard page layout. Raspbian also fails to properly open videos (OMX sprout error messages, even with lot of memory attributed). Not convincing.

2/ Kodi media player

Afterwards, I went for LibreElec along with Kodi. Surprisingly, it loads movies with no problem, the interface is quite neat in general and the control with a distant web browser (port 8080 by default) is a plus. As media player, it would be nice.


But it is not perfect: Kodi does not provide any proper web browser, even lacking features. They only provide some cheezy sort of said text web browser. Sort of because it is no lynx/links/elinks, it is just a strange graphical interface with low HTML layout capabilities – but, kudos, it does not crash on mediawiki, yay! Nonetheless, that is quite a blocker issue for me. Even a media player, in my opinion, should have integrated web browser. It is not a challenge to reuse gecko/khtml, whatever, to make so.


3/ (tiger) VNC on top of Raspbian

So I went back on Raspbian. I found out that netsurf works fine to browse mediawiki. So just that satisfies the first requirement.

Instead of expecting to be able to finely setup Raspbian for video website, etc, I decided it might just be smarter to really think of this as terminal and so, to show some window from another computer session.

On an Devuan desktop, it is just enough to get tigervnc-scraping-server, generate a host file (for IP based control):

mkdir .vnc
echo "+IP_OF_YOUR_RASPBIAN" > .vnc/hosts

then to start it whenever you want to share your screen:

x0vncserver -HostsFile=$HOME/.vnc/hosts -SecurityTypes=None

Windows version is configured in a similar fashion.

Raspbian provides a VNC viewer graphical interface that will allow you to connect and you’ll immediately notice that TigerVNC is damned efficient and play with no problem youtube video, etc.

Ok, but VNC, while much more convenient than RDP to setup, does not care to sound forwarding.

I give some tries to PulseAudio RTP capabilities: it fails with errors like [alsa-sink-bcm2835 ALSA] module-rtp-recv.c: Sample rates too different, not adjusting (44100 vs. 90522) and when I tried to document myself about it, I found that this PulseAudio feature was bugged, flooding the network with UDP packets, a bug found in 2009 and still existing in 2017. Gosh, a feature bugged since near to a decade: back to why I try to keep away from systemd and anything made by the same crowd.

I ended up streaming audio with vlc,

cvlc -vvv pulse://`pactl list | grep "Monitor Source" | cut --delimiter ":" -f 2 | tr -d [:blank:]` --sout "#transcode{acodec=mp3,ab=128,channels=2}:standard{access=http,dst=}" &

simply played on the Raspbian with:

mpg123 http://hostname:9999/pc.mp3

I has been summarized in a script to be run on the distant host side. I considered stream both audio and video with vlc but it  is convenient to be able to move around with VNC. This will require further testing.

Removing car’s error messages with an ELM327 device and AndrOBD

Removing car’s error message: am I insane? Well, indeed, in a perfect world where no faulty design exist, I would be. Fixing an error message, that would really mean fixing not even a symptom but a warning and that can only be wrong.

But in the world of french automobile, it is not so (I cannot tell for expensive german or asian cars, I don’t own any). Namely, with Peugeot-Citroën HDI (and strangely not so much with similar Fiat’s JTD and Ford’s TDCi), you easily end up with the infamous Anti Pollution Fault error code after firing the engine. Sometimes it really means something is very wrong, often it only means that a probe is faulty. Sometimes some car shop do not replace/fix the probe but just reset it, so the problem stops only for time. And later it would pop-up and cause the engine to work in degraded mode, stuck to less than 2500 RPM or so – not great. On my HDI-based car, the mechanic decided to completely deactivate the probe, faulty when the car was only a few years old and with less than 50000km, considering it is not worth being changed to a new one that may die early as the original part anyway. Since then, the engine works nicely but on startup there is this Anti Pollution Fault error code that stays on. Not really dramatic but it causes you to pay actually less attention to any error message.

So all modern cars are electronics or even computer-based. But it is unlikely that you’ll manage to access to any code running. For your security they might say. Convenient to fake gaz emission tests, nonetheless.

Still, these days, you can get for cheap some OBD-II devices, OBD standing for on-board diagnostics. It is quite limited in scope and a capabilities, still, it can be used to set off error codes.

I tested a few (libre) software and cheap hardware. What worked for me (Peugeot car with HDI engine) is a bluetooth ELM327  (10 €) device along with AndrOBD (available through F-Droid). It provides data seemingly accurate and reset error code actually works (when the contact is on but engine is off).

I also tried an WiFi ELM327 device, the dedicated software failed to connect or was not providing any usable info. I’d be interested in any other option (for instance with a GNU/Linux laptop instead of F-Droid phone).


Fixing black screen during boot caused by LVDS-panel presence assumption by GMA 3650 drivers

On a Intel DN2800MT-based system, so having Graphics Media Accelerator 3650 integrated processor graphic card, your screen turn to black/off during the boot process, exactly starting when the system switch to framebuffer if you connect a VGA screen (no problem so far with HDMI).

Passing nomodeset or any similar option is of no help.

You cannot invent it, apparently GMA 3600 kernel DRM driver always assumes there is a LVDS panel, as it would on laptop but probably not on home servers, and defaults to a 1920×1080 panel.

So you need to add to the grub kernel line:


Or, in /etc/default/grub :


And run update-grub afterwards.

Dealing with WRITE FPDMA QUEUED hard disk trouble

Recently, on one of my servers, I had the main hard disk being set to failsafe read-only with the following ATA errors logged in /var/log/kern.log:

ata1.00: failed command: WRITE FPDMA QUEUED
ata1.00: cmd 61/00:90:40:7e:85/04:00:ea:00:00/40 tag 18 ncq 524288 out
res 40/00:0c:40:b6:85/00:00: ea:00:00/40 Emask 0x10 (ATA bus error)
ata1.00: status: { DRDY }
ata1.00: failed command: WRITE FPDMA QUEUED
ata1.00: cmd 61/00:98:40:82:85/04:00:ea:00:00/40 tag 19 ncq 524288 out
res 40/00:0c:40:b6:85/00:00:ea:00:00/40 Emask 0x10 (ATA bus error)
ata1.00: status: { DRDY }
ata1.00: failed command: WRITE FPDMA QUEUED

It looks like a physical issue with the drive. Though there was no specific error reported by  smartctl -a /dev/sdX, and the disk was quite new (just one year old), a Western Digital Red (SATA 3 model WDC WD40EFRX-68WT0N0). The mainboard being only SATA 2, the drive is not at all pushed to its limits.

The SATA cables were the same age and SATA 3 and not in bad apparent condition except it looks like they did not stayed perfectly plugged in over time.

I switched the apparently faulty disk to the SATA connector used by the secondary hard disk and made sure they are both  properly plugged: so far, it fixed it. It really looks like a SATA cable issue.


How to properly set contrast on Iiyama ProLite GE2488HS-B1

In the spirit of this Finnish IT retailer listing most returned products, for once, this is not really an howto. The easiest solution I found was to return it. The contrast and luminosity is impossible to set. It changes over reboot, it changes over operating system. And even set to get high contrast, black is never black, despite Iiyama claiming that “it is also possible to adjust the brightness and the dark shades with the Black Tuner, giving greater viewing performance in shadowed areas”. I replaced it with a SyncMaster S24D340H and had none of these problems.

Side note: I also had a defective pixel, but that could happen I assumed. Well, turns out that out of 16 comments of the shop, 4 report 0 day defective pixels.