Bug 49416 - [GM45] GetXIDRange() hogs cpu
Summary: [GM45] GetXIDRange() hogs cpu
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: medium normal
Assignee: Daniel Vetter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-03 02:02 UTC by darkbasic
Modified: 2017-07-24 23:01 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
i915_error_state (1.32 MB, application/octet-stream)
2012-05-03 02:02 UTC, darkbasic
no flags Details

Description darkbasic 2012-05-03 02:02:16 UTC
Created attachment 60952 [details]
i915_error_state

[40152.829034] [drm] capturing error event; look for more information in /debug/dri/0/i915_error_state
[40152.830002] render error detected, EIR: 0x00000010
[40152.830002]   IPEIR: 0x00000000
[40152.830002]   IPEHR: 0x01000000
[40152.830002]   INSTDONE: 0xfffffffe
[40152.830002]   INSTPS: 0x0001e000
[40152.830002]   INSTDONE1: 0xffffffff
[40152.830002]   ACTHD: 0xfd81f4a0
[40152.830002] page table error
[40152.830002]   PGTBL_ER: 0x00000001
[40152.830002] [drm:i915_report_and_clear_eir] *ERROR* EIR stuck: 0x00000010, masking
[57836.769777] CE: hpet increased min_delta_ns to 20113 nsec

Attached /sys/kernel/debug/dri/0/i915_error_state

OS: Gentoo amd64
kernel: 3.4-rc5
libdrm: 2.4.33
xf86-video-intel: 2.19.0
xorg-server: 1.12.1
mesa: 8.0.2

Boot options: acpi_backlight=vendor enable_mtrr_cleanup pcie_aspm=force i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1


I found it in messages by chance.
Comment 1 darkbasic 2012-05-03 02:03:58 UTC
Forgot to tell it's GM45 (Samsung X360).
Comment 2 Chris Wilson 2012-05-03 02:31:31 UTC
Plane enable too early?
Comment 3 darkbasic 2012-05-03 05:31:43 UTC
I don't know if I need to open another bug, but after a while Xorg starts eating my cpu and I need to restart X. Initially it wastes just a few cpu cycles, the more I use the laptop the more cpu cycles it demands.

Top screenshot:
http://files.linuxsystems.it/temp/2012-05/gm45_top.jpeg
Comment 4 Chris Wilson 2012-05-03 05:41:27 UTC
sudo perf top?
Comment 5 darkbasic 2012-05-03 11:24:19 UTC
I tried removing i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1: much much better but the load is still too high.

Perf top: http://files.linuxsystems.it/temp/2012-05/gm45_perftop.jpeg

Also, I still had another:

[13574.510890] [drm] capturing error event; look for more information in /debug/dri/0/i915_error_state
[13574.511008] render error detected, EIR: 0x00000010
[13574.511008]   IPEIR: 0x00000000
[13574.511008]   IPEHR: 0x00000000
[13574.511008]   INSTDONE: 0xfffffffe
[13574.511008]   INSTPS: 0x0001e000
[13574.511008]   INSTDONE1: 0xffffffff
[13574.511008]   ACTHD: 0xcc4147b8
[13574.511008] page table error
[13574.511008]   PGTBL_ER: 0x00000001
[13574.511008] [drm:i915_report_and_clear_eir] *ERROR* EIR stuck: 0x00000010, masking
Comment 6 darkbasic 2012-05-03 11:36:27 UTC
This is from a just booted system: http://files.linuxsystems.it/temp/2012-05/gm45_perftop_fresh.jpeg
Comment 7 Chris Wilson 2012-05-03 11:48:10 UTC
(In reply to comment #5)
> Perf top: http://files.linuxsystems.it/temp/2012-05/gm45_perftop.jpeg

That's an X client gone mad. Might be shown by xrestop. Or just kill things at random until X settles down :)
Comment 8 darkbasic 2012-05-03 12:30:40 UTC
I already killed almost everything I could, also it *always* goes mad after a while.
With "i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1" cpu goes 100% and there is nothing I can do except restarting X. If you want I can post another perf top with "i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1".

By the way, I never had such a problem with other cards (radeon, nouveau, nvidia, fglrx and even sandy bridge).

Regarding the original issue, do you have any clue?
Comment 9 Chris Wilson 2012-05-03 12:32:56 UTC
The error state I believe I know the issue, it does look like another plane-too-early.

+1 for another perf top :)
Comment 10 darkbasic 2012-05-05 06:35:20 UTC
Here is another perf top:
http://files.linuxsystems.it/temp/2012-05/gm45_perftop-2.jpeg

