• Best way to disable APM for hdd


    How to check if the parameter is enabled, after reboot.

    1. put this
    hdparm -B 255 /dev/sda
    

    into /etc/rc.local

    1. maybe use /etc/hdparm.conf
    /dev/sda {
            apm = 255
    }
    

    3 or systemd-hddapm ?

    sudo systemctl enable hddapm
    
  • At least for me …

    systemctl status hddapm

  • Are u use the standard rule?

    ACTION=="add", SUBSYSTEM=="block", KERNEL=="sda", RUN+="/usr/bin/hdparm -B 255 /dev/sda"
    

    or something else.

    PS When we edit the rule, need reboot system or enough restart hdparm by systemctl?

  • @Sabur said in Best way to disable APM for hdd:

    PS When we edit the rule, need reboot system or enough restart hdparm by systemctl?

    I do not understand what you mean …?

    With systemctl it works in this way:

    systemctl enable package ===> is enabled in systemd and for more reboots than you do it will always be enabled, unless you want to disable it withsystemctl disable package and to launch it systemctl start package

  • I mean, when we make changes in conf files, then run systemctl restart package and reboot is not needed (hddapm rules for example)?

    Or there are cases when need just

    reboot
    

    coz system need restart other services.

  • @Sabur said in Best way to disable APM for hdd:

    I mean, when we make changes in conf files, then run systemctl restart package and reboot is not needed

    systemctl restart; it is not a package, it is a console command syntax for Systemd.

    And if it is necessary to restart the system when you touch the .conf files

  • @judd said in Best way to disable APM for hdd:

    systemctl restart; it is not a package, it is a console command syntax for Systemd.

    I know. Mean, to enable the settings in ANY conf files (for example hddapm), necessary reboot the Antergos, or enough command in console

    sudo systemctl restart name_package
    
  • [[email protected] ~]$ systemctl status hddapm
    ● hddapm.service - Trigger udev to set the Advanced Power Management level of Hard Disks
       Loaded: loaded (/usr/lib/systemd/system/hddapm.service; enabled; vendor preset: disabled)
       Active: inactive (dead) since Tue 2017-11-21 16:17:48 EET; 6s ago
      Process: 1147 ExecStart=/usr/bin/udevadm trigger --subsystem-match=block (code=exited, status=0/SUCCESS)
     Main PID: 1147 (code=exited, status=0/SUCCESS)
    

    /etc/udev/rules.d/10-hdparm.rules

    ACTION=="add", SUBSYSTEM=="block", KERNEL=="sda", RUN+="/usr/bin/hdparm -B 255 /dev/sda"
    
  • @Sabur said in Best way to disable APM for hdd:

    in ANY conf files (for example hddapm), necessary reboot the Antergos

    Yes, at least I’ve always done it that way!

    or enough command in console
    sudo systemctl restart name_package

    I never did it in the way you mentioned, but if it turns out, well, do it like that!

  • Ok, at least understood each other))
    hddapm service doesn’t start after reboot the system.

hdd7 apm1 disable13 Posts 10Views 202
Log in to reply