LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-19-2018, 08:19 AM   #16
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Ubuntu 16.04 LTS
Posts: 99

Original Poster
Rep: Reputation: 12

Quote:
Originally Posted by norobro View Post
Take a look in the following two files and see if any files on your mounted drive are listed. On my system there are several old files listed that I have since deleted. I think because of the change in gedit 3.20 the drive isn't accessed.
Code:
$ grep recently strace-gedit.log 
open("/home/gigi/.local/share/recently-used.xbel", O_RDONLY) = 14
open("/home/gigi/.local/share/recently-used.xbel.PUQDDZ", O_RDWR|O_CREAT|O_EXCL, 0666) = 15
You might try moving those files out of the way and running gedit to see if your drive still spins up.
Hm, I found the below in /home/gigi/.local/share/recently-used.xbel:
Code:
  <bookmark href="file:///mnt/1TB/Temp/Adila/info.txt" added="2017-12-22T14:15:11Z" modified="2017-12-22T14:45:31Z" visited="2017-12-22T14:15:11Z">
    <info>
      <metadata owner="http://freedesktop.org">
        <mime:mime-type type="text/plain"/>
        <bookmark:groups>
          <bookmark:group>gedit</bookmark:group>
        </bookmark:groups>
        <bookmark:applications>
          <bookmark:application name="gedit" exec="&apos;gedit %u&apos;" modified="2017-12-22T14:45:31Z" count="11"/>
        </bookmark:applications>
      </metadata>
    </info>
  </bookmark>
Additionally Visual Studio Code also use that file:
Code:
open("/home/adr/.local/share/recently-used.xbel", O_RDONLY) = 119
It contains the /mnt/1TB path - could this be the problem?

Last edited by adrhc; 01-19-2018 at 08:32 AM.
 
Old 01-19-2018, 12:19 PM   #17
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,895

Rep: Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679
Note: I had not yet seen the immediately above post when I wrote this. (The page breaks in this forum sometimes come at unfortunate places.)

Still nothing apparent. Perhaps a child process is involved. Try adding "-f" to the strace options and see if anything turns up. You don't need to attach all these huge files. Just see if the path to the mount point shows up in the trace. If not, the only other thing I can think of is that gedit does have some dbus interactions, and perhaps one of those is triggering the disk access. I don't know how to look for that.

Last edited by rknichols; 01-19-2018 at 12:23 PM. Reason: add note
 
1 members found this post helpful.
Old 01-19-2018, 01:53 PM   #18
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Ubuntu 16.04 LTS
Posts: 99

Original Poster
Rep: Reputation: 12
Thank you guys. I removed
Code:
<bookmark href="file:///mnt/1TB/Temp/Adila/info.txt" ...
from /home/gigi/.local/share/recently-used.xbel and for the moment gedit seems to no longer interrupt the HDD sleeping. Anyway in order for this to be considered the solution (the removal of any bookmarks pointing to sleeping HDD) I'll have to wait this night to pass - so the computer to rest untouched few hours - and after it to test again with strace and gedit.

Considering OpenDocumentSelector: fix fetching of recents (see previous @norobro post) I guess gedit reads the last access time for all the recent opened files (listed in recently-used.xbel) which is hitting all HDDs on which they are stored. The gedit fix doesn't seems to me to solve my particular problem - what do you think?

@rknichols
Maybe
Code:
open("/var/lib/dbus/machine-id", O_RDONLY) = 14

Last edited by adrhc; 01-19-2018 at 02:05 PM.
 
Old 01-19-2018, 02:27 PM   #19
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,895

Rep: Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679Reputation: 1679
Quote:
Originally Posted by adrhc View Post
@rknichols
Maybe
Code:
open("/var/lib/dbus/machine-id", O_RDONLY) = 14
Not likely. All that can be done from there is to read the 128-bit machine ID for the local system (32 hex characters). No disk access involved.
 
1 members found this post helpful.
Old 01-20-2018, 01:45 AM   #20
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Ubuntu 16.04 LTS
Posts: 99

Original Poster
Rep: Reputation: 12
I run again:
Code:
strace -e trace=file -o $HOME/strace-file-gedit.log gedit
and again the HDD sleeping was interrupted (I attached the last part of the log).

Nothing found here (e.g. /mnt/1TB):
Code:
grep -i mnt .local/share/recently-used.xbel
or here:
Code:
grep -i mnt strace-file-gedit.log
The removal of /mnt/1TB references from recently-used.xbel doesn't seems to be the solution.
Attached Files
File Type: log strace-file-gedit.log (246.1 KB, 6 views)

Last edited by adrhc; 01-20-2018 at 01:48 AM.
 
Old 01-20-2018, 02:07 AM   #21
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Ubuntu 16.04 LTS
Posts: 99

Original Poster
Rep: Reputation: 12
With some bash tricks I also learned that there are not referentes to /mnt from the files listed in strace-file-gedit.log attached above:
Code:
grep '("/' strace-file-gedit.log | grep -v 'No such file or directory' | cut -f2 -d'"' | uniq | sort > files.txt
while read -r line; do if [ -f "$line" ]; then grep -i mnt $line; fi done < files.txt
 
Old 01-21-2018, 02:14 AM   #22
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Ubuntu 16.04 LTS
Posts: 99

Original Poster
Rep: Reputation: 12
I run again the strace test:
Code:
strace -e trace=file -o $HOME/strace-file-gedit.log gedit
and I attached exactly only the strace lines (337) outputted when pressing the Open button in gedit.
Attached Files
File Type: log strace-file-gedit.log (31.2 KB, 3 views)
 
  


Reply

Tags
hdd, standby


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Standby one HDD from Two HDDs hack3rcon Linux - Newbie 11 10-26-2015 06:40 AM
[SOLVED] Standby Specific HDD. hack3rcon Linux - Hardware 5 03-10-2015 07:11 AM
[SOLVED] Issue with hdd standby (hdparm vs. udev) semiRocket Slackware 4 08-31-2009 08:18 AM
Libata is detecs my samsung hdd wrong and drives won't standby MrBrain Linux - Hardware 1 10-20-2007 10:06 AM
HDD Standby/Sleep Problems green_dragon37 Linux - Hardware 7 06-16-2003 12:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 03:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration