Announcement

Collapse
No announcement yet.

Screen locks up and graphics refresh extremely slowly

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Screen locks up and graphics refresh extremely slowly

    Hi, I've noticed recently (probably in the upgrade from Kubuntu 12.10 to Kubuntu 13.04), that the screen occasionally glitches out, perhaps once every few days. The screen freezes for a few seconds, and then resumes. When it resumes, it refreshes extremely slowly. For example, alt-tabbing through Firefox windows looks terrible. Each new window takes a half seconds to appear, and I can see the screen drawing the window from the top down. It looks like it is drawing every alternate line first, flowing from the top, then every remaining line next. If I'm playing a game, I get about 1–2 frames per second. I'm not sure if it's graphics driver related, because I'm using a (dual) optimus Nvidia card with bumblebee. I see this problem in games (i.e. on the Nvidia card) or in Firefox (i.e. on the integrated Intel chip, even when the Nvidia is inactive).

    I've tried replacing plasma with `kbuildsycoca4 ; kquitapp plasma-desktop ; sleep 2 ; kstart plasma-desktop`, but this does not fix it. The only real fix is restarting or logging out and back in. If I remain logged in (with it broken) then log into another account simultaneously, the graphics are fine.

    Temporarily disabling compositing does make the graphics more responsive. It's certainly usable, but feels slightly less responsive to what I'm used to. However, I think this does not solve it. I tried watching a full-HD 50-FPS video in VLC, and it failed. Audio played fine, but the video was stuck on the first frame. I tried with both OpenGL and XRender, with compositing turned both on and off (i.e. four permutations). (Again, XRender was responsive enough for low-performance usage, but not good enough to play high-quality videos.)

    In /var/log/kern.log, I found:
    Code:
    May 25 13:32:29 sparhawk-XPS-17 kernel: [13549.869879] [drm:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
    May 25 13:32:29 sparhawk-XPS-17 kernel: [13549.869885] [drm] capturing error event; look for more information in /debug/dri/0/i915_error_state
    There was nothing at /debug/dri/0/i915_error_state, but there was a file at /sys/kernel/debug/dri/0/i915_error_state . I've somehow lost it, but I'll upload it next time I see the error.

    I'm using a Dell XPS 17 L702X. The CPU is Sandy Bridge (Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz).
    Code:
    $ lspci -k|grep -i -A2 vga
    00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
    	Subsystem: Dell Device 0571
    	Kernel driver in use: i915
    --
    01:00.0 VGA compatible controller: NVIDIA Corporation GF116M [GeForce GT 555M/635M] (rev ff)
    03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6230 [Rainbow Peak] (rev 34)
    	Subsystem: Intel Corporation Centrino Advanced-N 6230 AGN
    (FWIW, I was recommended to post in this forum after initially asking at forum.kde.org.)

    #2
    Originally posted by sparhawk View Post
    Hi, I've noticed recently (probably in the upgrade from Kubuntu 12.10 to Kubuntu 13.04), that the screen occasionally glitches out, perhaps once every few days. The screen freezes for a few seconds, and then resumes. When it resumes, it refreshes extremely slowly. For example, alt-tabbing through Firefox windows looks terrible. Each new window takes a half seconds to appear, and I can see the screen drawing the window from the top down. It looks like it is drawing every alternate line first, flowing from the top, then every remaining line next. If I'm playing a game, I get about 1–2 frames per second. I'm not sure if it's graphics driver related, because I'm using a (dual) optimus Nvidia card with bumblebee. I see this problem in games (i.e. on the Nvidia card) or in Firefox (i.e. on the integrated Intel chip, even when the Nvidia is inactive).

    I've tried replacing plasma with `kbuildsycoca4 ; kquitapp plasma-desktop ; sleep 2 ; kstart plasma-desktop`, but this does not fix it. The only real fix is restarting or logging out and back in. If I remain logged in (with it broken) then log into another account simultaneously, the graphics are fine.

    Temporarily disabling compositing does make the graphics more responsive. It's certainly usable, but feels slightly less responsive to what I'm used to. However, I think this does not solve it. I tried watching a full-HD 50-FPS video in VLC, and it failed. Audio played fine, but the video was stuck on the first frame. I tried with both OpenGL and XRender, with compositing turned both on and off (i.e. four permutations). (Again, XRender was responsive enough for low-performance usage, but not good enough to play high-quality videos.)

    In /var/log/kern.log, I found:
    Code:
    May 25 13:32:29 sparhawk-XPS-17 kernel: [13549.869879] [drm:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
    May 25 13:32:29 sparhawk-XPS-17 kernel: [13549.869885] [drm] capturing error event; look for more information in /debug/dri/0/i915_error_state
    There was nothing at /debug/dri/0/i915_error_state, but there was a file at /sys/kernel/debug/dri/0/i915_error_state . I've somehow lost it, but I'll upload it next time I see the error.

    I'm using a Dell XPS 17 L702X. The CPU is Sandy Bridge (Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz).
    Code:
    $ lspci -k|grep -i -A2 vga
    00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
    	Subsystem: Dell Device 0571
    	Kernel driver in use: i915
    --
    01:00.0 VGA compatible controller: NVIDIA Corporation GF116M [GeForce GT 555M/635M] (rev ff)
    03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6230 [Rainbow Peak] (rev 34)
    	Subsystem: Intel Corporation Centrino Advanced-N 6230 AGN
    (FWIW, I was recommended to post in this forum after initially asking at forum.kde.org.)
    Ah you have an L702X as well. Anyways, the issue you are having can be related to a few things that come to mind. Start by reinstalling mesa. Sometimes a bumblebee install can mess with a mesa component (its unlikely but it has happened to me before). So start with that. Then:

    Settings > Desktop Effects > Advanced > Composting type > OpenGL
    > Qt graphics system > Native
    Also enable vsync.

    You aren't using any kernel parameters other than standard ones?

    It can't hurt to run the following:
    Code:
    sudo apt-get update && sudo apt-get dist-upgrade
    sudo apt-get install -f
    sudo apt-get install kubuntu-dekstop firefox
    Are you doing anything to manually control the fan speed? Those random hangs can in rare cases be related to a temp issue. The L702X is terribly noisy generally so people try to manually control fan speeds on it - not a good idea. The bios update to A17 helped a lot, as does bumblebee.

    Comment


      #3
      Thank you very much for the advice. Plenty of things to try there!

      Originally posted by dmeyer View Post
      Start by reinstalling mesa.
      Which exact package do you mean? I don't see anything called "mesa" exactly.

      Originally posted by dmeyer View Post
      Settings > Desktop Effects > Advanced > Composting type > OpenGL > Qt graphics system > Native
      Also enable vsync.
      I pretty much had this already, except Raster instead of Native. Do you think there is an advantage to Native? I did change it over anyway, since I don't notice any difference otherwise.

      Originally posted by dmeyer View Post
      You aren't using any kernel parameters other than standard ones?
      Do you mean in grub? GRUB_CMDLINE_LINUX_DEFAULT is totally blank. (I used to use `acpi_backlight=vendor` but this also broke in the update to 13.04, which I have reported here.)

      Originally posted by dmeyer View Post
      It can't hurt to run the following:
      Code:
      sudo apt-get update && sudo apt-get dist-upgrade
      sudo apt-get install -f
      sudo apt-get install kubuntu-dekstop firefox
      I did the first two lines, although they did nothing for me, since I was up to date. I've already got kubuntu-desktop and firefox installed… I'm not sure what the rationale behind that was?
      Code:
      $ dpkg -l kubuntu-desktop
      Desired=Unknown/Install/Remove/Purge/Hold
      | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
      |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
      ||/ Name                                           Version                      Architecture                 Description
      +++-==============================================-============================-============================-==================================================================================================
      ii  kubuntu-desktop                                1.276                        amd64                        Kubuntu Plasma Desktop/Netbook system
      $ dpkg -l firefox
      Desired=Unknown/Install/Remove/Purge/Hold
      | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
      |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
      ||/ Name                                           Version                      Architecture                 Description
      +++-==============================================-============================-============================-==================================================================================================
      ii  firefox                                        21.0+build2-0ubuntu0.13.04.2 amd64                        Safe and easy web browser from Mozilla
      Originally posted by dmeyer View Post
      Are you doing anything to manually control the fan speed? Those random hangs can in rare cases be related to a temp issue. The L702X is terribly noisy generally so people try to manually control fan speeds on it - not a good idea. The bios update to A17 helped a lot, as does bumblebee.
      No, I thought about it once, but rejected it, similarly to your feelings on the matter.

      Thanks again.

      Comment


        #4
        Originally posted by sparhawk View Post
        Thank you very much for the advice. Plenty of things to try there!


        Which exact package do you mean? I don't see anything called "mesa" exactly.


        I pretty much had this already, except Raster instead of Native. Do you think there is an advantage to Native? I did change it over anyway, since I don't notice any difference otherwise.


        Do you mean in grub? GRUB_CMDLINE_LINUX_DEFAULT is totally blank. (I used to use `acpi_backlight=vendor` but this also broke in the update to 13.04, which I have reported here.)


        I did the first two lines, although they did nothing for me, since I was up to date. I've already got kubuntu-desktop and firefox installed… I'm not sure what the rationale behind that was?
        Code:
        $ dpkg -l kubuntu-desktop
        Desired=Unknown/Install/Remove/Purge/Hold
        | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
        |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
        ||/ Name                                           Version                      Architecture                 Description
        +++-==============================================-============================-============================-==================================================================================================
        ii  kubuntu-desktop                                1.276                        amd64                        Kubuntu Plasma Desktop/Netbook system
        $ dpkg -l firefox
        Desired=Unknown/Install/Remove/Purge/Hold
        | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
        |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
        ||/ Name                                           Version                      Architecture                 Description
        +++-==============================================-============================-============================-==================================================================================================
        ii  firefox                                        21.0+build2-0ubuntu0.13.04.2 amd64                        Safe and easy web browser from Mozilla

        No, I thought about it once, but rejected it, similarly to your feelings on the matter.

        Thanks again.
        Changing it to native means you are using the graphics card (harware accelerated) to render the screen instead of the cpu (software accelerated). GPU hardware accelerations allows for more effects, saves battery and tends to be a lot smother. There was a time, like Kubuntu 11.04 when I had to use render to have a stable system.

        Code:
        sudo apt-get install -f
        That fixes missing dependencies. Its safe to tun and can work wonders sometimes.
        Code:
        sudo apt-get install kubuntu-dekstop firefox
        The next set of commands just reinstalls those package just in case something went wrong with their install. Its almost always redundant but again, its safe and worth a try.

        Anyways, since you aren't running any fan control software then I'm going to start blaming the kernel. By the way, if you really want to boost battery life by nearly 30% you should add these kernel options but only once we've solved your issue.
        Code:
        i915.i915_enable_rc6=7 i915.i915_enable_fbc=1 i915.lvds_downclock=1 drm.vblankoffdelay=1
        Now back to your issue. Use the system, wait till the issue occurs and the run dmesg from the konsole and give us the output. It might enlighten us a bit. A little bit of googling on my part has shown this to have come up on multiple kernels, and distros over the least year or so. I've even seen a a thread or two about Firefox and XUL in particular. The issues almost almost always seemed to magically fix themselves which makes helping you tricky.

        Comment


          #5
          Originally posted by dmeyer View Post
          Code:
          sudo apt-get install -f
          That fixes missing dependencies. Its safe to tun and can work wonders sometimes.
          Code:
          sudo apt-get install kubuntu-dekstop firefox
          The next set of commands just reinstalls those package just in case something went wrong with their install. Its almost always redundant but again, its safe and worth a try.
          Sorry, I think I was unclear. I tried sudo apt-get install -f , but it did nothing for me, since my computer was already up to date with no missing dependencies. Also the installation commands you quoted won't do anything if the packages are already installed. I think this should work though.
          Code:
          sudo apt-get install --reinstall kubuntu-desktop firefox
          I'll give it a try if I hit the problem again. I actually haven't noticed it since changing Qt to Native.

          Originally posted by dmeyer View Post
          Anyways, since you aren't running any fan control software then I'm going to start blaming the kernel. By the way, if you really want to boost battery life by nearly 30% you should add these kernel options but only once we've solved your issue.
          Code:
          i915.i915_enable_rc6=7 i915.i915_enable_fbc=1 i915.lvds_downclock=1 drm.vblankoffdelay=1
          Thanks for the tip! (What do these actually do? Googling didn't really elucidate.)

          Originally posted by dmeyer View Post
          Now back to your issue. Use the system, wait till the issue occurs and the run dmesg from the konsole and give us the output. It might enlighten us a bit. A little bit of googling on my part has shown this to have come up on multiple kernels, and distros over the least year or so. I've even seen a a thread or two about Firefox and XUL in particular. The issues almost almost always seemed to magically fix themselves which makes helping you tricky.
          The output of dmesg was posted above. I'll attach the log file mentioned next time though.

          Also, when you mentioned to "start by reinstalling mesa", which exact package do you mean? I don't see anything called "mesa" precisely.

          Comment


            #6
            I've hit this problem again. (Native instead of Raster was the only thing I've tried, really.) Here is the output of dmesg
            Code:
            May 30 16:29:15 sparhawk-XPS-17 kernel: [15282.511621] [drm:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
            May 30 16:29:15 sparhawk-XPS-17 kernel: [15282.511625] [drm] capturing error event; look for more information in /debug/dri/0/i915_error_state
            Again, there was nothing at /debug/dri/0/i915_error_state, but there was a file at /sys/kernel/debug/dri/0/i915_error_state . I've attached the file this time.
            Attached Files

            Comment


              #7
              Originally posted by sparhawk View Post
              I've hit this problem again. (Native instead of Raster was the only thing I've tried, really.) Here is the output of dmesg
              Code:
              May 30 16:29:15 sparhawk-XPS-17 kernel: [15282.511621] [drm:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
              May 30 16:29:15 sparhawk-XPS-17 kernel: [15282.511625] [drm] capturing error event; look for more information in /debug/dri/0/i915_error_state
              Again, there was nothing at /debug/dri/0/i915_error_state, but there was a file at /sys/kernel/debug/dri/0/i915_error_state . I've attached the file this time.
              Alright so I've done even more research. Basically, there are a lot of theories but nobody has definitively found a solution from what I can see. A common theme seems to be specific kernels solving the problem. Now I personally don't have the issue and can't recreate it so I'm just going to walk you through upgrading your kernel. Hopefully this might fix your issue.

              Code:
               mkdir kernel
              cd kernel
              wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.9.4-saucy/linux-headers-3.9.4-030904-generic_3.9.4-030904.201305241545_amd64.deb
              wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.9.4-saucy/linux-headers-3.9.4-030904_3.9.4-030904.201305241545_all.deb
              wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.9.4-saucy/linux-image-3.9.4-030904-generic_3.9.4-030904.201305241545_amd64.deb
              sudo dpkg -i linux-*.deb
              sudo update-grub
              That downloaded the new kernel and needed components, installed them and updated grub. Also, note it is a saucy kernel but it will run just fine on your laptop. Now, once you've done this, reboot your system and it should automatically boot you into the latest kernel. Then test for a while and report back any issues. If the kernel fails to boot, just take a breath, and hard reboot the machine and select an older kernel.

              Comment


                #8
                Good idea. I wonder if it's unlikely to be the version of the kernel, since we're both running the same computer (and presumably kernel)? I don't really know, just throwing it out there.

                Is there a way to see what kernel I was using in Kubuntu 12.10? I could also try reverting to that for a week or so and see if that fixes it.

                Also, you never replied to my question about reinstalling mesa. Which package did you mean exactly?

                Thanks again for all your help.

                Comment


                  #9
                  Originally posted by sparhawk View Post
                  Good idea. I wonder if it's unlikely to be the version of the kernel, since we're both running the same computer (and presumably kernel)? I don't really know, just throwing it out there.

                  Is there a way to see what kernel I was using in Kubuntu 12.10? I could also try reverting to that for a week or so and see if that fixes it.

                  Also, you never replied to my question about reinstalling mesa. Which package did you mean exactly?

                  Thanks again for all your help.
                  Yeah, we are most definitely not running the same kernel. I run openSUSE 12.3 primarily and have a Kubuntu VM for building .debs and mucking around on. Also, just because we have the same computer doesn't mean we have the exactly the same configuration, packages etc. For example, I have a slightly faster cpu which although it has the same GPU as you, actually has the GPU running a tiny bit faster internal clock rate. Something super small could be making a world of difference. Heck, even differing bios versions could be cause our differing experiences.

                  Anyways, the relevant mesa packages are, I think: libegl1-mesa libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libdrm-intel1 xserver-xorg-video-intel But I do not think this is the issue. You could always run
                  Code:
                  glxinfo | grep OpenGL
                  optirun glxinfo | grep OpenGL
                  and paste the output. That would - in a second - highlight any major mesa issues but again, I don't see that being where the problem lies.

                  If you want to run your older 12.10 kernel, then just select it in the grub2 menu (you might need to select "Other Versions" or "Advanced") assuming you upgraded from 12.10 to 13.04 then it should be there.

                  Try installing the new kernel as advised and then get back to me.

                  Comment


                    #10
                    Originally posted by dmeyer View Post
                    Yeah, we are most definitely not running the same kernel. I run openSUSE 12.3 primarily and have a Kubuntu VM for building .debs and mucking around on. Also, just because we have the same computer doesn't mean we have the exactly the same configuration, packages etc. For example, I have a slightly faster cpu which although it has the same GPU as you, actually has the GPU running a tiny bit faster internal clock rate. Something super small could be making a world of difference. Heck, even differing bios versions could be cause our differing experiences.
                    Bummer. Oh well, good to know.

                    Originally posted by dmeyer View Post
                    Anyways, the relevant mesa packages are, I think: libegl1-mesa libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libdrm-intel1 xserver-xorg-video-intel But I do not think this is the issue. You could always run
                    Code:
                    glxinfo | grep OpenGL
                    optirun glxinfo | grep OpenGL
                    and paste the output. That would - in a second - highlight any major mesa issues but again, I don't see that being where the problem lies.
                    Okay, thanks. Here is the output anyway…
                    Code:
                    $ glxinfo | grep OpenGL
                    OpenGL vendor string: Intel Open Source Technology Center
                    OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile 
                    OpenGL version string: 3.0 Mesa 9.1.1
                    OpenGL shading language version string: 1.30
                    OpenGL extensions:
                    $ optirun glxinfo | grep OpenGL
                    OpenGL vendor string: NVIDIA Corporation
                    OpenGL renderer string: GeForce GT 555M/PCIe/SSE2
                    OpenGL version string: 4.2.0 NVIDIA 304.88
                    OpenGL shading language version string: 4.20 NVIDIA via Cg compiler
                    OpenGL extensions:
                    Originally posted by dmeyer View Post
                    If you want to run your older 12.10 kernel, then just select it in the grub2 menu (you might need to select "Other Versions" or "Advanced") assuming you upgraded from 12.10 to 13.04 then it should be there.

                    Try installing the new kernel as advised and then get back to me.
                    I installed the new kernel yesterday, so I'll see how it goes. Thanks again for all your help.

                    Comment


                      #11
                      Ha! I suspect the new kernel fixed it (somewhat). I had a five second freeze playing a game tonight, but then it recovered fine. In kernel log:
                      Code:
                      Jun  1 22:42:11 sparhawk-XPS-17 kernel: [63656.823064] [drm:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
                      Jun  1 22:42:11 sparhawk-XPS-17 kernel: [63656.823069] [drm] capturing error event; look for more information in/sys/kernel/debug/dri/0/i915_error_state
                      It's not totally fixed, because these GPU hangs are a new thing, but I can tolerate this happening every few days if the system is useable after the freeze without a restart. Cheers.

                      ==EDIT==
                      Also, are these GPU hangs a bug that I should file somewhere? And if so, where?
                      Last edited by sparhawk; Jun 01, 2013, 07:06 AM. Reason: Additional question

                      Comment

                      Working...
                      X