SUMMARY When I run 'sudo emacs' in KDE, the graphical interface freezes due to 100% CPU usage by plasmashell. I am forced to switch to a terminal (Ctrl+Alt+F2), then kill all Emacs processes before I can use the interface again. Using the terminal, I see that there is a plasmashell process running at 100% CPU. Killing Emacs restores things to normal. STEPS TO REPRODUCE 1. run 'sudo emacs' 2. KWin freezes with 100% CPU usage OBSERVED RESULT Unusable interface. EXPECTED RESULT Emacs should open normally. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Fedora 29 (available in About System) KDE Plasma Version: 5.14.5 KDE Frameworks Version: 5.55.0 Qt Version: 5.11.3 ADDITIONAL INFORMATION I have Fedora 29 on a different machine (both are Lenovo laptops) and 'sudo emacs' has been working for years. The main difference is the new machine has an Nvidia card with Optimus, so I had to install proprietary drivers otherwise I couldn't even boot into X. Emacs seems to be the only application which does this. 'sudo gparted', 'sudo libreoffice', etc, all work normally. Running Emacs without sudo works normally. After killing emacs via a terminal, when I switch back to the terminal running KWin, the following notification is visible: "KWin Window Manager" - desktop effects were restarted due to a graphics reset. I'm almost sure the bug is related to the Nvidia proprietary drivers, but I wonder if there is a way to disable something in KDE that would allow it to work again, or at least a way to better diagnose why running Emacs as sudo causes this behavior.
>I see that there is a plasmashell process running at 100% >KWin freezes with 100% CPU usage These are different processes. Please can you clarify.
Sorry, I meant "the entire graphical interface freezes", as in, I can move the mouse pointer but clicking anywhere or pressing the keyboard does nothing; nothing is refreshed other than the mouse pointer position. However, I tried causing it again, and this time I have not only plasmashell running at 100% CPU, but also "/usr/bin/kwin_x11 --crashes 1", also indicated at 100% CPU usage.
A few more tests, in case it might help: - Running "kdesu emacs" produces the same result as a simple "sudo emacs", except for the password prompt, before the interface freezes. - If I run "sudo emacs" on a Konsole, for instance, and do nothing other than a Ctrl+C (I can wait several seconds, and hear the CPU fan spinning), the Ctrl+C works. However, if I do something as simple as moving the mouse cursor around, then Ctrl+C no longer works, and I have to Ctrl+Alt+F2 and kill emacs from the terminal. - When I succesfully Ctrl+C Emacs, the following message appears in the terminal: ** (emacs:9664): CRITICAL **: 14:02:48.372: Failed to get connection to xfconfd: Error spawning command line “dbus-launch --autolaunch=13e6db43a6d747cd9b7b168d166b6703 --binary-syntax --close-stderr”: Child process killed by signal 2 This message never appears when I Ctrl+C a "normal" Emacs (without running with sudo).
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
I did report it in my comments, but I expected the status to update accordingly. I'm adding this comment just so that it allows me to change the status to REPORTED.
We don't have enough data to do anything with this.