Bug 7608 - PolicyKit1-KDE" appears suddenly requires root access
: PolicyKit1-KDE" appears suddenly requires root access
Status: RESOLVED FIXED
Product: Desktop Bugs
Classification: ROSA Desktop
Component: Localization
: Fresh
: All Linux
: Normal normal
: ---
Assigned To: JDronova
: ROSA Linux Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-21 02:28 MSK by daz
Modified: 2016-12-21 23:29 MSK (History)
4 users (show)

See Also:
RPM Package:
ISO-related:
Bad POT generating:
Upstream:


Attachments
PolicyKit1-KDE image that requires root access (16.64 KB, image/jpeg)
2016-12-21 02:28 MSK, daz
Details
System Activity Processes (5.31 MB, video/mp4)
2016-12-21 11:41 MSK, daz
Details
edit /etc/sysctl.d has no files in there (1.82 MB, video/mp4)
2016-12-21 13:37 MSK, daz
Details
konsole scan file not found (145.28 KB, image/png)
2016-12-21 13:44 MSK, daz
Details
New Log IDS (36.28 KB, image/png)
2016-12-21 14:21 MSK, daz
Details
limit is 65536 however issue still present (100.39 KB, image/png)
2016-12-21 20:28 MSK, daz
Details
Bug at login still (37.19 KB, image/png)
2016-12-21 21:58 MSK, daz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description daz 2016-12-21 02:28:37 MSK
Created attachment 4570 [details]
PolicyKit1-KDE image that requires root access

Description of problem:
PolicyKit1-KDE" appears suddenly.
polkit.subject-pid 27674
polkit.caller-pid 29742

 https://linux-hardware.org/index.php?probe=6ef89f2dba

Version-Release number of selected component (if applicable):
8

How reproducible:
Random 

Steps to Reproduce:
1.
2.
3.
Comment 1 daz 2016-12-21 10:03:20 MSK
Correction:

How reproducible:
I do not know how to reproduce. I cannot identify any program startup that triggers this error message. 

Steps to Reproduce:
1.n/a
2.n/a
3.n/a
Comment 2 daz 2016-12-21 10:09:28 MSK
(In reply to comment #1)
> Correction:
> 
> How reproducible:
> I do not know how to reproduce. I cannot identify any program startup that
> triggers this error message. 
> 
> Steps to Reproduce:
> 1.n/a
> 2.n/a
> 3.n/a

I found this Bug Bug 4791 . However I was unclear what the final solution that was put in place ???
Comment 3 daz 2016-12-21 10:10:22 MSK
Refer to http://bugs.rosalinux.ru/show_bug.cgi?id=4791
Comment 4 daz 2016-12-21 11:41:44 MSK
Created attachment 4571 [details]
System Activity Processes

I logged off system logged back on . Run program Opera Beta Browser https://www.opera.com/computer/beta and got the Policy-Kit message again. There seems to be no way to tell where or why this is happening from what I can see. I get this message several times a day when I have made no system changes. 
Please help resolve
Comment 5 Eugene Shatokhin 2016-12-21 12:48:17 MSK
Yes, we saw such things before. This is actually not a problem in the kernel per-se and can be dealt with in user space.

There is a limit on how many files/directories can be watched for changes at the same time. The applications like Baloo and other file searchers and indexers like to monitor the file system for changes.

If the limit is hit, that PolicyKit1-KDE window appears and asks the permission to increase it, although it is *really* far from obvious, I admit.

What I did in the kernel back then (bug 4791) was to increase the default limit from 8192 to 32768. A quick and dirty workaround that was OK at that point.

A better solution would be to do it in user space.

Could you please try the following: edit /etc/sysctl.d/97-kde-baloo-filewatch-inotify.conf and replace the number there (32768 by default) with a higher one, say 65536. Then reboot the system.

Let us see if that helps.
Comment 6 daz 2016-12-21 13:37:23 MSK
Created attachment 4573 [details]
edit /etc/sysctl.d has no files in there

Could you please try the following: edit /etc/sysctl.d/97-kde-baloo-filewatch-inotify.conf and replace the number there (32768 by default) with a higher one, say 65536. Then reboot the system.

Please see attached video. Am I missing something ??
Comment 7 daz 2016-12-21 13:44:15 MSK
Created attachment 4574 [details]
konsole scan file not found

sysctl.d/97-kde-baloo-filewatch-inotify.conf

See Konsole scan results
Comment 8 daz 2016-12-21 14:18:02 MSK
Just on a side note. All the ROSA forum groups I see are all in Russian. I am from Australia and don't know Russian. No one I know uses ROSA. My question is simple where do I submit a request for a software package. I am not sure how submissions work but If this can be sent to submissions team http://kodi.wiki/view/HOW-TO:Install_Kodi_for_Linux that would be great. As i dont know how to install on ROSA

Thanks

Back on topic now
Comment 9 daz 2016-12-21 14:21:36 MSK
Created attachment 4575 [details]
New Log IDS

Ok,

So Ive worked out that this message will come up every time I log out and log back in
Comment 10 Eugene Shatokhin 2016-12-21 15:13:08 MSK
(In reply to comment #7)
Ah, so it is missing. It might be an issue in balloo package.

You can create it manually then. Just create /etc/sysctl.d/97-kde-baloo-filewatch-inotify.conf with the following contents:
fs.inotify.max_user_watches = 65536


As for the package or update requests, the recommended way is to open a bug here with "[PACKAGE REQUEST]" in the subject to make it easier to find.

We do have the forums for English-speaking users (http://forum.rosalab.ru/viewforum.php?f=21&sid=90163f108cd495c13455e68ccf8fd651) but you are right, most of the activity currently happens in our Russian and Polish forums. It is better to submit the package requests to the Bugzilla anyway.
Comment 11 daz 2016-12-21 15:34:24 MSK
(In reply to comment #10)
> (In reply to comment #7)
> Ah, so it is missing. It might be an issue in balloo package.
> 
> You can create it manually then. Just create
> /etc/sysctl.d/97-kde-baloo-filewatch-inotify.conf with the following
> contents:
> fs.inotify.max_user_watches = 65536
> 
> 
> As for the package or update requests, the recommended way is to open a bug
> here with "[PACKAGE REQUEST]" in the subject to make it easier to find.
> 
> We do have the forums for English-speaking users
> (http://forum.rosalab.ru/viewforum.
> php?f=21&sid=90163f108cd495c13455e68ccf8fd651) but you are right, most of
> the activity currently happens in our Russian and Polish forums. It is
> better to submit the package requests to the Bugzilla anyway.

Hi ,

Can you please explain how I " Just create /etc/sysctl.d/97-kde-baloo-filewatch-inotify.conf with the following contents:
fs.inotify.max_user_watches = 65536 " ?
Comment 12 Eugene Shatokhin 2016-12-21 15:44:15 MSK
(In reply to comment #11)
> Can you please explain how I " Just create
> /etc/sysctl.d/97-kde-baloo-filewatch-inotify.conf with the following
> contents:
> fs.inotify.max_user_watches = 65536 " ?

Create a file 97-kde-baloo-filewatch-inotify.conf somewhere, write "fs.inotify.max_user_watches = 65536" (without quotes) in that file. Then, as root, move it to /etc/sysctl.d/
  sudo mv 97-kde-baloo-filewatch-inotify.conf /etc/sysctl.d/

After the file is in place, it is needed to reboot the system.

BTW, you can check what the actual limit is after reboot with
  cat /proc/sys/fs/inotify/max_user_watches
Comment 13 daz 2016-12-21 17:00:29 MSK
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #7)
> > Ah, so it is missing. It might be an issue in balloo package.
> > 
> > You can create it manually then. Just create
> > /etc/sysctl.d/97-kde-baloo-filewatch-inotify.conf with the following
> > contents:
> > fs.inotify.max_user_watches = 65536
> > 
> > 
> > As for the package or update requests, the recommended way is to open a bug
> > here with "[PACKAGE REQUEST]" in the subject to make it easier to find.
> > 
> > We do have the forums for English-speaking users
> > (http://forum.rosalab.ru/viewforum.
> > php?f=21&sid=90163f108cd495c13455e68ccf8fd651) but you are right, most of
> > the activity currently happens in our Russian and Polish forums. It is
> > better to submit the package requests to the Bugzilla anyway.
> 
> Hi ,
> 
> Can you please explain how I " Just create
> /etc/sysctl.d/97-kde-baloo-filewatch-inotify.conf with the following
> contents:
> fs.inotify.max_user_watches = 65536 " ?

Hey. I have one problem joining that support forum. I don't understand the CONFIRMATION OF REGISTRATION question Are you really ROSA User? Please, enter result of «cat /etc/rosa-release | head -c4 | sha1sum | head -c4»:
This question is a means of preventing automated form submissions by spambots ???????
Comment 14 daz 2016-12-21 17:08:07 MSK
Ill also join this one, however not sure if many will speak English I dont see any English posts and translation for these such things prob not the best
Comment 15 daz 2016-12-21 17:08:31 MSK
(In reply to comment #14)
> Ill also join this one, however not sure if many will speak English I dont
> see any English posts and translation for these such things prob not the best

http://forum.rosalab.ru/en/
Comment 16 Eugene Shatokhin 2016-12-21 17:14:23 MSK
(In reply to comment #13)
> Hey. I have one problem joining that support forum. I don't understand the
> CONFIRMATION OF REGISTRATION question Are you really ROSA User? Please,
> enter result of «cat /etc/rosa-release | head -c4 | sha1sum | head -c4»:
> This question is a means of preventing automated form submissions by
> spambots ???????
Yep ;-)

> Ill also join this one, however not sure if many will speak English I dont
> see any English posts and translation for these such things prob not the best
I suppose, it is OK to write in English there too. Most of our key developers and maintainers can speak English, so they will understand you.
Comment 17 daz 2016-12-21 17:30:33 MSK
(In reply to comment #16)
> (In reply to comment #13)
> > Hey. I have one problem joining that support forum. I don't understand the
> > CONFIRMATION OF REGISTRATION question Are you really ROSA User? Please,
> > enter result of «cat /etc/rosa-release | head -c4 | sha1sum | head -c4»:
> > This question is a means of preventing automated form submissions by
> > spambots ???????
> Yep ;-)
> 
> > Ill also join this one, however not sure if many will speak English I dont
> > see any English posts and translation for these such things prob not the best
> I suppose, it is OK to write in English there too. Most of our key
> developers and maintainers can speak English, so they will understand you.

Lol nice answer Egene. How do I find out the result of «cat /etc/rosa-release | head -c4 | sha1sum | head -c4»: Give me a break Eugene I am still trying to work out your previous answers. Is the result of cat /etc/rosa-release | head -c4 | sha1sum | head -c4»: found running a command in terminal or what ?? Ahhhhh
Comment 18 daz 2016-12-21 17:34:14 MSK
Do I just run cat /etc/rosa-release | head -c4 | sha1sum | head -c4 in Konsole and I get provided with a 4 digit number?
Comment 19 daz 2016-12-21 17:35:30 MSK
I worked it out !!!!!! :)
Comment 20 daz 2016-12-21 17:49:40 MSK
Hi Eugene I tried to work this out but my skills are limited. 

Eugene: Create a file 97-kde-baloo-filewatch-inotify.conf somewhere, write "fs.inotify.max_user_watches = 65536" (without quotes) in that file. Then, as root, move it to /etc/sysctl.d/
  sudo mv 97-kde-baloo-filewatch-inotify.conf /etc/sysctl.d/

Daz: How do I create the above ?

Eugene: You can create it manually then. Just create
> /etc/sysctl.d/97-kde-baloo-filewatch-inotify.conf with the following
> contents:
> fs.inotify.max_user_watches = 65536

Daz: How do I create /etc/sysctl.d/97-kde-baloo-filewatch-inotify.conf with the following
> contents:
> fs.inotify.max_user_watches = 65536

Eugene: Create a file 97-kde-baloo-filewatch-inotify.conf somewhere, write "fs.inotify.max_user_watches = 65536" (without quotes) in that file. Then, as root, move it to /etc/sysctl.d/
  sudo mv 97-kde-baloo-filewatch-inotify.conf /etc/sysctl.d/

Daz: 1. How to create a file  97-
Kde-baloo-filewatch-inotify.conf
2. You state create this file somewhere ? 
3. Then as root move it to /etc/sysctl.d/
4. Can I assume that this Konsole command sudo mv 97-kde-baloo-filewatch-inotify.conf /etc/sysctl.d/ moves  file 97-kde-baloo-filewatch-inotify.conf into /etc/sysctl.d/
5. System reboot , problem maybe solved ?

Thanks
Comment 21 daz 2016-12-21 19:21:52 MSK
Hi Eugene,

Could you please just clarify the points in my last post so I can put this issue to rest. Just some simple instructions and hopefully this case can be closed. 

Thanks
Comment 22 Eugene Shatokhin 2016-12-21 19:53:06 MSK
(In reply to comment #20)
> Daz: 1. How to create a file  97-
> Kde-baloo-filewatch-inotify.conf
> 2. You state create this file somewhere ? 

Yes, open a text editor, say, kwrite, create a new file, write "fs.inotify.max_user_watches = 65536" there, save as 97-kde-baloo-filewatch-inotify.conf in a directory of your choice.

> 3. Then as root move it to /etc/sysctl.d/
> 4. Can I assume that this Konsole command sudo mv
> 97-kde-baloo-filewatch-inotify.conf /etc/sysctl.d/ moves  file
> 97-kde-baloo-filewatch-inotify.conf into /etc/sysctl.d/

Yes, exactly.

> 5. System reboot , problem maybe solved ?

Perhaps.

After reboot, please open the console again and run the following command:
  cat /proc/sys/fs/inotify/max_user_watches

This is just to check the current limit on watched files and directories. If it is not 65536, then we might be missing something.

If that limit is also not enough, it can be increased later, we'll see.
Comment 23 daz 2016-12-21 20:28:58 MSK
Created attachment 4576 [details]
limit is 65536 however issue still present

Hi,

As you will see just good timing just as I run the command to show 65536 the policy box popped up again ????
Comment 24 daz 2016-12-21 21:53:42 MSK
(In reply to comment #23)
> Created attachment 4576 [details]
> limit is 65536 however issue still present
> 
> Hi,
> 
> As you will see just good timing just as I run the command to show 65536 the
> policy box popped up again ????

How will we know what limit above 65536 is needed. I seen on a past issue from someone you ended up having to do a kernel patch . I have to do some video screen recordings as part of my work. It crucial I cant keep having this policy request box popping up on my screen at random ... Please advise as soon as possible
Comment 25 Eugene Shatokhin 2016-12-21 21:57:46 MSK
(In reply to comment #23)
> Created attachment 4576 [details]
> limit is 65536 however issue still present
> 
> Hi,
> 
> As you will see just good timing just as I run the command to show 65536 the
> policy box popped up again ????

Might be a coincidence.

You can try to increase this limit in /etc/sysctl.d/97-kde-baloo-filewatch-inotify.conf and then reboot again.

Or, if you do not use KDE's file searching/indexing capabilities, you can disable them. Launch "System Settings", look for the item related to search / find / smth like that, I do not remember its name exactly. Launch that item, see if the indexing is enabled (a checkbox is checked). Uncheck it.

If it does not help, take a look at https://community.kde.org/Baloo/Configuration. There are instructions there how to disable Baloo. The file ~/.kde4/share/apps/config/baloofilerc might be absent in your system - you can create it.
Comment 26 daz 2016-12-21 21:58:41 MSK
Created attachment 4577 [details]
Bug at login still

Please see new polkit-pids
Comment 27 Eugene Shatokhin 2016-12-21 21:59:35 MSK
And please leave the importance of this bug as normal. This is not a security hole, neither it is a crash. 

This is just a non-obvious, confusing but harmless thing in the system.
Comment 28 daz 2016-12-21 22:15:18 MSK
(In reply to comment #27)
> And please leave the importance of this bug as normal. This is not a
> security hole, neither it is a crash. 
> 
> This is just a non-obvious, confusing but harmless thing in the system.

Not a problem re: as normal noted for next time. Update: I think this issue has now been resolved. I increased size and run sudo echo 'fs.inotify.max_user_watches = 131072' > /etc/sysctl.d/97-inotify.conf

Reboot:

Now I can not replicate the issue by logging off and on again which created the policy pop-up to appear each time. This is no longer happening. 

Thanks for the support. I hope this has fixed it !!!!!!!
Comment 29 Eugene Shatokhin 2016-12-21 23:29:48 MSK
Good. Closing.