[Bug 1800101] Re: gnome-shell uses 100% CPU
[Expired for gnome-shell (Ubuntu) because there has been no activity for 60 days.] ** Changed in: gnome-shell (Ubuntu) Status: Incomplete => Expired -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1800101 Title: gnome-shell uses 100% CPU To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1800101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1800101] Re: gnome-shell uses 100% CPU
Ansis, please log your own separate bugs for each different scenario that uses high CPU. When doing so note also that strace information is not useful, but thanks anyway. This bug is for René Schultz Madsen only, still awaiting feedback from comment #11. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1800101 Title: gnome-shell uses 100% CPU To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1800101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1800101] Re: gnome-shell uses 100% CPU
I am seeing high CPU utilization by gnome-shell process as well. Especially when using Chrome Web Browser and moving/resizing windows. Chrome usage goes up too. This issue happens consistently on 18.04. The system becomes barely responsible to user input. Based on strace output of gnome-shell process here is behavior that caught my attention: 1, gnome-shell invokes clock_gettime() and futex() system calls excessively. 2. gnome-shell on recvmsg() system call receives errors. sudo strace -c -f -p `pidof gnome-shell` strace: Process 2028 attached with 18 threads ^Cstrace: Process 2028 detached strace: Process 2141 detached ... strace: Process 2566 detached % time seconds usecs/call callserrors syscall -- --- --- - - 69.380.047219131236 3 futex 18.600.012661 3 4375 clock_gettime 5.180.003527 9 390 346 recvmsg 2.050.001398 10 137 poll 1.860.001263 4 315 getpid 1.250.000851 1269 writev 0.840.000570 962 write 0.520.000357 2 156 sched_yield 0.230.000156 437 read 0.060.38 38 1 restart_syscall 0.030.19 6 3 nanosleep -- --- --- - - 100.000.068059 5581 349 total It seems that high CPU usage originates from NVidia's shared library (binary distributed with libnvidia-gl-390:amd64 debian package). The gnome-shell process loads this library. # sudo strace -k -o /tmp/aaa -f -p `pidof gnome-shell` Here is proof that those calls to clock_gettime() system function originate from NVidia library: 2028 clock_gettime(CLOCK_MONOTONIC, {tv_sec=14361, tv_nsec=821854879}) = 0 > /lib/x86_64-linux-gnu/libc-2.27.so(syscall+0x19) [0x11b839] > /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.390.77(vk_icdGetInstanceProcAddr+0x5865) > [0xab445] 2028 clock_gettime(CLOCK_MONOTONIC, {tv_sec=14361, tv_nsec=824319178}) = 0 > /lib/x86_64-linux-gnu/libc-2.27.so(syscall+0x19) [0x11b839] > /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.390.77(vk_icdGetInstanceProcAddr+0x5865) > [0xab445] 2028 clock_gettime(CLOCK_MONOTONIC, {tv_sec=14361, tv_nsec=826767633}) = 0 > /lib/x86_64-linux-gnu/libc-2.27.so(syscall+0x19) [0x11b839] > /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.390.77(vk_icdGetInstanceProcAddr+0x5865) > [0xab445] 2028 clock_gettime(CLOCK_MONOTONIC, {tv_sec=14361, tv_nsec=829303953}) = 0 > /lib/x86_64-linux-gnu/libc-2.27.so(syscall+0x19) [0x11b839] > /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.390.77(vk_icdGetInstanceProcAddr+0x5865) > [0xab445] 2028 clock_gettime(CLOCK_MONOTONIC, {tv_sec=14361, tv_nsec=831753193}) = 0 > /lib/x86_64-linux-gnu/libc-2.27.so(syscall+0x19) [0x11b839] > /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.390.77(vk_icdGetInstanceProcAddr+0x5865) > [0xab445] 2028 clock_gettime(CLOCK_MONOTONIC, {tv_sec=14361, tv_nsec=834216603}) = 0 > /lib/x86_64-linux-gnu/libc-2.27.so(syscall+0x19) [0x11b839] > /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.390.77(vk_icdGetInstanceProcAddr+0x5865) > [0xab445] 2028 clock_gettime(CLOCK_MONOTONIC, {tv_sec=14361, tv_nsec=836654560}) = 0 > /lib/x86_64-linux-gnu/libc-2.27.so(syscall+0x19) [0x11b839] > /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.390.77(vk_icdGetInstanceProcAddr+0x5865) > [0xab445] 2028 clock_gettime(CLOCK_MONOTONIC, {tv_sec=14361, tv_nsec=839135214}) = 0 > /lib/x86_64-linux-gnu/libc-2.27.so(syscall+0x19) [0x11b839] > /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.390.77(vk_icdGetInstanceProcAddr+0x5865) > [0xab445] 2028 clock_gettime(CLOCK_MONOTONIC, {tv_sec=14361, tv_nsec=841593660}) = 0 > /lib/x86_64-linux-gnu/libc-2.27.so(syscall+0x19) [0x11b839] > /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.390.77(vk_icdGetInstanceProcAddr+0x5865) > [0xab445] 2028 clock_gettime(CLOCK_MONOTONIC, {tv_sec=14361, tv_nsec=844017483}) = 0 > /lib/x86_64-linux-gnu/libc-2.27.so(syscall+0x19) [0x11b839] As for recvmsg() - while it is not necessarily a bug, it is questionable that a user space code after just doing recvmsg() and receiving EAGAIN error on non-blocking Unix Domain Socket needs to again call recvmsg() without going though poll() system call. Here is snippet that I repeatedly see in the strace output: 2028 [7f7e93d77567] recvmsg(537095]>, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable) > /lib/x86_64-linux-gnu/libpthread-2.27.so(recvmsg+0x47) [0x12567] > /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0(xcb_wait_for_special_event+0x4a8) > [0xd888] > /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0(xcb_poll_for_reply64+0x178) > [0xe358] > /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0(_XFreeX11XCBStructure+0x849) > [0x3dd79] > /usr/lib/x86_64-li
[Bug 1800101] Re: gnome-shell uses 100% CPU
René, You need to have logged in from another machine (via ssh) and run gdb from there. That way gdb won't hang when you stop the shell with Ctrl+C. Please also remember to try uninstalling the nvidia driver (briefly) so as to compare with nouveau. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1800101 Title: gnome-shell uses 100% CPU To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1800101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1800101] Re: gnome-shell uses 100% CPU
Daniel, Now I have experienced the 100% CPU to more times and both times I tried to follow the guide here https://wiki.ubuntu.com/Backtrace#Already_running_programs but it's not possible to go to do "If the program hangs but doesn't crash you can press ctrl+c in gdb while the program is frozen and then continue with the next step." Then gdb hangs :-P so no luck there. See attatched gdb log file. Any suggestions what to do next? The thing I have noticed now with the 100% CPU usage is that it's always after restarting a VM several times in VirtualBox. ** Attachment added: "gdb-gnome-shell.txt" https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1800101/+attachment/5223458/+files/gdb-gnome-shell.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1800101 Title: gnome-shell uses 100% CPU To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1800101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1800101] Re: gnome-shell uses 100% CPU
Marko, Please log your own separate bug. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1800101 Title: gnome-shell uses 100% CPU To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1800101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1800101] Re: gnome-shell uses 100% CPU
I had high CPU and unresponsive gnome desktop on older Ubuntu virtual machine that was upgraded to 18.04 LTS from earlier past LTS versions on VirtualBox 5.2.18 or earlier running on Windows 10. The high gnome-shell CPU and unresponsiveness was randomly triggeded eg. by resizing application windows. I was able to switch to text virtual terminal using Ctrl-Alt-Fn and the gnome-shell CPU load decreased while in text mode. It has not occurred since I changed using gnome-tweaks the application appearance to Adwaita. I recently installed a new 18.04 LTS that also became unresponsive at similar application or VirtualBox window resize. I am not 100% sure if this is same problem as I have VirtualBox 5.2.22 now and I was unable to change to text virtual terminal after VirtualBox window resize. This hang happened at least on VirtualBox windows resize. The virtual machine was able to shutdown through ACPI. I changed to Adwaita from Ambience and now I have been able to change window sizes without hang. Due to randomness, hard to say this problem is completely gone by theme change. gnome-tweaks shows no extensions enabled. Now at gnome-shell 3.28.2-0ubuntu0.18.04.1. VirtualBox has 3D acceleration enabled, no 2D acceleration. I have an old AMD Radeon HD 6450 with a bit old drivers from 2015, I noticed. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1800101 Title: gnome-shell uses 100% CPU To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1800101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1800101] Re: gnome-shell uses 100% CPU
Because the Nvidia driver has known performance issues that the nouveau driver doesn't have. Sounds surprising, I know... -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1800101 Title: gnome-shell uses 100% CPU To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1800101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1800101] Re: gnome-shell uses 100% CPU
The problem is not there on a regular basis and I have only seen it 3 times since the installation of this computer. I don't know how to reproduce the problem and I can't live with the pure performance of 'nouveau' on this production computer. Why do you suspect the nvidia driver to be the problem? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1800101 Title: gnome-shell uses 100% CPU To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1800101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1800101] Re: gnome-shell uses 100% CPU
Can you please try uninstalling the Nvidia driver (for a moment), reboot, and if the default 'nouveau' driver works for you then please let us know if that also avoids the 100% CPU problem? I am wondering if the problem is unique to the Nvidia driver. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1800101 Title: gnome-shell uses 100% CPU To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1800101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1800101] Re: gnome-shell uses 100% CPU
It does not end by it self, tried to let it run for 48 hours, but still at 100%. I have to restart to get it to normal. I'll do that next time it hugs the CPU. Normally it does so after 5-10 days of continuers running. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1800101 Title: gnome-shell uses 100% CPU To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1800101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1800101] Re: gnome-shell uses 100% CPU
Does the problem eventually end? How long has it stayed at 100% CPU? If the problem persists then please log into a VT (Ctrl+Alt+F4) and collect a backtrace (or backtraces) of the offending Xorg process using these steps: https://wiki.ubuntu.com/Backtrace#Already_running_programs -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1800101 Title: gnome-shell uses 100% CPU To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1800101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1800101] Re: gnome-shell uses 100% CPU
Does the problem eventually end? How long has it stayed at 100% CPU? If the problem persists then please log into a VT (Ctrl+Alt+F4) and collect a backtrace (or backtraces) of the offending gnome-shell process using these steps: https://wiki.ubuntu.com/Backtrace#Already_running_programs ** Changed in: gnome-shell (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1800101 Title: gnome-shell uses 100% CPU To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1800101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1800101] Re: gnome-shell uses 100% CPU
** Tags added: nvidia performance -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1800101 Title: gnome-shell uses 100% CPU To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1800101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs