redshift-plasmoid
redshift-plasmoid copied to clipboard
per activity settings not honored
Hi,
Thank you for creating this plasmod. It does a great complement to redshift. I really like your idea of keeping redshift settings per activity.
Unfortunately, it does not seem to work.
Following is my setting, running with plasmoid verison 0.6.2.
[Activities] alwaysOffActivities=d6ad31f1-cd24-48b6-ae73-66fd57fd713a
[General] autolaunch=true
as you can see, there the unique id for one of the activities mentioned. But switching to that activity does not disable redshift at all. It does not disable redshift even for a second.
On that note, even toggling the switch off does not disable redshift. It gets enabled back again in a couple of seconds.
PS: Is that the right reference to activities ? Or should I be manually providing the activity name in there ?
BTW, I am running KDE 4.11
The fact that if you disable redshift and it gets enabled back after few seconds let me think that there is a different instance of redshift running.
You should verify that there is only one instance of redshift running on your system (use KSysGuard), the one that is launched by the redshift plasma widget. So you should disable any other instance of redshift. Check that you haven't added redshift (daemon) to the software that will be launched during the desktop enviroment boot.
On 04/03/2014 07:56 PM, Simone Gaiarin wrote:
The fact that if you disable redshift and it gets enabled back after few seconds let me think that there is a different instance of redshift running.
You should verify that there is only one instance of redshift running on your system (use KSysGuard), the one that is launched by the redshift plasma widget. So you should disable any other instance of redshift. Check that you haven't added redshift (daemon) to the software that will be launched during the desktop enviroment boot.
I checked everything but can't find the cause.
00:11:26 rrs@zan:~$ ps aux | grep -i redshift rrs 5902 0.0 0.0 91824 5816 ? S 00:11 0:00 /usr/bin/redshiftautostart rrs 5908 0.0 0.0 67540 2512 ? S 00:11 0:00 /usr/bin/redshift -c /dev/null -l 12.9 77.5 -t 5500 3700 -g 1.00 1.00 1.00 -b 1.00 rrs 6086 0.0 0.0 10340 900 pts/2 S+ 00:11 0:00 grep --color=auto -i redshift
Both the binaries are shipped by the plasmoid only.
Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com "Necessity is the mother of invention."
Anything else you suggest I look for ?
Everything seems ok. Only one process is running. Which distribution and version are you running? I've tried on Ubuntu 13.10 and Chakra and redshift is working correctly.
I am on Debian. We recently got redshift included in the archive. I believe the version is 0.6.2
KDE is at version 4.12
s3nt fr0m a $martph0ne, excuse typ0s On Apr 9, 2014 9:25 PM, "Simone Gaiarin" [email protected] wrote:
Everything seems ok. Only one process is running. Which distribution and version are you running? I've tried on Ubuntu 13.10 and Chakra and redshift is working correctly.
Reply to this email directly or view it on GitHubhttps://github.com/simgunz/redshift-plasmoid/issues/11#issuecomment-39981085 .
I'll check it in few days with ubuntu 14.04 and the app installed from the universe repository (that should be the same version you have) and I let you know.
2014-04-09 18:07 GMT+02:00 Ritesh Raj Sarraf [email protected]:
I am on Debian. We recently got redshift included in the archive. I believe the version is 0.6.2
KDE is at version 4.12
s3nt fr0m a $martph0ne, excuse typ0s On Apr 9, 2014 9:25 PM, "Simone Gaiarin" [email protected] wrote:
Everything seems ok. Only one process is running. Which distribution and version are you running? I've tried on Ubuntu 13.10 and Chakra and redshift is working correctly.
Reply to this email directly or view it on GitHub< https://github.com/simgunz/redshift-plasmoid/issues/11#issuecomment-39981085
.
Reply to this email directly or view it on GitHubhttps://github.com/simgunz/redshift-plasmoid/issues/11#issuecomment-39982676 .
@simgunz
Hello. Were you able to reproduce the issue ? The re-enabling problem seems to be resolved. But the per-activity problem still exists.
I've tried with ubuntu 14.04 and redshift plasmoid 0.6.1 (the one in the repository, that should be the same you use) and everything is working fine. Have you already tried to remove the package and purge all the configurations file (with apt-get remove --purge)? Did you have some version of redshift compiled manually before using the repository package? Maybe some configuration files are in conflict. You may also ask in some Debian forum if other debian users have the same problem.
On 04/28/2014 01:55 PM, Simone Gaiarin wrote:
I've tried with ubuntu 14.04 and redshift plasmoid 0.6.1 (the one in the repository, that should be the same you use) and everything is working fine. Have you already tried to remove the package and purge all the configurations file (with apt-get remove --purge)? Did you have some version of redshift compiled manually before using the repository package? Maybe some configuration files are in conflict. You may also ask in some Debian forum if other debian users have the same problem.
Reply to this email directly or view it on GitHub https://github.com/simgunz/redshift-plasmoid/issues/11#issuecomment-41533890.
Yes. The version of redshift was different than what is currently in Debian. I had updated it in trying to root cause if it was redshift that was the problem. I have now reverted the redshift package to 1.7-2.
The redshift package in Debian has no configuration. And my redshift plasmoid configuration is below:
02:37:23 rrs@zan:/etc/dovecot$ cat ~/.kde/share/config/redshiftrc [Activities] alwaysOffActivities=d6ad31f1-cd24-48b6-ae73-66fd57fd713a alwaysOnActivities=538bb528-225c-4458-b787-42e57eee7875
[General] autolaunch=true latitude=12.9 longitude=77.5
How do you derive those UUIDs ? I may want to check if they are referring to the correct Activities.
For now, it is an okay state. I can live with the problem of settings not effective per activity until someone else root causes the problem.
Ritesh Raj Sarraf RESEARCHUT - http://www.researchut.com "Necessity is the mother of invention."
Don't ask me what has fixed my issue. I just deleted the old configuration file and now everything is working as expected. So I guess there never was a bug.
I always tell myself to test the behavior in an alternate clean user environment before concluding it to be a bug. :-( I should have done it in this case too. Sorry for the noise.
I'm glad you solved the problem. In any case redshift gets the activities IDs from the actvities plasma dataengine. You can browse the dataengines by running "plasmaengineexplorer". If you select the activities dataengine you'll find the activities IDs.
Hey!!! I think I have a clue now. Plasma shell is usually crashy. When plasma crashes, it respawns. Upon respawning, redshift ends up firing a second instance. This ends up making 2+ instances of redshift running. Thus, when you click a change, one instance acts, and the other instance overrides it.
I think, in redshiftautostart, you should do a check for the pid && uid to be a single instance.
Ok. But the problem of the second instance is not related to the activity settings not honored, right? It should only cause a misbehavior of redshift. I'll move this to a new issue.
That led to an impression that per activity settings are not honored. One instance of redshift applied the setting, but another one overrode it.
Even after I had closed the issue, I would at times (now that I know, whenever plasma crashed) run into this problem. Since I did not have clear steps to reproduce, I let it quiet.
Now that I'm confident that this is the cause, I re-opened it. I think controlling the number of redshift processes per user, in within redshiftautostart, should solve this problem.
This issue hit me back again. And this time, I do not see multiple redshift processes running. It was running fine, and then inbetween, some kde packages got updated. I believe that is when it again stopped working.
rrs@learner:~/.kde/share/config$ ps aux | grep -i redshift rrs 5723 0.0 0.0 92380 0 ? S Feb05 0:00 /usr/bin/redshiftautostart rrs 8820 0.0 0.0 65752 4968 ? S 00:19 0:00 /usr/bin/redshift -c /dev/null -l 22.5 88.4 -t 5500 3700 -g 1.00 1.00 1.00 -b 1.00 -m randr rrs 9100 0.0 0.0 12716 2080 pts/2 R+ 00:23 0:00 grep --color=auto -i redshift 00:23 ♒♒♒ ☺
As you can see, there's only one redshift process.
Here are some of the new observations I've made. I ran strace on the proc.
NULL) = 0 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\177\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\327\3\0\0\0\0_\0\300\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\200\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\331\3\0\0\0\0_\0\300\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\201\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\333\3\0\0\0\0*\0\300\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 nanosleep({5, 0},
You do a sleep for 5 seconds and then wake up again. What is this for ?
When you manually click of the redshift icon, you get a signal...
poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1I\3\0\0\0\0H\2\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\201\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1K\3\0\0\0\0H\2\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 nanosleep({5, 0}, NULL) = ? ERESTART_RESTARTBLOCK (Interrupted by signal) --- SIGUSR1 {si_signo=SIGUSR1, si_code=SI_USER, si_pid=5468, si_uid=1000} --- rt_sigreturn() = -1 EINTR (Interrupted system call) poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\177\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1M\3\0\0\0\0H\2\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
But, when I switch activities, no signal is emitted.
poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\177\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\335\3\0\0\0\0_\0\300\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\200\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\337\3\0\0\0\0_\0\300\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\201\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\341\3\0\0\0\0*\0\300\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 nanosleep({5, 0}, NULL) = 0 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\177\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}])
How do you act on an activity switch ? It is supposed to emit a signal ?
I do not do any sleep explicitly.
When you want to switch the state of redshift you should emit the SIGUSR1. This is emitted when the button is pressed. If you switch to an activity where redshift must be always off, the process is simply killed so that no signal is emitted. If in the new activity redshift must be active, no signal is emitted if redshift was active in the previous activity. If it wasn't active it is activated by emitting the signal.
On Thu Feb 12 2015 at 7:58:07 PM Ritesh Raj Sarraf [email protected] wrote:
This issue hit me back again. And this time, I do not see multiple redshift processes running. It was running fine, and then inbetween, some kde packages got updated. I believe that is when it again stopped working.
rrs@learner:~/.kde/share/config$ ps aux | grep -i redshift rrs 5723 0.0 0.0 92380 0 ? S Feb05 0:00 /usr/bin/redshiftautostart rrs 8820 0.0 0.0 65752 4968 ? S 00:19 0:00 /usr/bin/redshift -c /dev/null -l 22.5 88.4 -t 5500 3700 -g 1.00 1.00 1.00 -b 1.00 -m randr rrs 9100 0.0 0.0 12716 2080 pts/2 R+ 00:23 0:00 grep --color=auto -i redshift 00:23 ♒♒♒ ☺
As you can see, there's only one redshift process.
Here are some of the new observations I've made. I ran strace on the proc.
NULL) = 0 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\177\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\327\3\0\0\0\0
\0\300\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\200\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\331\3\0\0\0\0\0\300\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\201\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\333\3\0\0\0\0*\0\300\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 nanosleep({5, 0},
You do a sleep for 5 seconds and then wake up again. What is this for ?
When you manually click of the redshift icon, you get a signal...
poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1I\3\0\0\0\0H\2\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\201\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1K\3\0\0\0\0H\2\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 nanosleep({5, 0}, NULL) = ? ERESTART_RESTARTBLOCK (Interrupted by signal)
--- SIGUSR1 {si_signo=SIGUSR1, si_code=SI_USER, si_pid=5468, si_uid=1000}
rt_sigreturn() = -1 EINTR (Interrupted system call) poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\177\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1M\3\0\0\0\0H\2\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
But, when I switch activities, no signal is emitted.
poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\177\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\335\3\0\0\0\0
\0\300\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\200\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\337\3\0\0\0\0\0\300\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\201\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}]) recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\1\1\341\3\0\0\0\0*\0\300\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32 nanosleep({5, 0}, NULL) = 0 poll([{fd=3, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"\214\30\203\1\177\0\0\0\0\1\0\0\0\0\0\1\0\2\0\3\0\4\0\5\0\6\0\7\0\10\0\t"..., 1552}], 1) = 1552 poll([{fd=3, events=POLLIN}], 1, 4294967295) = 1 ([{fd=3, revents=POLLIN}])
How do you act on an activity switch ? It is supposed to emit a signal ?
— Reply to this email directly or view it on GitHub https://github.com/simgunz/redshift-plasmoid/issues/11#issuecomment-74129798 .