hd-idle is a useful program if you want to spin down hard disks after a defined time period.
It is available in fedora repositories. Therefore you can install it using dnf command,
dnf install hd-idle
systemd unit file is available in below path,
/usr/lib/systemd/system/hd-idle.service
The configuration file is available in below path,
/etc/sysconfig/hd-idle
man page of hd-idle (man hd-idle) describes the usage of hd-idle program. It has capability to define a default idle time for all the disks and define idle time for disks individually.
The default log file path is,
/var/log/hd-idle/hd-idle.log
All the informatiion about this utility can be found here,
http://hd-idle.sourceforge.net/
Showing posts with label DNF. Show all posts
Showing posts with label DNF. Show all posts
Tuesday, November 20, 2018
Saturday, October 21, 2017
E3372 USB Modem not working issue on Fedora 26
Today I installed Fedora 26 on my Laptop (HP EliteBook). After that I wanted to connect my USB Modem E3372 to connect to the internet. Ah! Surprise!! It didn't work. Whenever I tried to enable the connection through the GUI, it stopped connecting immediately. This modem had no issues with Fedora 25 installed on my Desktop.
After analyzing the logs (journalctl -xe) I was able to find the issue. Actually a required plugin was not installed with the OS installation or even with the dnf upgrade I did after the OS installation.
Oct 20 17:21:57 localhost.localdomain NetworkManager[739]: <info> [1508534517.2585] device (ttyUSB0): state change: config -> ip-config (reason 'none', internal state 'managed')
Oct 20 17:21:57 localhost.localdomain NetworkManager[739]: <warn> [1508534517.2586] device (ttyUSB0): interface ttyUSB1 not up for IP configuration
Oct 20 17:21:57 localhost.localdomain NetworkManager[739]: <info> [1508534517.2586] (ttyUSB0): using modem-specified IP timeout: 20 seconds
Oct 20 17:21:57 localhost.localdomain NetworkManager[739]: <error> [1508534517.2587] (ttyUSB0): error starting PPP: the PPP plugin /usr/lib64/NetworkManager/libnm-ppp-plugin.so is not installed
Oct 20 17:21:57 localhost.localdomain NetworkManager[739]: <info> [1508534517.2588] device (ttyUSB0): state change: ip-config -> failed (reason 'ppp-start-failed', internal state 'managed')
Oct 20 17:21:57 localhost.localdomain NetworkManager[739]: <warn> [1508534517.2593] device (ttyUSB0): Activation: failed for connection
The library is provided by a package called NetworkManager-ppp
dnf provides /usr/lib64/NetworkManager/libnm-ppp-plugin.so
Last metadata expiration check: 1:06:38 ago on Fri 20 Oct 2017 04:27:22 PM EDT.
NetworkManager-ppp-1:1.8.2-1.fc26.x86_64 : PPP plugin for NetworkManager
Repo : updates
Matched from:
Filename : /usr/lib64/NetworkManager/libnm-ppp-plugin.so
NetworkManager-ppp-1:1.8.0-6.fc26.x86_64 : PPP plugin for NetworkManager
Repo : fedora
Matched from:
Filename : /usr/lib64/NetworkManager/libnm-ppp-plugin.so
Then I installed the package
[root@localhost ~]# dnf install NetworkManager-ppp
Here we go. The modem started to working.!!!
After analyzing the logs (journalctl -xe) I was able to find the issue. Actually a required plugin was not installed with the OS installation or even with the dnf upgrade I did after the OS installation.
Oct 20 17:21:57 localhost.localdomain NetworkManager[739]: <info> [1508534517.2585] device (ttyUSB0): state change: config -> ip-config (reason 'none', internal state 'managed')
Oct 20 17:21:57 localhost.localdomain NetworkManager[739]: <warn> [1508534517.2586] device (ttyUSB0): interface ttyUSB1 not up for IP configuration
Oct 20 17:21:57 localhost.localdomain NetworkManager[739]: <info> [1508534517.2586] (ttyUSB0): using modem-specified IP timeout: 20 seconds
Oct 20 17:21:57 localhost.localdomain NetworkManager[739]: <error> [1508534517.2587] (ttyUSB0): error starting PPP: the PPP plugin /usr/lib64/NetworkManager/libnm-ppp-plugin.so is not installed
Oct 20 17:21:57 localhost.localdomain NetworkManager[739]: <info> [1508534517.2588] device (ttyUSB0): state change: ip-config -> failed (reason 'ppp-start-failed', internal state 'managed')
Oct 20 17:21:57 localhost.localdomain NetworkManager[739]: <warn> [1508534517.2593] device (ttyUSB0): Activation: failed for connection
The library is provided by a package called NetworkManager-ppp
dnf provides /usr/lib64/NetworkManager/libnm-ppp-plugin.so
Last metadata expiration check: 1:06:38 ago on Fri 20 Oct 2017 04:27:22 PM EDT.
NetworkManager-ppp-1:1.8.2-1.fc26.x86_64 : PPP plugin for NetworkManager
Repo : updates
Matched from:
Filename : /usr/lib64/NetworkManager/libnm-ppp-plugin.so
NetworkManager-ppp-1:1.8.0-6.fc26.x86_64 : PPP plugin for NetworkManager
Repo : fedora
Matched from:
Filename : /usr/lib64/NetworkManager/libnm-ppp-plugin.so
Then I installed the package
[root@localhost ~]# dnf install NetworkManager-ppp
Here we go. The modem started to working.!!!
Friday, January 13, 2017
Things I did after installing Fedora 24
Removed evolution application since I don't use it.
dnf remove evolution
Configure RPMFusion repo
wget https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-24.noarch.rpm
rpm -ivh rpmfusion-free-release-24.noarch.rpm
Upgrade the system
dnf upgrade
Install Intel Linux graphic drivers
wget https://download.01.org/gfx/fedora/24/x86_64/intel-graphics-update-tool-2.0.3-24.intel20163.x86_64.rpm
rpm -ivh intel-graphics-update-tool-2.0.3-24.intel20163.x86_64.rpm
Run intel-graphics-update-tool command as root and install the Intel drivers
Install VLC and configure hardware acceleration
Read the instructions here,
http://swapoff.blogspot.com/2017/01/how-to-enable-hardware-acceleration-in.html
Install Google Chrome
rpm -ivh google-chrome-stable_current_x86_64.rpm
warning: google-chrome-stable_current_x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEYerror: Failed dependencies: lsb >= 4.0 is needed by google-chrome-stable-55.0.2883.87-1.x86_64
Install redhat-lsb as well if you receive above error when you try to install Google Chrome.
dnf provides lsb
dnf install redhat-lsb
Install Gnome Tweak Tool and configure it to show files on Desktop
dnf install gnome-tweak-tool
Disable dnf-makecache service
systemctl status dnf-makecache.service
systemctl status dnf-makecache.timer
More information is avaiable here,
http://swapoff.blogspot.com/2015/09/disable-automatic-package-metadata.html
Saturday, September 5, 2015
Disable automatic package metadata update in Fedora
Sometimes my internet speed becomes slow when I use Fedora after a system reboot. Once this happens, I experienced the effect even though all the network related applications are closed. My internet connection is not a super fast, so it annoyed me a lot. I wanted to find out the reason behind this issue.
Step 1: use netstat to identify the PID/applications which have opened TCP connections,
[root@desktop9 ~]# netstat -anp -t
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.0.1:53 0.0.0.0:* LISTEN 1252/dnsmasq
tcp 13 0 192.168.1.9:48208 192.168.1.50:445 CLOSE_WAIT 6776/gvfsd-smb
tcp 0 0 192.168.1.9:44632 137.189.4.14:80 ESTABLISHED 10934/python
tcp 0 0 192.168.1.9:44635 137.189.4.14:80 CLOSE_WAIT 10934/python
tcp 0 0 192.168.1.9:44690 137.189.4.14:80 CLOSE_WAIT 10934/python
tcp 13 0 192.168.1.9:36304 192.168.1.50:139 CLOSE_WAIT 6769/gvfsd-smb-brow
The output shows that the process 10934/python has a established connection with destination 137.189.4.14:80.
Step 2: Use ps command to find out more information of this process
[root@desktop9 ~]# ps -efw | grep 10934
root 10934 1 0 18:56 ? 00:00:00 /usr/bin/python -OO /usr/bin/dnf -v makecache timer
root 11204 11153 0 19:02 pts/0 00:00:00 grep --color=auto 10934
The output shows the culprit. it was "/usr/bin/dnf -v makecache timer"
The man page of dnf describes makecache downloads and caches in binary format metadata for all known repos available in the system.
Man page output:
dnf [options] makecache
Downloads and caches in binary format metadata for all known repos. Tries to avoid downloading whenever possible (e.g. when the local metadata
hasn't expired yet or when the metadata timestamp hasn't changed).
dnf [options] makecache timer
Like plain makecache but instructs DNF to be more resource-aware, meaning will not do anything if running on battery power and will terminate
immediately if it's too soon after the last successful makecache run (see dnf.conf(8), metadata_timer_sync).
It seems that the dnf makecache is scheduled to run after every reboot. I decided to disable this and do manual metadata updates whenever it's required.
Command to disable dnf-makecache.service:
systemctl disable dnf-makecache.service
Update 1: Disable the dnf-makecache.timer as well. Otherwise the service will be restarted.
systemctl disable dnf-makecache.timer
Update 2: I started using Fedora 29 Server edition and noted packagekit is also involved in this.
Therefore I disabled them as well,
systemctl disable packagekit.service
systemctl disable packagekit-offline-update.service
Step 1: use netstat to identify the PID/applications which have opened TCP connections,
[root@desktop9 ~]# netstat -anp -t
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.0.1:53 0.0.0.0:* LISTEN 1252/dnsmasq
tcp 13 0 192.168.1.9:48208 192.168.1.50:445 CLOSE_WAIT 6776/gvfsd-smb
tcp 0 0 192.168.1.9:44632 137.189.4.14:80 ESTABLISHED 10934/python
tcp 0 0 192.168.1.9:44635 137.189.4.14:80 CLOSE_WAIT 10934/python
tcp 0 0 192.168.1.9:44690 137.189.4.14:80 CLOSE_WAIT 10934/python
tcp 13 0 192.168.1.9:36304 192.168.1.50:139 CLOSE_WAIT 6769/gvfsd-smb-brow
The output shows that the process 10934/python has a established connection with destination 137.189.4.14:80.
Step 2: Use ps command to find out more information of this process
[root@desktop9 ~]# ps -efw | grep 10934
root 10934 1 0 18:56 ? 00:00:00 /usr/bin/python -OO /usr/bin/dnf -v makecache timer
root 11204 11153 0 19:02 pts/0 00:00:00 grep --color=auto 10934
The output shows the culprit. it was "/usr/bin/dnf -v makecache timer"
The man page of dnf describes makecache downloads and caches in binary format metadata for all known repos available in the system.
Man page output:
dnf [options] makecache
Downloads and caches in binary format metadata for all known repos. Tries to avoid downloading whenever possible (e.g. when the local metadata
hasn't expired yet or when the metadata timestamp hasn't changed).
dnf [options] makecache timer
Like plain makecache but instructs DNF to be more resource-aware, meaning will not do anything if running on battery power and will terminate
immediately if it's too soon after the last successful makecache run (see dnf.conf(8), metadata_timer_sync).
It seems that the dnf makecache is scheduled to run after every reboot. I decided to disable this and do manual metadata updates whenever it's required.
Command to disable dnf-makecache.service:
systemctl disable dnf-makecache.service
Update 1: Disable the dnf-makecache.timer as well. Otherwise the service will be restarted.
systemctl disable dnf-makecache.timer
Update 2: I started using Fedora 29 Server edition and noted packagekit is also involved in this.
Therefore I disabled them as well,
systemctl disable packagekit.service
systemctl disable packagekit-offline-update.service
Subscribe to:
Posts (Atom)