I closed every app before doing the screenshot.
Comment 11 darkbasic 2012-05-06 12:16:48 UTC
I confirm I have the same cpu utilization problem even without "i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1".
Comment 12 Chris Wilson 2012-05-09 01:47:48 UTC
Still, GetXIDRange() is only called on behalf of a client request. If it was an infinite loop there it would be 100% utilisation, so I still think this a client gone berserk. Can you try 'xrestop'?
Comment 13 darkbasic 2012-05-09 04:22:15 UTC
Here it is:
http://files.linuxsystems.it/temp/2012-05/gm45_xrestop.jpeg
Comment 14 darkbasic 2012-05-09 14:06:21 UTC
Also, please notice this is a dual core, so 52,92% means one core is 100%.
Comment 15 Chris Wilson 2012-05-10 10:06:38 UTC
One of the next steps would be to xtrace the system to see who is calling XCMiscGetXIDRange().
Comment 16 darkbasic 2012-05-10 13:42:43 UTC
How can I xtrace the whole system? It asks for a program:
laptop ~ # xtrace --usage
Uso: xtrace [OPZIONE]... PROGRAMMA [OPZIONEPROGRAMMA]...
Comment 17 Chris Wilson 2012-05-10 13:49:20 UTC
The trick is that you launch it in your .xsession and then redirect your normal session to use DISPLAY=:9 rather than the usual DISPLAY=:0. Or launch it all from the commandline.
Comment 18 darkbasic 2012-05-10 16:30:04 UTC
Ok, we were talking about two different things:

laptop ~ # x11trace --help
x11trace: Dump all X protocol data being tunneled from a fake X display to a real one.
usage: xtrace [options] [[--] command args ...]
--display, -d <display to connect to>
--fakedisplay, -D <display to fake>
--copyauthentication, -c        Copy credentials
--nocopyauthentication, -n      Do not copy credentials
--authfile, -f <file instead of ~/.Xauthority to get credentials from>
--newauthfile, -F <file instead of ~/.Xauthority to put credentials in>
--waitforclient, -W             wait for connection even if command terminates
--stopwhendone, -s              Return when last client disconnects
--keeprunning, -k               Keep running
--denyextensions, -e            Fake unavailability of all extensions
--readwritedebug, -w            Print amounts of data read/sent
--maxlistlength, -m <maximum number of entries in each list shown>
--outfile, -o <filename>        Output to file instead of stdout
--buffered, -b                  Do not output every line but only when buffer is full


laptop ~ # xtrace --help
Uso: xtrace [OPZIONE]... PROGRAMMA [OPZIONEPROGRAMMA]...
Traccia l'esecuzione del programma stampando la funzione attualmente in esecuzione.

     --data=FILE          Non esegue il programma, stampa solo i dati dal FILE.

   -?,--help              Stampa questo aiuto ed esce
      --usage             Mostra un breve messaggio sull'uso
   -V,--version           Stampa le informazioni sulla versione ed esce

Gli argomenti obbligatori per le opzioni lunghe lo sono anche per le relative
opzioni corte.
Per istruzioni sulla segnalazione di bug, consultare:
<http://www.gnu.org/software/libc/bugs.html>.


So I have to create an .xsession and put x11trace there:
echo "x11trace" > /home/niko/.xsession

But how can I redirect my normal session to use DISPLAY=:9 rather than the usual DISPLAY=:0?

Also, where will I see the x11trace output? Do I have to put something like "x11trace > /path/log" in .xsession?

Thanks,
Niccolò
Comment 19 darkbasic 2012-06-08 06:33:57 UTC
Solved upgrading QT O_O


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.