10-24-2006, 03:02 PM | #1 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
contentLister: part of the power problem
content lister sure has a lot of processes fork()'d, half of them sitting around doing nothing even when the page bar gets poked.
Makes figuring out which processes are doing what a bit more fun. Like process 565 here. It gets kill -32'd when the page bar is poked and makes the click noise. Code:
root@ereader:/media/cf/opt/debian# strace -p 565 Process 565 attached - interrupt to quit --- SIGRTMIN (Unknown signal 32) @ 0 (0) --- sigreturn() = ? (mask now [RTMIN]) open("/dev/dsp", O_WRONLY) = 23 write(23, "RIFF\300\16\0\0WAVEfmt \20\0\0\0\1\0\1\0\"V\0\0D\254\0"..., 3784) = 3784 close(23) = 0 rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0 rt_sigsuspend([] <unfinished ...> --- SIGRTMIN (Unknown signal 32) @ 0 (0) --- <... rt_sigsuspend resumed> ) = 32 sigreturn() = ? (mask now [RTMIN]) open("/dev/dsp", O_WRONLY) = 23 write(23, "RIFF\300\16\0\0WAVEfmt \20\0\0\0\1\0\1\0\"V\0\0D\254\0"..., 3784) = 3784 close(23) = 0 rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0 Which by the way seems to be all process 565 does, wait for a signal 32 to tell it the page bar flipped and write a sound to the sound device. Got this off the parent contentLister when poking the page bar. Code:
Process 494 attached - interrupt to quit .. check for input from X ... ioctl(4, FIONREAD, [0]) = 0 ... check for page bar etc... poll([{fd=5, events=POLLIN}, {fd=4, events=POLLIN, revents=POLLIN}, {fd=19, events=POLLIN|POLLPRI}, {fd=10, events=POLLIN}], 4, -1) = 1 I clicked page bar here ... X windows ... ioctl(4, FIONREAD, [32]) = 0 read(4, "\202u\352{1\331\233{8\0\0\0\7\0\240\0\0\0\0\0\1\0\1\0\1"..., 32) = 32 write(4, "\22\0\7\0\7\0\240\0\214\0\0\0\6\0\0\0 \0\1\0\1\0\0\000"..., 32) = 32 read(4, "\203u\352{4\331\233{8\0\0\0\7\0\240\0\0\0\0\0\1\0\1\0\1"..., 32) = 32 read(4, "\34\0\353{\7\0\240\0\214\0\0\0\215\331\233{\0\0\0\0\0\0"..., 32) = 32 read(4, "\1\1\354{\0\0\0\0\7\0\240\0\200\367\0\0t:\r\0h:\r\0\274"..., 32) = 32 ... side conversation via socket with another process ... sendto(14, "2,101,27,0", 10, 0, {sa_family=AF_INET, sin_port=htons(50065), sin_addr=inet_addr("127.0.0.1")}, 16) = 10 sendto(14, "2,101,47,0", 10, 0, {sa_family=AF_INET, sin_port=htons(50065), sin_addr=inet_addr("127.0.0.1")}, 16) = 10 sendto(14, "2,101,48,0", 10, 0, {sa_family=AF_INET, sin_port=htons(50065), sin_addr=inet_addr("127.0.0.1")}, 16) = 10 sendto(14, "7,101,6", 7, 0, {sa_family=AF_INET, sin_port=htons(50065), sin_addr=inet_addr("127.0.0.1")}, 16) = 7 ... log to std out ... write(2, "(CL_W)erMdsFs.c:627,erClGetDispl"..., 88) = 88 ... Scanning directory to get files... stat64("/mnt/cf/mke2fs", {st_mode=S_IFREG|0755, st_size=61444, ...}) = 0 stat64("/mnt/cf/mke2fs", {st_mode=S_IFREG|0755, st_size=61444, ...}) = 0 stat64("/mnt/cf/ncurses-5.5.tar.gz", {st_mode=S_IFREG|0644, st_size=2314030, ...}) = 0 stat64("/mnt/cf/ncurses-5.5.tar.gz", {st_mode=S_IFREG|0644, st_size=2314030, ...}) = 0 stat64("/mnt/cf/ncurses-term_5.4-4_all.deb", {st_mode=S_IFREG|0644, st_size=278364, ...}) = 0 stat64("/mnt/cf/ncurses-term_5.4-4_all.deb", {st_mode=S_IFREG|0644, st_size=278364, ...}) = 0 .. more logging to stdout ... write(2, "(CL_W)erMdsFs.c:627,erClGetDispl"..., 90) = 90 ... back to examining directory ... stat64("/mnt/cf/nslookup", {st_mode=S_IFREG|0755, st_size=489588, ...}) = 0 stat64("/mnt/cf/nslookup", {st_mode=S_IFREG|0755, st_size=489588, ...}) = 0 stat64("/mnt/cf/opt", {st_mode=S_IFDIR|0755, st_size=1024, ...}) = 0 stat64("/mnt/cf/p.tar.gz", {st_mode=S_IFREG|0644, st_size=10122084, ...}) = 0 stat64("/mnt/cf/p.tar.gz", {st_mode=S_IFREG|0644, st_size=10122084, ...}) = 0 ... side conversation via socket with another process ... sendto(14, "2,101,27,0", 10, 0, {sa_family=AF_INET, sin_port=htons(50065), sin_addr=inet_addr("127.0.0.1")}, 16) = 10 sendto(14, "2,101,47,0", 10, 0, {sa_family=AF_INET, sin_port=htons(50065), sin_addr=inet_addr("127.0.0.1")}, 16) = 10 sendto(14, "2,101,48,0", 10, 0, {sa_family=AF_INET, sin_port=htons(50065), sin_addr=inet_addr("127.0.0.1")}, 16) = 10 ... a lot of x windows ... write(4, "\2\0\4\0$\0\240\0\1\0\0\0\0\0\0\0+\0\1\0", 20) = 20 (clipped) ... side conversation via socket with another process ... sendto(13, "17,101", 6, 0, {sa_family=AF_INET, sin_port=htons(50073), sin_addr=inet_addr("127.0.0.1")}, 16) = 6 sendto(13, "0,101,8", 7, 0, {sa_family=AF_INET, sin_port=htons(50073), sin_addr=inet_addr("127.0.0.1")}, 16) = 7 sendto(13, "1,101,6", 7, 0, {sa_family=AF_INET, sin_port=htons(50073), sin_addr=inet_addr("127.0.0.1")}, 16) = 7 sendto(13, "19,101", 6, 0, {sa_family=AF_INET, sin_port=htons(50073), sin_addr=inet_addr("127.0.0.1")}, 16) = 6 Code:
root@ereader:/media/cf/debs# strace -p 666 Process 666 attached - interrupt to quit --- SIGRTMIN (Unknown signal 32) @ 0 (0) --- sigreturn() = ? (mask now [RTMIN]) gettimeofday({1161715820, 374478}, NULL) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [RTMIN], 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN], [RTMIN], 8) = 0 gettimeofday({1161715820, 377899}, NULL) = 0 nanosleep({0, 496579000}, 0) = -1 EINTR (Interrupted system call) --- SIGRTMIN (Unknown signal 32) @ 0 (0) --- rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0 kill(565, SIGRTMIN) = 0 sendto(12, "0,1", 3, 0, {sa_family=AF_INET, sin_port=htons(50071), sin_addr=inet_addr("127.0.0.1")}, 16) = 3 uname({sys="Linux", node="ereader", ...}) = 0 socket(PF_FILE, SOCK_STREAM, 0) = 22 uname({sys="Linux", node="ereader", ...}) = 0 uname({sys="Linux", node="ereader", ...}) = 0 connect(22, {sa_family=AF_FILE, path="/tmp/.X11-unix/X0"}, 19) = 0 uname({sys="Linux", node="ereader", ...}) = 0 fcntl64(22, F_SETFD, FD_CLOEXEC) = 0 access("/home/root/.Xauthority", R_OK) = -1 ENOENT (No such file or directory) writev(22, [{"l\0\v\0\0\0\0\0\0\0\0\0", 12}], 1) = 12 fcntl64(22, F_GETFL) = 0x2 (flags O_RDWR) fcntl64(22, F_SETFL, O_RDWR|O_NONBLOCK) = 0 read(22, "\1\0\v\0\0\0008\0", 8) = 8 read(22, "6\32\0\0\0\0\300\0\377\377\37\0\0\1\0\0\17\0\377\377\1"..., 224) = 224 write(22, "7\0\5\0\0\0\300\0008\0\0\0\10\0\0\0\377\0\0\0b\0\5\0\f"..., 64) = 64 read(22, "\0016\2\0\0\0\0\0\1\203\0\0\3106\25\0\24\0\0\0\0\0\0\0"..., 32) = 32 read(22, "\1\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0016\2\0\0\0\0"..., 32) = 32 write(22, "\203\0\1\0", 4) = 4 read(22, "\1\315\4\0\0\0\0\0\377\377\17\0\3106\25\0\24\0\0\0\0\0"..., 32) = 32 writev(22, [{"b\0\5\0\t\0\300\0", 8}, {"XKEYBOARD", 9}, {"\0\0\0", 3}], 3) = 20 read(22, "\1\315\5\0\0\0\0\0\0\0\0\0\3106\25\0\24\0\0\0\0\0\0\0T"..., 32) = 32 gettimeofday({1161715820, 641285}, NULL) = 0 write(22, "e\0\2\0\10\200\300\0", 8) = 8 read(22, "\1\4\6\0\0\2\0\0\254\220\3\0\0\0\0\0\3106\25\0\24\0\0\0"..., 32) = 32 read(22, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\33\377\0\0\0\0\0\0\0\0"..., 2048) = 2048 write(22, "w\0\1\0", 4) = 4 read(22, "\1\3\7\0\6\0\0\0\0\0\0\0\3106\25\0\24\0\0\0\0\0\0\0h\24"..., 32) = 32 readv(22, [{"2>xB\0\0%i\0@\0\0M\0\0\0\0\0l\0\0\0\0\0", 24}, {"", 0}], 2) = 24 gettimeofday({1161715820, 651663}, NULL) = 0 write(22, "\31\1\v\0\7\0\240\0\1\0\0\0\2p\0\0\21\250\250{8\0\0\0\7"..., 92) = 92 read(22, "\1\1\n\0\0\0\0\0\7\0\240\0h\24\1\0t:\r\0h:\r\0\2749\r\0"..., 32) = 32 write(22, "<\1\2\0\0\0\300\0+\0\1\0", 12) = 12 read(22, "\1\1\f\0\0\0\0\0\7\0\240\0h\24\1\0t:\r\0h:\r\0\2749\r\0"..., 32) = 32 shutdown(22, 2 /* send and receive */) = 0 close(22) = 0 kill(494, SIGRTMIN) = 0 rt_sigprocmask(SIG_SETMASK, NULL, [RTMIN], 8) = 0 rt_sigsuspend([] This next one is polling every .1 seconds, even when you aren't pressing buttons. This one keeps the CPU and lord above only knows what else out of sleep mode... Code:
ioctl(15, 0x80046207, 0xbf3ffb0c) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(15, 0x80046207, 0xbf3ffb0c) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(15, 0x80046207, 0xbf3ffb0c) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(15, 0x80046207, 0xbf3ffb0c) = 0 |
10-24-2006, 03:10 PM | #2 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
Ah, finally caught 665 in action!
665 is the .1 second poller process which is polling an ioctl call on file descriptor 15. Acoording to lsof fd 15 is hooked to: Code:
contentLi 665 root 15u CHR 222,0 329 /dev/buttons So now we see that when the page bar gets tweaked 665 does something about it. Code:
ioctl(15, 0x80046207, 0xbf3ffb0c) = 0 nanosleep({0, 100000000}, NULL) = 0 ioctl(15, 0x80046207, 0xbf3ffb0c) = 0 kill(666, SIGRTMIN) = 0 kill(666, SIGRTMIN) = 0 nanosleep({0, 100000000}, NULL) = 0 |
Advert | |
|
10-24-2006, 03:12 PM | #3 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
And in case you wanted to know what that signal is: http://en.wikipedia.org/wiki/SIGRTMIN
|
10-24-2006, 03:19 PM | #4 |
Gizmologist
Posts: 11,615
Karma: 929550
Join Date: Jan 2006
Location: Republic of Texas Embassy at Jackson, TN
Device: Pocketbook Touch HD3
|
So ... do I understand correctly that the much (you should pardon the term) demonized "plonk" sound is part of process 666?
How ironic. |
10-24-2006, 03:19 PM | #5 | |
Connoisseur
Posts: 78
Karma: 103
Join Date: Aug 2006
Location: Ipswich, UK
Device: Irex Iliad
|
Quote:
|
|
Advert | |
|
10-24-2006, 04:06 PM | #6 | |
Guru
Posts: 607
Karma: 2157
Join Date: Oct 2005
Device: NCR3125, Nokia 770,...
|
Quote:
Last edited by arivero; 10-24-2006 at 04:11 PM. |
|
10-24-2006, 04:59 PM | #7 |
iLiad Maniac
Posts: 1,382
Karma: 2369
Join Date: Apr 2006
Location: Germany
Device: Bookeen Opus (i love that thing) and iPad (what an irony)
|
Does this mean, that there basically is no way to suspend the machine in between pageflips, since the buttons dont use interrupts to wake the machine?
|
10-24-2006, 05:10 PM | #8 |
Banned
Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
I've already posted to iRex asking them to re-write /dev/buttons.
Silly thing really should block that ioctl call, sigh... And if sound is off? Why feed the sound file? They're chewing up energy feeding sound into a speaker with the volume turned down! Argh! Where is the meditation thread? |
10-24-2006, 05:12 PM | #9 |
iLiad Maniac
Posts: 1,382
Karma: 2369
Join Date: Apr 2006
Location: Germany
Device: Bookeen Opus (i love that thing) and iPad (what an irony)
|
Here you go: Meditation thread
Oh, and for the speaker, i read somewhere, that they have to do soundchip PM. I think thats, when all those things get sorted out. Last edited by tribble; 10-24-2006 at 05:14 PM. |
10-24-2006, 05:38 PM | #10 |
eink fanatic
Posts: 2,022
Karma: 4924
Join Date: Mar 2006
Location: Germany
Device: STAReBOOK, iRex Iliad, Sony 505, Kindle 2
|
really scotty1024...you are one of my big heroes these days...the stuff you find out by poking around in the Iliad's software internals...WOW is all I can say about that...
|
10-24-2006, 05:47 PM | #11 | |
Addict
Posts: 285
Karma: 10
Join Date: Apr 2006
Location: Vancouver, Canada
Device: Proud Iliad owner
|
Quote:
|
|
10-24-2006, 05:53 PM | #12 |
eink fanatic
Posts: 2,022
Karma: 4924
Join Date: Mar 2006
Location: Germany
Device: STAReBOOK, iRex Iliad, Sony 505, Kindle 2
|
Believe me vranghel, I don't understand much either, but it still sounds amazing...:-)
The way he's going right now, he'll give us a completely rewritten Iliad OS with Suspend Mode and higher overall speed in...2 days or something...:-) |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DR800 Power button problem with RC2 firmware | apple101 | iRex | 7 | 06-16-2010 02:00 PM |
E-Books – The Bigger Problem, Part One of Three | Nate the great | News | 6 | 01-06-2010 12:46 PM |
Problem with Power Connector on Iliad.... ER0140 | aabeg100 | iRex | 0 | 09-17-2009 07:49 AM |
Problem running scripts from ContentLister | Fellball | iRex | 1 | 03-13-2009 08:16 PM |
Weird Power Problem | Hepcat | Sony Reader | 11 | 07-06-2007 01:18 PM |