[SOLVED] HD103UJ I/O Errors with LINUX

After booting up my Linux box (kernel 4.4.13 ) and start using it I noticed that I was getting I/O (Input Output) errors from the hard drive some seconds after working with it.


My hard drive is a Samsung HD103UJ and my motherboard is an Asus P5ne-sli with BIOS firmware update 1403 .
According to what I've found in some forums, the nv chipset and this disk in particular doesn't get along too well and in others, the kernel version was the one to blame.

The same problem occurs with the Western Digital HD103UJ sata disk.





  • This is what my dmesg outputs. (keep reading after the output ...)

ata5: EH in SWNCQ mode,QC:qc_active 0x3F80000 sactive 0x3F80000
ata5: SWNCQ:qc_active 0x180000 defer_bits 0x3E00000 last_issue_tag 0x14
  dhfis 0x80000 dmafis 0x0 sdbfis 0x0
ata5: ATA_REG 0x40 ERR_REG 0x0
ata5: tag : dhfis dmafis sdbfis sactive
ata5: tag 0x13: 1 0 0 1 
ata5: tag 0x14: 0 0 0 1 
ata5.00: exception Emask 0x0 SAct 0x3f80000 SErr 0x0 action 0x6 frozen
ata5.00: failed command: WRITE FPDMA QUEUED
ata5.00: cmd 61/08:98:00:4b:5a/00:00:10:00:00/40 tag 19 ncq 4096 out
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata5.00: status: { DRDY }
ata5.00: failed command: WRITE FPDMA QUEUED
ata5.00: cmd 61/08:a0:10:08:00/00:00:00:00:00/40 tag 20 ncq 4096 out
         res 40/00:ff:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata5.00: status: { DRDY }
ata5.00: failed command: WRITE FPDMA QUEUED
ata5.00: cmd 61/08:a8:08:aa:42/00:00:00:00:00/40 tag 21 ncq 4096 out
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata5.00: status: { DRDY }
ata5.00: failed command: WRITE FPDMA QUEUED
ata5.00: cmd 61/08:b0:b0:4d:46/00:00:00:00:00/40 tag 22 ncq 4096 out
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata5.00: status: { DRDY }
ata5.00: failed command: WRITE FPDMA QUEUED
ata5.00: cmd 61/08:b8:00:08:60/00:00:00:00:00/40 tag 23 ncq 4096 out
         res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
ata5.00: status: { DRDY }
ata5.00: failed command: WRITE FPDMA QUEUED
ata5.00: cmd 61/08:c0:10:de:62/00:00:00:00:00/40 tag 24 ncq 4096 out
         res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
ata5.00: status: { DRDY }
ata5.00: failed command: WRITE FPDMA QUEUED
ata5.00: cmd 61/08:c8:b0:eb:62/00:00:00:00:00/40 tag 25 ncq 4096 out
         res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
ata5.00: status: { DRDY }
ata5: hard resetting link
ata5: nv: skipping hardreset on occupied port
ata5: link is slow to respond, please be patient (ready=0)
ata5: SRST failed (errno=-16)
ata5: hard resetting link
ata5: nv: skipping hardreset on occupied port
ata5: link is slow to respond, please be patient (ready=0)

ata5: SRST failed (errno=-16)
ata5: hard resetting link
ata5: nv: skipping hardreset on occupied port
ata5: link is slow to respond, please be patient (ready=0)
ata5: SRST failed (errno=-16)
ata5: hard resetting link
ata5: nv: skipping hardreset on occupied port
ata5: link is slow to respond, please be patient (ready=0)
ata5: SRST failed (errno=-16)
ata5: limiting SATA link speed to 1.5 Gbps
ata5: hard resetting link
ata5: nv: skipping hardreset on occupied port
ata5: SRST failed (errno=-16)
ata5: reset failed, giving up
ata5.00: disabled
ata5.00: device reported invalid CHS sector 0
ata5.00: device reported invalid CHS sector 0
ata5: EH complete
sd 4:0:0:0: [sdc] tag#27 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
sd 4:0:0:0: [sdc] tag#27 CDB: opcode=0x2a 2a 00 00 62 eb b0 00 00 08 00
blk_update_request: I/O error, dev sdc, sector 6482864
Buffer I/O error on dev sdc1, logical block 810102, lost async page write
sd 4:0:0:0: [sdc] tag#28 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
sd 4:0:0:0: [sdc] tag#28 CDB: opcode=0x2a 2a 00 00 62 de 10 00 00 08 00
blk_update_request: I/O error, dev sdc, sector 6479376
Buffer I/O error on dev sdc1, logical block 809666, lost async page write
sd 4:0:0:0: [sdc] tag#29 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
sd 4:0:0:0: [sdc] tag#29 CDB: opcode=0x2a 2a 00 00 60 08 00 00 00 08 00
blk_update_request: I/O error, dev sdc, sector 6293504
Buffer I/O error on dev sdc1, logical block 786432, lost async page write
sd 4:0:0:0: [sdc] tag#30 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
sd 4:0:0:0: [sdc] tag#30 CDB: opcode=0x2a 2a 00 00 46 4d b0 00 00 08 00
blk_update_request: I/O error, dev sdc, sector 4607408
Buffer I/O error on dev sdc1, logical block 575670, lost async page write
sd 4:0:0:0: [sdc] tag#31 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
sd 4:0:0:0: [sdc] tag#31 CDB: opcode=0x2a 2a 00 00 42 aa 08 00 00 08 00
blk_update_request: I/O error, dev sdc, sector 4368904
Buffer I/O error on dev sdc1, logical block 545857, lost async page write
sd 4:0:0:0: [sdc] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
sd 4:0:0:0: [sdc] tag#0 CDB: opcode=0x2a 2a 00 00 00 08 10 00 00 08 00
blk_update_request: I/O error, dev sdc, sector 2064
Buffer I/O error on dev sdc1, logical block 2, lost async page write
sd 4:0:0:0: [sdc] tag#1 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
sd 4:0:0:0: [sdc] tag#1 CDB: opcode=0x2a 2a 00 10 5a 4b 00 00 00 08 00
blk_update_request: I/O error, dev sdc, sector 274352896
Buffer I/O error on dev sdc1, logical block 34293856, lost async page write
sd 4:0:0:0: [sdc] tag#4 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
sd 4:0:0:0: [sdc] tag#4 CDB: opcode=0x2a 2a 00 00 62 eb b0 00 00 08 00
blk_update_request: I/O error, dev sdc, sector 6482864
Buffer I/O error on dev sdc1, logical block 810102, lost async page write
sd 4:0:0:0: [sdc] tag#5 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
sd 4:0:0:0: [sdc] tag#5 CDB: opcode=0x2a 2a 00 00 62 de 10 00 00 08 00
blk_update_request: I/O error, dev sdc, sector 6479376
Buffer I/O error on dev sdc1, logical block 809666, lost async page write
sd 4:0:0:0: [sdc] tag#6 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
sd 4:0:0:0: [sdc] tag#6 CDB: opcode=0x2a 2a 00 10 5a 4b 00 00 00 08 00
blk_update_request: I/O error, dev sdc, sector 274352896
Buffer I/O error on dev sdc1, logical block 34293856, lost async page write
sd 4:0:0:0: [sdc] tag#7 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
sd 4:0:0:0: [sdc] tag#7 CDB: opcode=0x2a 2a 00 00 42 aa 08 00 00 08 00
blk_update_request: I/O error, dev sdc, sector 4368904
Buffer I/O error on dev sdc1, logical block 545857, lost async page write
sd 4:0:0:0: [sdc] tag#8 UNKNOWN(0x2003) Result: hostbyte=0x04 driverbyte=0x00
sd 4:0:0:0: [sdc] tag#8 CDB: opcode=0x2a 2a 00 00 46 4d b0 00 00 08 00
blk_update_request: I/O error, dev sdc, sector 4607408
Buffer I/O error on dev sdc1, logical block 575670, lost async page write

 

 Before throwing the hard drive to the trash I tried to do some tweaks to the hard drive device and low down the queue depth value to 1.

The queue depth is the number of pending I/O requests to the disk, so If you lower it to 1, it won't crash.
It is adviced to use it only as a storage device but I tried it for the system and it worked perfectly fine. I didn't find any performance slowdown whatsoever.

To check the queue value in linux, use "hdparm", so as root  type  (use "sudo" or "sudo su" to log as the root) :


# hdparm -Q /dev/sdX

/dev/sdc:
 queue_depth    =  31

(note X is the letter of your device, in my case it is /dev/sdc and 31 is the queue_depth value).

SOLUTION:

Change the queue_depth value to "1" (without quotes) so as root type this time:


# hdparm -Q 1 /dev/sdX
 setting queue_depth to 1
 queue_depth     1

DONE !!!.

