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.

Leave a Reply

Your email address will not be published. Required fields are marked *