Hi, On my laptop I use : * a SSD for boot and all tasks * a HDD for storing big files The HDD is spun down at startup and the corresponding filesystem is unmounted. I succeed in disabling all services making the HDD periodically wake up. The only problem is that this HDD spins up when I launch thunar for the first time. If I close thunar, spin down the disk, then launch thunar again, the disk stays in sleep mode... Is there a way to disable thunar first access to umounted partition ?
I found this thread without answer talking about the same issue : https://forum.xfce.org/viewtopic.php?id=11270
Do you see this behavior with other file managers, e.g. Nautilus, Nemo? I ask because they also use gvfs and because I can't reproduce, all my computers are SSD-only :/
Same problem with nautilus. HDD spins up when nautilus starts for the first time. Then if I force HDD sleeping and launch nautilus again, HDD stays in sleep mode. I guess these files managers use a daemon which starts when the program is first launched and stays in the background when closed, making faster the next program launch ? Thank you for your reply, sorry for the delay
The common factor is gvfs, both file managers use it. As for daemons, besides thunar running in background here I have 4 related to gvfs, any of them could be poking your HDD from time to time. There is a 10 year old thread about a similar issue: https://gitlab.gnome.org/GNOME/gvfs/issues/49 It would be very helpful if you could confirm which process is accessing the hard drive: https://unix.stackexchange.com/q/274136
sudo blktrace -d /dev/sda -o - | blkparse -i - 8,0 3 1 0.000000000 779 I N 0 [hdparm] 8,0 3 2 0.000008540 779 D N 0 [hdparm] 8,0 0 1 0.510149800 0 C N [0] 8,0 1 1 0.510261390 18 I N 0 [kworker/1:0] 8,0 1 2 0.510267160 18 D N 0 [kworker/1:0] 8,0 1 3 0.510273812 18 C N [0] 8,0 0 2 9.388389656 806 I R 512 [udisksd] 8,0 0 3 9.388391210 806 D R 512 [udisksd] 8,0 0 4 9.389282701 0 C R [0] 8,0 0 5 9.389299825 13 I N 0 [kworker/0:1] 8,0 0 6 9.389300790 13 D N 0 [kworker/0:1] 8,0 0 7 9.389302081 13 C N [0] 8,0 1 4 9.401620671 813 Q FWS [dumpe2fs] 8,0 1 5 9.401623915 813 G FWS [dumpe2fs] 8,0 0 8 9.401806074 0 C WS 0 [0] 8,0 1 6 9.401855860 813 A RA 2048 + 32 <- (8,1) 0 8,0 1 7 9.401856228 813 Q RA 2048 + 32 [dumpe2fs] 8,0 1 8 9.401857212 813 G RA 2048 + 32 [dumpe2fs] 8,0 1 9 9.401858075 813 P N [dumpe2fs] 8,0 1 10 9.401858609 813 U N [dumpe2fs] 1 8,0 1 11 9.401858994 813 I RA 2048 + 32 [dumpe2fs] 8,0 1 12 9.401860501 813 D RA 2048 + 32 [dumpe2fs] 8,0 0 9 10.603619973 13 I N 0 [kworker/0:1] 8,0 0 10 10.603629000 13 D N 0 [kworker/0:1] 8,0 0 11 10.603643871 13 C N [0] 8,0 0 12 11.169246919 0 C RA 2048 + 32 [0] 8,0 0 13 11.173240441 814 Q FWS [dumpe2fs] 8,0 0 14 11.173242608 814 G FWS [dumpe2fs] 8,0 0 15 11.191930532 0 C WS 0 [0] 8,0 0 16 11.192021562 814 A RA 2048 + 32 <- (8,1) 0 8,0 0 17 11.192023179 814 Q RA 2048 + 32 [dumpe2fs] 8,0 0 18 11.192026947 814 G RA 2048 + 32 [dumpe2fs] 8,0 0 19 11.192030370 814 P N [dumpe2fs] 8,0 0 20 11.192031893 814 U N [dumpe2fs] 1 8,0 0 21 11.192032921 814 I RA 2048 + 32 [dumpe2fs] 8,0 0 22 11.192038013 814 D RA 2048 + 32 [dumpe2fs] 8,0 0 23 11.192130578 0 C RA 2048 + 32 [0] 8,0 0 24 11.197028392 814 A RA 2080 + 64 <- (8,1) 32 8,0 0 25 11.197029871 814 Q RA 2080 + 64 [dumpe2fs] 8,0 0 26 11.197033958 814 G RA 2080 + 64 [dumpe2fs] 8,0 0 27 11.197037241 814 P N [dumpe2fs] 8,0 0 28 11.197038861 814 U N [dumpe2fs] 1 8,0 0 29 11.197039906 814 I RA 2080 + 64 [dumpe2fs] 8,0 0 30 11.197045389 814 D RA 2080 + 64 [dumpe2fs] 8,0 0 31 11.197076480 814 A RA 2144 + 128 <- (8,1) 96 8,0 0 32 11.197077144 814 Q RA 2144 + 128 [dumpe2fs] 8,0 0 33 11.197078501 814 G RA 2144 + 128 [dumpe2fs] 8,0 0 34 11.197079808 814 P N [dumpe2fs] 8,0 0 35 11.197080132 814 U N [dumpe2fs] 1 8,0 0 36 11.197080558 814 I RA 2144 + 128 [dumpe2fs] 8,0 0 37 11.197082112 814 D RA 2144 + 128 [dumpe2fs] 8,0 0 38 11.197222970 0 C RA 2080 + 64 [0] 8,0 0 39 11.197320160 814 C RA 2144 + 128 [0] 8,0 0 40 11.197327386 814 A RA 2272 + 256 <- (8,1) 224 8,0 0 41 11.197328471 814 Q RA 2272 + 256 [dumpe2fs] 8,0 0 42 11.197331898 814 G RA 2272 + 256 [dumpe2fs] 8,0 0 43 11.197333706 814 P N [dumpe2fs] 8,0 0 44 11.197334931 814 U N [dumpe2fs] 1 8,0 0 45 11.197335656 814 I RA 2272 + 256 [dumpe2fs] 8,0 0 46 11.197338650 814 D RA 2272 + 256 [dumpe2fs] 8,0 0 47 11.197403472 814 A RA 2528 + 256 <- (8,1) 480 8,0 0 48 11.197404025 814 Q RA 2528 + 256 [dumpe2fs] 8,0 0 49 11.197406341 814 G RA 2528 + 256 [dumpe2fs] 8,0 0 50 11.197408089 814 P N [dumpe2fs] 8,0 0 51 11.197408466 814 U N [dumpe2fs] 1 8,0 0 52 11.197408883 814 I RA 2528 + 256 [dumpe2fs] 8,0 0 53 11.197411129 814 D RA 2528 + 256 [dumpe2fs] 8,0 0 54 11.197683094 0 C RA 2272 + 256 [0] 8,0 0 55 11.197904224 814 C RA 2528 + 256 [0] 8,0 0 56 11.198597224 814 A RA 10504 + 8 <- (8,1) 8456 8,0 0 57 11.198598387 814 Q RA 10504 + 8 [dumpe2fs] 8,0 0 58 11.198601555 814 G RA 10504 + 8 [dumpe2fs] 8,0 0 59 11.198604557 814 P N [dumpe2fs] 8,0 0 60 11.198606100 814 U N [dumpe2fs] 1 8,0 0 61 11.198606934 814 I RA 10504 + 8 [dumpe2fs] 8,0 0 62 11.198612641 814 D RA 10504 + 8 [dumpe2fs] 8,0 0 63 11.207120919 501 C RA 10504 + 8 [0] 8,0 2 1 11.207272143 814 A RA 973342712 + 8 <- (8,1) 973340664 8,0 2 2 11.207275053 814 Q RA 973342712 + 8 [dumpe2fs] 8,0 2 3 11.207279419 814 G RA 973342712 + 8 [dumpe2fs] 8,0 2 4 11.207283354 814 P N [dumpe2fs] 8,0 2 5 11.207285411 814 U N [dumpe2fs] 1 8,0 2 6 11.207286579 814 I RA 973342712 + 8 [dumpe2fs] 8,0 2 7 11.207293816 814 D RA 973342712 + 8 [dumpe2fs] 8,0 0 64 11.226224526 0 C RA 973342712 + 8 [0] 8,0 2 8 11.226346920 814 A RA 973342720 + 32 <- (8,1) 973340672 8,0 2 9 11.226349377 814 Q RA 973342720 + 32 [dumpe2fs] 8,0 2 10 11.226355437 814 G RA 973342720 + 32 [dumpe2fs] 8,0 2 11 11.226359277 814 P N [dumpe2fs] 8,0 2 12 11.226361502 814 U N [dumpe2fs] 1 8,0 2 13 11.226363386 814 I RA 973342720 + 32 [dumpe2fs] 8,0 2 14 11.226370666 814 D RA 973342720 + 32 [dumpe2fs] 8,0 0 65 11.226532403 0 C RA 973342720 + 32 [0] 8,0 2 15 11.226691837 393 I N 0 [kworker/2:3] 8,0 2 16 11.226696537 393 D N 0 [kworker/2:3] 8,0 2 17 11.226702467 393 C N [0] 8,0 2 18 11.245153980 806 I R 512 [udisksd] 8,0 2 19 11.245158390 806 D R 512 [udisksd] 8,0 0 66 11.249326681 0 C R [0] 8,0 2 20 11.249463044 393 I N 0 [kworker/2:3] 8,0 2 21 11.249468510 393 D N 0 [kworker/2:3] 8,0 2 22 11.249476217 393 C N [0] 8,0 1 13 11.260874223 817 Q FWS [dumpe2fs] 8,0 1 14 11.260877252 817 G FWS [dumpe2fs] 8,0 0 67 11.261053392 501 C WS 0 [0] 8,0 1 15 11.261094798 817 A RA 2048 + 32 <- (8,1) 0 8,0 1 16 11.261096033 817 Q RA 2048 + 32 [dumpe2fs] 8,0 1 17 11.261099737 817 G RA 2048 + 32 [dumpe2fs] 8,0 1 18 11.261102409 817 P N [dumpe2fs] 8,0 1 19 11.261104733 817 U N [dumpe2fs] 1 8,0 1 20 11.261105869 817 I RA 2048 + 32 [dumpe2fs] 8,0 1 21 11.261110301 817 D RA 2048 + 32 [dumpe2fs] 8,0 0 68 11.277483724 501 C RA 2048 + 32 [0] 8,0 1 22 11.277540864 817 A RA 2080 + 64 <- (8,1) 32 8,0 1 23 11.277541585 817 Q RA 2080 + 64 [dumpe2fs] 8,0 1 24 11.277543450 817 G RA 2080 + 64 [dumpe2fs] 8,0 1 25 11.277545044 817 P N [dumpe2fs] 8,0 1 26 11.277545869 817 U N [dumpe2fs] 1 8,0 1 27 11.277546455 817 I RA 2080 + 64 [dumpe2fs] 8,0 1 28 11.277549260 817 D RA 2080 + 64 [dumpe2fs] 8,0 1 29 11.277580476 817 A RA 2144 + 128 <- (8,1) 96 8,0 1 30 11.277580975 817 Q RA 2144 + 128 [dumpe2fs] 8,0 1 31 11.277582474 817 G RA 2144 + 128 [dumpe2fs] 8,0 1 32 11.277583425 817 P N [dumpe2fs] 8,0 1 33 11.277583903 817 U N [dumpe2fs] 1 8,0 1 34 11.277584241 817 I RA 2144 + 128 [dumpe2fs] 8,0 1 35 11.277586000 817 D RA 2144 + 128 [dumpe2fs] 8,0 0 69 11.277740133 501 C RA 2080 + 64 [0] 8,0 1 36 11.277791364 817 A RA 2272 + 256 <- (8,1) 224 8,0 1 37 11.277791844 817 Q RA 2272 + 256 [dumpe2fs] 8,0 1 38 11.277793723 817 G RA 2272 + 256 [dumpe2fs] 8,0 1 39 11.277794836 817 P N [dumpe2fs] 8,0 1 40 11.277795534 817 U N [dumpe2fs] 1 8,0 1 41 11.277795928 817 I RA 2272 + 256 [dumpe2fs] 8,0 1 42 11.277797917 817 D RA 2272 + 256 [dumpe2fs] 8,0 0 70 11.278087877 501 C RA 2144 + 128 [0] 8,0 1 43 11.278170974 817 A RA 2528 + 256 <- (8,1) 480 8,0 1 44 11.278171481 817 Q RA 2528 + 256 [dumpe2fs] 8,0 1 45 11.278173463 817 G RA 2528 + 256 [dumpe2fs] 8,0 1 46 11.278174728 817 P N [dumpe2fs] 8,0 1 47 11.278175320 817 U N [dumpe2fs] 1 8,0 1 48 11.278175963 817 I RA 2528 + 256 [dumpe2fs] 8,0 1 49 11.278177910 817 D RA 2528 + 256 [dumpe2fs] 8,0 0 71 11.278877695 501 C RA 2272 + 256 [0] 8,0 1 50 11.279844184 817 A RA 10504 + 8 <- (8,1) 8456 8,0 1 51 11.279844788 817 Q RA 10504 + 8 [dumpe2fs] 8,0 1 52 11.279846209 817 G RA 10504 + 8 [dumpe2fs] 8,0 1 53 11.279847633 817 P N [dumpe2fs] 8,0 1 54 11.279848477 817 U N [dumpe2fs] 1 8,0 1 55 11.279849001 817 I RA 10504 + 8 [dumpe2fs] 8,0 1 56 11.279851888 817 D RA 10504 + 8 [dumpe2fs] 8,0 0 72 11.280863726 501 C RA 2528 + 256 [0] 8,0 0 73 11.290468170 0 C RA 10504 + 8 [0] 8,0 1 57 11.290551081 817 A RA 973342712 + 8 <- (8,1) 973340664 8,0 1 58 11.290552049 817 Q RA 973342712 + 8 [dumpe2fs] 8,0 1 59 11.290553965 817 G RA 973342712 + 8 [dumpe2fs] 8,0 1 60 11.290555815 817 P N [dumpe2fs] 8,0 1 61 11.290556840 817 U N [dumpe2fs] 1 8,0 1 62 11.290557557 817 I RA 973342712 + 8 [dumpe2fs] 8,0 1 63 11.290561049 817 D RA 973342712 + 8 [dumpe2fs] 8,0 0 74 11.309469872 0 C RA 973342712 + 8 [0] 8,0 1 64 11.309545690 817 A RA 973342720 + 32 <- (8,1) 973340672 8,0 1 65 11.309546634 817 Q RA 973342720 + 32 [dumpe2fs] 8,0 1 66 11.309548863 817 G RA 973342720 + 32 [dumpe2fs] 8,0 1 67 11.309550772 817 P N [dumpe2fs] 8,0 1 68 11.309551870 817 U N [dumpe2fs] 1 8,0 1 69 11.309552600 817 I RA 973342720 + 32 [dumpe2fs] 8,0 1 70 11.309555961 817 D RA 973342720 + 32 [dumpe2fs] 8,0 0 75 11.309699112 0 C RA 973342720 + 32 [0] 8,0 1 71 11.309798391 18 I N 0 [kworker/1:0] 8,0 1 72 11.309800667 18 D N 0 [kworker/1:0] 8,0 1 73 11.309803519 18 C N [0] 8,0 1 74 11.323193737 819 Q FWS [dumpe2fs] 8,0 1 75 11.323196177 819 G FWS [dumpe2fs] 8,0 0 76 11.331810480 0 C WS 0 [0] 8,0 1 76 11.331844017 819 A RA 2048 + 32 <- (8,1) 0 8,0 1 77 11.331845113 819 Q RA 2048 + 32 [dumpe2fs] 8,0 1 78 11.331847930 819 G RA 2048 + 32 [dumpe2fs] 8,0 1 79 11.331849859 819 P N [dumpe2fs] 8,0 1 80 11.331851272 819 U N [dumpe2fs] 1 8,0 1 81 11.331852154 819 I RA 2048 + 32 [dumpe2fs] 8,0 1 82 11.331855219 819 D RA 2048 + 32 [dumpe2fs] 8,0 0 77 11.331943145 0 C RA 2048 + 32 [0] 8,0 1 83 11.332029722 819 A RA 2080 + 64 <- (8,1) 32 8,0 1 84 11.332030374 819 Q RA 2080 + 64 [dumpe2fs] 8,0 1 85 11.332032491 819 G RA 2080 + 64 [dumpe2fs] 8,0 1 86 11.332034014 819 P N [dumpe2fs] 8,0 1 87 11.332034690 819 U N [dumpe2fs] 1 8,0 1 88 11.332035265 819 I RA 2080 + 64 [dumpe2fs] 8,0 1 89 11.332037914 819 D RA 2080 + 64 [dumpe2fs] 8,0 1 90 11.332068206 819 A RA 2144 + 128 <- (8,1) 96 8,0 1 91 11.332068658 819 Q RA 2144 + 128 [dumpe2fs] 8,0 1 92 11.332070118 819 G RA 2144 + 128 [dumpe2fs] 8,0 1 93 11.332070895 819 P N [dumpe2fs] 8,0 1 94 11.332071342 819 U N [dumpe2fs] 1 8,0 1 95 11.332071751 819 I RA 2144 + 128 [dumpe2fs] 8,0 1 96 11.332073255 819 D RA 2144 + 128 [dumpe2fs] 8,0 0 78 11.332164833 0 C RA 2080 + 64 [0] 8,0 1 97 11.332245305 819 A RA 2272 + 256 <- (8,1) 224 8,0 1 98 11.332245746 819 Q RA 2272 + 256 [dumpe2fs] 8,0 1 99 11.332248034 819 G RA 2272 + 256 [dumpe2fs] 8,0 1 100 11.332249082 819 P N [dumpe2fs] 8,0 1 101 11.332249655 819 U N [dumpe2fs] 1 8,0 1 102 11.332250153 819 I RA 2272 + 256 [dumpe2fs] 8,0 1 103 11.332252332 819 D RA 2272 + 256 [dumpe2fs] 8,0 0 79 11.332312511 0 C RA 2144 + 128 [0] 8,0 1 104 11.332427378 819 A RA 2528 + 256 <- (8,1) 480 8,0 1 105 11.332427885 819 Q RA 2528 + 256 [dumpe2fs] 8,0 1 106 11.332430405 819 G RA 2528 + 256 [dumpe2fs] 8,0 1 107 11.332431662 819 P N [dumpe2fs] 8,0 1 108 11.332432238 819 U N [dumpe2fs] 1 8,0 1 109 11.332432741 819 I RA 2528 + 256 [dumpe2fs] 8,0 1 110 11.332434996 819 D RA 2528 + 256 [dumpe2fs] 8,0 0 80 11.332617280 0 C RA 2272 + 256 [0] 8,0 0 81 11.332850080 0 C RA 2528 + 256 [0] 8,0 1 111 11.333833108 819 A RA 10504 + 8 <- (8,1) 8456 8,0 1 112 11.333834310 819 Q RA 10504 + 8 [dumpe2fs] 8,0 1 113 11.333836839 819 G RA 10504 + 8 [dumpe2fs] 8,0 1 114 11.333839416 819 P N [dumpe2fs] 8,0 1 115 11.333840788 819 U N [dumpe2fs] 1 8,0 1 116 11.333841596 819 I RA 10504 + 8 [dumpe2fs] 8,0 1 117 11.333846321 819 D RA 10504 + 8 [dumpe2fs] 8,0 0 82 11.333956001 0 C RA 10504 + 8 [0] 8,0 1 118 11.334033582 819 A RA 973342712 + 8 <- (8,1) 973340664 8,0 1 119 11.334034680 819 Q RA 973342712 + 8 [dumpe2fs] 8,0 1 120 11.334036888 819 G RA 973342712 + 8 [dumpe2fs] 8,0 1 121 11.334039055 819 P N [dumpe2fs] 8,0 1 122 11.334040312 819 U N [dumpe2fs] 1 8,0 1 123 11.334041064 819 I RA 973342712 + 8 [dumpe2fs] 8,0 1 124 11.334045029 819 D RA 973342712 + 8 [dumpe2fs] 8,0 0 83 11.334147936 0 C RA 973342712 + 8 [0] 8,0 1 125 11.334217332 819 A RA 973342720 + 32 <- (8,1) 973340672 8,0 1 126 11.334218479 819 Q RA 973342720 + 32 [dumpe2fs] 8,0 1 127 11.334221108 819 G RA 973342720 + 32 [dumpe2fs] 8,0 1 128 11.334223247 819 P N [dumpe2fs] 8,0 1 129 11.334224488 819 U N [dumpe2fs] 1 8,0 1 130 11.334225242 819 I RA 973342720 + 32 [dumpe2fs] 8,0 1 131 11.334229239 819 D RA 973342720 + 32 [dumpe2fs] 8,0 0 84 11.334316480 0 C RA 973342720 + 32 [0] 8,0 1 132 11.334399645 18 I N 0 [kworker/1:0] 8,0 1 133 11.334401843 18 D N 0 [kworker/1:0] 8,0 1 134 11.334404607 18 C N [0] $ top ... 784 al 20 0 2388 756 692 S 0,0 0,0 0:00.00 sh 785 al 20 0 413804 46524 32612 S 0,0 0,6 0:01.17 thunar 789 al 20 0 240476 7740 6796 S 0,0 0,1 0:00.01 gvfsd 796 al 20 0 18468 5208 4680 S 0,0 0,1 0:00.00 xfconfd 803 al 20 0 283808 9912 8928 S 0,0 0,1 0:00.01 gvfs-udisks2-+ 824 al 20 0 238392 6088 5476 S 0,0 0,1 0:00.01 gvfs-mtp-volu+ 829 al 20 0 236588 6200 5576 S 0,0 0,1 0:00.00 gvfs-goa-volu+ 834 al 20 0 243044 9040 6176 S 0,0 0,1 0:00.01 gvfs-gphoto2-+ 839 al 20 0 319248 9524 6620 S 0,0 0,1 0:00.00 gvfs-afc-volu+ 845 al 20 0 164884 7624 5108 S 0,0 0,1 0:00.00 gvfsd-metadata 848 al 20 0 314440 8144 7072 S 0,0 0,1 0:00.02 gvfsd-trash ... Hard to say which gvfs process is in cause, PID changes. There is the dumpe2fs indication...
Ok, I made the test more precisely. The process dumpe2fs is started at thunar startup, before all gvfs processes. It wakes up the HDD, then terminates and gives place to gvfs processes.
Did not find any occurence of this call in the thunar code. Possibly it is hidden after some gtk/gio method. Thunar as well can run without gvfs. What happens if you uninstall gvfs, is dumpe2fs still executed on thunar launch ?
Good point ! Uninstalling gvfs resolve the problem, but without gvfs, i can't browse samba network shares. Should I close this bug report and report it directly to gvfs team ?
Yes, think it makes sense to close this report and open a gvfs bug / ask e.g . in a gvfs forum. Please feel free to reopen if thunar e.g. should use a differnt gvfs startup procedure.
Thank you !