After a lot of tests I didn't get any noticeable difference in performance.
Stability is 100%.
If you don't use the value 1, you will get the same crash result seen above.
Only queue_depth = 1 is the stable value.


For persistent changes to take effect on your linux machine, you should create a udev rule, so every time the system detects the disk it will set this value to 1 at boot time.

Here is the custom rule I've created.


STEPS
  1. Create a file called 999-discHD103UJ.rules inside /etc/udev/rules.d/ (note the ".rules" extension), use nano, vim, or leafpad or whatever text editor you have installed in your system as root or with sudo.
  2. Find your device by the id.
    • In a terminal type
    • ls /dev/disk/by-id/
    • find your device,

    my output is :
    ata-SAMSUNG_HD103UJ_S13PJ90Z108076
    ata-SAMSUNG_HD103UJ_S13PJ90Z108076-part1
    ata-SAMSUNG_HD103UJ_S13PJ90Z108076-part5
    Note: DO NOT use the lines with "part-1 or part-5" at the end as they are the logical partitions of the drive.
    You only want to use the first line in green.
    Replace the orange line below with the green one here.
  3. Just write down the line in step 4 into that file ( it only works if the ATTRS{model}=="SAMSUNG HD103UJ, also make sure you understood step 2 ").
  4. SUBSYSTEMS=="scsi", ATTRS{model}=="SAMSUNG HD103UJ ", RUN+="/usr/bin/hdparm -Q 1 /dev/disk/by-id/ata-SAMSUNG_HD103UJ_S13PJ90Z108076"
  5. save your changes and exit.


  • After this changes I never had any more issues with the disk, and dmesg output showed no more errors at all.


 Please give it a thumbs up if it helped in some way or share.

Thanks for passing by.












[SOLVED] FIX "ImportError: No module named dbus" under Arch Linux and Ubuntu

FIX "ImportError: No module named dbus" under Arch Linux and Ubuntu.

This guide will explain quickly how to fix the zeitgeist-explorer dbus dependency problem that prints the error message

" ImportError: No module named dbus "


while trying to run zeitgeist-explorer.


  • If your can't start zeitgeist-explorer and get an output like the one below

$ zeitgeist-explorer
/usr/bin/zeitgeist-explorer:22: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
Traceback (most recent call last):
  File "/usr/bin/zeitgeist-explorer", line 25, in <module>
    from zgexplorer.window import ExplorerMainWindow
  File "/usr/lib/python2.7/site-packages/zgexplorer/window.py", line 26, in <module>
    from zgexplorer.monitorviewer import MonitorViewer
  File "/usr/lib/python2.7/site-packages/zgexplorer/monitorviewer.py", line 28, in <module>
    from zgexplorer.remote import get_zeitgeist
  File "/usr/lib/python2.7/site-packages/zgexplorer/remote.py", line 23, in <module>
    from zeitgeist.client import ZeitgeistClient
  File "/usr/lib/python2.7/site-packages/zeitgeist/client.py", line 24, in <module>
    import dbus

ImportError: No module named dbus


  • Make sure you install the "python-dbus-common" and in this case also "python2-dbus" because it needs the 2.7 version of it.

    In my case I got python3.5 installed in the system, and this error occurs because zeitgeist is not working with that higher version. So it needs exactly the python2-dbus package.



  • If you are running Ubuntu Install it like this.

    $ sudo apt-get install python-dbus-common python2-dbus


  • If you are running ArchLinux or Manjaro (Arch based)
    $ sudo pacman -S python-dbus-common python2-dbus

[ SOLVED ] Error 127 cower Arch linux

If you are getting this error:


make: cc: Command not found
make: *** [cower.o] Error 127
==> ERROR: A failure occurred in build().
    Aborting...


Its because you need the "cc" compiler.

If using Arch Linux just type

$ sudo pacman -S base-devel

Now keep on with what you were doing.



[ SOLVED ] cannot find strip library required for object file stripping in arch linux

Are you getting this error while using the command makepkg in ArchLinux.

"==> ERROR: Cannot find the strip binary required for object file stripping."


It is easy to fix, just install the "binutils" package.

Go to your terminal and type

$ sudo pacman -S binutils

or if you are root just

# pacman -S binutils


If you then hit the error message

"make: command not found
==> ERROR: A failure occurred in build().
    Aborting..."


It's because you don't have the the program make, also it needs the gc compiler, guile, and probably libatomic_ops

Install them just by tiping

$ sudo pacman -S make

Then make will pull its dependencies and install the rest of the packages needed.

