Tag Archives: Fedora

Fedora goes to sleep on USB insert

Did you enable the commands suggested by powertop ?

Thats exactly what happened to me, for days I was wondering why my Fedora 20 x64 was acting weirdly on USB inserts. When I checked journalctl -f,  I found that my system went to sleep !


Jan 29 08:45:27 ruturaj-vartak ntfs-3g[6076]: Version 2013.1.13 integrated FUSE 27
Jan 29 08:45:27 ruturaj-vartak ntfs-3g[6076]: Mounted /dev/sdb1 (Read-Write, label "", NTFS 3.1)
Jan 29 08:45:27 ruturaj-vartak ntfs-3g[6076]: Cmdline options: rw,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177,uhelper=udisks2
Jan 29 08:45:27 ruturaj-vartak ntfs-3g[6076]: Mount options: rw,nodev,nosuid,uhelper=udisks2,allow_other,nonempty,relatime,default_permissions,fsname=/dev/sdb1,blkdev,blksize=4096
Jan 29 08:45:27 ruturaj-vartak ntfs-3g[6076]: Global ownership and permissions enforced, configuration type 1
Jan 29 08:45:28 ruturaj-vartak kernel: hda-codec: out of range cmd 0:20:400:fffffbff
Jan 29 08:45:28 ruturaj-vartak systemd-logind[434]: Delay lock is active but inhibitor timeout is reached.
Jan 29 08:45:28 ruturaj-vartak systemd[1]: Starting Sleep.
Jan 29 08:45:28 ruturaj-vartak systemd[1]: Reached target Sleep.
Jan 29 08:45:28 ruturaj-vartak systemd[1]: Starting Suspend...
Jan 29 08:45:28 ruturaj-vartak systemd-sleep[6085]: Suspending system...
Jan 29 08:45:40 ruturaj-vartak PackageKit[2929]: daemon quit
Jan 29 08:46:04 ruturaj-vartak kernel: PM: Syncing filesystems ... done.
Jan 29 08:46:04 ruturaj-vartak kernel: PM: Preparing system for mem sleep
Jan 29 08:46:04 ruturaj-vartak kernel: Freezing user space processes ... (elapsed 0.001 seconds) done.
Jan 29 08:46:04 ruturaj-vartak kernel: Freezing remaining freezable tasks ...
Jan 29 08:46:04 ruturaj-vartak kernel: Freezing of tasks failed after 20.002 seconds (0 tasks refusing to freeze, wq_busy=1):
Jan 29 08:46:04 ruturaj-vartak kernel: Jan 29 08:46:04 ruturaj-vartak kernel: Restarting kernel threads ... done.

I disabled my powertop suggestions which looked like this

echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs';
echo 'min_power' > '/sys/class/scsi_host/host0/link_power_management_policy';
echo 'min_power' > '/sys/class/scsi_host/host1/link_power_management_policy';
echo 'min_power' > '/sys/class/scsi_host/host2/link_power_management_policy';
echo 'min_power' > '/sys/class/scsi_host/host3/link_power_management_policy';
echo '1' > '/sys/module/snd_hda_intel/parameters/power_save';
echo '0' > '/proc/sys/kernel/nmi_watchdog';
echo 'auto' > '/sys/bus/usb/devices/4-1/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:05:00.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.6/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.1/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1a.7/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1a.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1a.1/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:02.1/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:02.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:00.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:04:00.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1b.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.2/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1e.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.7/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.3/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.1/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.2/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1d.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.4/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1c.2/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:00:1f.3/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:07:00.0/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:07:00.2/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:07:00.3/power/control';
echo 'auto' > '/sys/bus/pci/devices/0000:07:00.4/power/control';

… and voila !! Things started working like normal with USB sticks. I’ve no clue what each of these settings really do.

Tweaking Gnome3 / Fedora fonts like Ubuntu

Recently I installed Fedora 17. Font rendering in Fedora is somewhat unoptimized, thanks to many patent clad algorithms for rendering fonts. But you if you want the best, follow the steps below

  1. Enable RPM Fusion Repos
    rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

  2. Install freetype-freeworld package
    yum install freetype-freeworld

  3. Install gnome tweak tool
    yum install gnome-tweak-tool

  4. Tweak font rendering
    Open gnome-tweak-tool by typing “advanced settings”. Then set
    Hinting = Slight
    Antialiasing = Rgba

  5. Configure ~/.fonts.conf
    Please save the attached file as .fonts.conf in your home folder ( ie. /home/michael/.fonts.conf ). Note the file name is .fonts.conf with a period in the begining.
    fonts

Above will render fonts in the best possible way (Font Rendering is matter of preference – tweak around for yourself). Now any application, Google Chrome, Firefox, etc will render fonts in the same manner.

Fedora (post EOL) Repositories for latest packages

If you’re a Fedora fan, and curse its downside as opposed to Ubuntu where you can add Official PPAs. Here is what I’ve found.

Remi an official Fedora projects contributor does help older distros to work with latest packages by publishing the new ones. The site supports last 2 EOL Fedora releases.

Installation

Install Repo

Install the correct release, as for my Fedora-14, I installed remi-release-14.rpm

$ sudo rpm -ivh http://rpms.famillecollet.com/remi-release-14.rpm

Enable Repo

For some reason, the repository is disabled, Enable it by opening the file in VIM

[remi]
name=Les RPM de remi pour Fedora $releasever - $basearch
#baseurl=http://rpms.famillecollet.com/fedora/$releasever/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/fedora/$releasever/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
failovermethod=priority

I got Firefox 10x , Thunderbird 10x installed on my Fedora 14 (Laughlin) !

Freeing up RAM (memory) in Linux

Very often I used to find that my Linux box(s), Fedora & Ubuntu both started reserving more RAM over a period of time since its boot. And the actual RAM left free was less.

I knew it was holding some caches for itself so that it could find the programs loading “quickly” and something like that (Sorry for my newbie language).

The most common way to free up RAM is Rebooting! But I wanted to avoid it, so did a little “googling” and I came up with an interesting solution – Tell linux to flush all the caches.

# Flush file system buffers by executing
sync;

# free page cache
echo 1 > /proc/sys/vm/drop_caches;

# free dentries and inodes
echo 2 > /proc/sys/vm/drop_caches

# free page cache, dentries and inodes
echo 3 > /proc/sys/vm/drop_caches

I’ve created a simple bash script, which u can download.

References

  1. http://www.linuxarticles.org/2010/10/release-memory-in-linux-unused-or-cached/
  2. http://www.hdfgroup.org/HDF5/faq/linux-mem.html

KDE 4.4

Just yesterday had an update on Fedora 11 for KDE 4.4. I expected from KDE 4.x legacy that the overall product would be a bit tacky. But opposed to my original thoughts it turned out to be an extremely well polished ‘Desktop’.

The settings were very easy to navigate, with lots of Compiz settings available easily without a lot of ‘extra’ installations as in GNOME. The overall stability of the desktop too was strong. I’m considering to run KDE 4.4 for atleast a week as suggested by one of my sysadmin friends.

This edition reminds me of the good old stable days of KDE 3.x