Now, go back to your first command you typed "makepkg" and makepkg will find the strip binary for the creation of the package.

Thanks for your visit.





Cómo utiliza Google las cookies

Una cookie es un pequeño fragmento de texto que los sitios web que visitas envían al navegador y que permite que el sitio web recuerde información sobre tu visita, como tu idioma preferido y otras opciones, lo que puede facilitar tu próxima visita y hacer que el sitio te resulte más útil. Las cookies desempeñan un papel muy importante, ya que sin ellas el uso de la Web sería una experiencia mucho más frustrante.
Google utiliza cookies con diversos fines, entre los que se incluyen recordar tus preferencias de SafeSearch, aumentar la relevancia de los anuncios que ves, contar el número de visitas que recibimos para acceder a una página, ayudarte a registrarte en nuestros servicios y proteger tus datos.
Puedes ver una lista de los tipos de cookies que utiliza Google, así como descubrir cómo utilizan Google y nuestros partners las cookies en publicidad. En nuestra Política de privacidad se explica cómo protegemos tu privacidad en lo que respecta al uso de las cookies y otra información.

[SOLUCIONADO] llamada a execv fallida

Hoy luego de hacer una actualizacion de mi sistema arch linux encontre que cada vez que instalaba un paquete a traves de pacman me aparecia el siguiente error.

:: Ejecutando los «hooks» de posinstalación...
(1/2) Updating icon theme caches...
llamada a execv fallida (Permiso denegado)
error: la orden no se ejecutó correctamente
(2/2) Updating the desktop file MIME type cache...

Luego de buscar un poco en encontre que el error consistia en la falta de permisos de ejecucion de un script llamado gtk-update-icon-cache

LA CAUSA:

The script that gtk-update-icon-cache calls through pacman has not the executable flag.

El script que gtk-update-icon-cache llama a traves de pacman no tiene permisos para ser ejecutado

$ ls -al /usr/share/libalpm/scripts/gtk-update-icon-cache
-rw-r--r-- 1 root root 195 abr 27 17:04 /usr/share/libalpm/scripts/gtk-update-icon-cache


LA SOLUCION

Solo hay que cambiar el script para que sea ejecutable

$ sudo chmod +x /usr/share/libalpm/scripts/gtk-update-icon-cache

$ ls -al /usr/share/libalpm/scripts/gtk-update-icon-cache
-rwxr-xr-x 1 root root 195 abr 27 09:06 /usr/share/libalpm/scripts/gtk-update-icon-cache

Luego tenemos que reinstalar gtk3 de la siguiente manera.

$ sudo pacman -S gtk3


Please share this workaround or g+ as we can help as many arch linux users as possible.

Por favor comparte esta guia para que mucha mas gente que use Arch Linux pueda verse favorecida.

Cualquier comentario que tengas, dejalo abajo.

Gracias por tu visita.

[ SOLVED ] call to execv failed

Today after I did a system upgrade  of my arch linux box I found that every time I installed any package using pacman I encountered this error message.

:: Running post-transaction hooks...
(1/2) Updating icon theme caches...
call to execv failed (Permission denied)
error: command failed to execute correctly
(2/2) Updating the desktop file MIME type cache...

After looking around for a solution I found that the case was a lack of execution permissions in a file called gtk-update-icon-cache.

THE CAUSE:

The script that gtk-update-icon-cache calls through pacman has not the executable flag.

$ ls -al /usr/share/libalpm/scripts/gtk-update-icon-cache
-rw-r--r-- 1 root root 195 abr 27 17:04 /usr/share/libalpm/scripts/gtk-update-icon-cache


THE SOLUTION:

Just change it to be executable

$ sudo chmod +x /usr/share/libalpm/scripts/gtk-update-icon-cache

$ ls -al /usr/share/libalpm/scripts/gtk-update-icon-cache
-rwxr-xr-x 1 root root 195 abr 27 09:06 /usr/share/libalpm/scripts/gtk-update-icon-cache

And you have to reinstall gtk3 to make it work back again.

$ sudo pacman -S gtk3


Please share this workaround or g+ as we can help as many arch linux users as possible.

Any comments you have, leave them below...

Thanks for passing by.

[ S O L V E D ] Black Screen GTX 750 ti Games freezes all the time.

I bought a GTX 750 ti video card last year for gamming. It worked well for a while. But suddenly my games were crashing all the time at random.

The famous BSOD (Black screen of death) appeared at the best moments in my games, sometimes the sound was also looping and others the system was responding but the screen was dead.

I tried changing the PSU (Power supply unit) and also tried with different video cards but all seemed to work well, so the issue must be my GTX 750 ti video card.

I have 2 Windows installations. One is Windows 7 x64 and the other is Windows 8.1 x64. In both cases with the same games installed the card crashed. That's how I knew it was a hardware/driver related issue.

After cheking the video card specifications I realized the GPU core was intended to be run between 1020 MHz and 1085 MHz.

So I installed a program called MSI AfterBurner for underclocking the video card.

I installed this program and set the GPU speed and Memory speed toggled on for displaying when playing a game.

As I started a game I realized the GPU was running at 1333 MHz causing the video card to crash after a while, could be seconds or minutes.

After underclocking the GPU and Memory speeds, all went back to be stable again.

Here is the step by step process.

  1. Download MSI AfterBurner from here
  2. Install it.
  3. Run it.
  4. If you want to have the GPU core speed and Memory speed displayed when playing your game go to preferences and enable them (in AfterBurner under the Monitoring tab).



Wrong GPU Configuration


bad specs gpu

wrong gpu overclock

Good GPU Configuration

good specs
Power to 80%.
Core Clock -250.
Memory Clock -250.
Press the apply button after making the changes.

nice underclock stable


I assume that one of the nVidia drivers after been updated changed the core default speed causing the video card to be overclocked as a default.


ENJOY



Please share with others or g+ the post.

If you have any comments leave them below.

Thanks.








A "nano" - QUICK LINUX Tutorial (text editor)

This is a simple tutorial about "nano",  my favourite linux text editor in the command line. Let's begin.


CREATING A NEW FILE

From the command line, type "nano" without quotes and press enter. Note that if you provide nano with a file name, it wont create a new file, only open the one you passed by, for example "nano /home/user/Documents/mytextFile.txt".
Once opened, you will see something like this.


Next, you move the cursor wherever you want to start typing.
Type anything, when you are done writing, simple press "Ctrl + O" (the plus sign you don't have to type it).
A message appears at the bottom of the window, it ask you to name the file, in the case it is a new file.
nano text editor file opened
Now, type the name of the new file you want to create.
saving
After you typed the name of the file, just press "ENTER" and it will be saved.

write confirmation
The message says "Wrote 6 lines". well, that means it saved the file correctly.

Opening an existing file (read)

From the command line type:

$ nano myNewTextFile.txt

opened file

You now see the text that the file had in it. Also check that it says at the bottom "Read 6 lines".
Now, you can start editing and when you are done, you can save it.
Press CTRL + O again, but this time, as we are opened an existing file it already shows us  the name of the file at the bottom of the screen for overwriting it, or if we change the name it will create a new file with the new name you just typed.

saving file
Press Enter to save and overwrite the existing file or "Ctrl + C" to cancel the operation.
To quit nano, press "Ctrl + X".

Notes:

CUT
To cut text, you will have to type "Ctrl + K", note that the whole line will be cut.

PASTE
To paste the line, type "Ctrl + U". You can paste what you cut the number of times you want.

READ/INJECT

When you type "Ctrl + R" it injects the file content you specify where the cursor is located.

SEARCH (Where is?)

Type "Ctrl + W" to search for a specific word, phrase, note that it is case insensitive, so UPPERCASE and lowercase characters are treated equally.

REPLACE

Type "Ctrl + \" to replace the word you want with the new text typed. You will have to confirm typing "Y" when asked, Also check that if you type A it will replace all the occurrences in the file.  It is a three steps method, search, text to replace with, and confirmation.

This is all for now. 

See you in the next post.

[ S O L V E D ] - How to check if a string is a double safely in JAVA

String str = "1234.0123";
        try
        {
            Double dbl;
            dbl = Double.parseDouble(str);
            System.out.println("its a double");
         
        }
        catch(java.lang.NumberFormatException cce)
        {
        }

[ S O L V E D ] - cower: error while loading shared libraries: libalpm.so.9: cannot open shared object file: No such file or directory

If you are getting this error:

cower: error while loading shared libraries: libalpm.so.9: cannot open shared object file: No such file or directory


after upgrading your arch system, don't worry.

You will have to rebuild cower.

Download the cower package  cower-14-2 from the AUR repository.


From the command line go to where you downloaded the package, and type:

$ tar -zxvf
$ cower.tar.gz

$ cd cower

$ makepkg -sri


You will be prompted for a password as pacman needs it to install it.



done!

2 ads