04:20 karolherbst: can anybody explain to me, why the clocks inside the cstates seems to be doubled or the marketing clocks are halfed?
04:24 pmoreau: karolherbst: Not me! :-D
04:24 karolherbst: :D
04:25 karlmag: Different realities? :-P
04:25 karolherbst: pmoreau: well I already answered you :p
04:26 pmoreau: Haven't seen your answer yet, just came back from lunch and checked IRC
04:27 karolherbst: I see
04:28 pmoreau: Ok, saw your answer :-)
04:29 karolherbst: pmoreau: in the vbios my gpu also only have 2004MHz memory clock, but it was sold with 4008MHz
04:30 karolherbst: it is just a big mess all this
04:30 karolherbst: who know what the _actual_ clock is
04:31 karolherbst: pmoreau: actually I can't use 0 in the error state :/
04:32 karolherbst: meh I have to improve error handling there a bit
04:35 karolherbst: pmoreau: the painfull part is, that this table is the only place where we get the information what "unboosted" clocks actually are
04:35 karolherbst: and if we fail to parse that table
04:35 karolherbst: then it is a big mess
04:38 karolherbst: uhhhhh
04:38 karolherbst: I think I got it now
04:39 karolherbst: when we have a cstep table and this base clock table, we use a clock from there, but if we don't have them we use the old PM_mode table to determine the clocks
04:45 karolherbst: pmoreau: https://github.com/karolherbst/nouveau/commit/0c593e873cb8d903fc989afe32b8ee3e8e643fb4
04:45 karolherbst: but for this I need to verify what the blob does, when this table contains garbage
04:52 pmoreau: The new commit seems better. :-)
04:53 pmoreau: xexaxo: You have a point, about 0, 1, 2. :-D
05:00 karolherbst: okay
05:00 karolherbst: if the cstep table and the base clock table are invalid
05:00 karolherbst: blob sticks with PM_Mode clocks
05:00 karolherbst: okay
05:04 karolherbst: mhh, so this base clock table seems to be just irrelevant for the clock the blob boosts to, but it still tells the driver which is the basic clock the gpu shall run on
05:05 karolherbst: 1032 (valid base clock table) vs 810 (broken table)
05:05 karolherbst: but it still boost to the same clock
05:09 karolherbst: I have no idea where this 1123MHz comes from though
05:10 karolherbst: ohhh wait :O
05:10 karolherbst: there is a boost limit inside mupuf vbios
05:10 karolherbst: never saw that before
05:13 karolherbst: mhhh
05:13 karolherbst: maybe I found another table
05:14 karolherbst: ohh no, it is just the boost table
05:23 karolherbst: nice
05:24 xexaxo: pmoreau: thanks. the ddr does as well... although I'm not sure where (which exact memory types) are x2'd
05:32 pmoreau: xexaxo: I did thought of DDR, but I discarded that idea since it also applied to core clocks. Thinking about it again, it would be really weird to have core / shader clocks in *normal* rate, and memory clocks in DDR rate.
05:33 RSpliet: wasn't it the case for a while that shader clock was simply core clock *2?
05:36 pmoreau: Could be… Haven't really looked at them
05:40 karolherbst: nice
05:40 karolherbst: I found something out about boosting :)
05:40 karolherbst: mupuf: your voltage map entry 1 seems to give the driver the voltages for boosting
05:40 karolherbst: like if you higher them, the blob clocks/volts higher
05:41 karolherbst: if you lower them, then the clock/voltage gets lower
05:41 mupuf: hmm, not sure what you are doing here
05:42 karolherbst: okay
05:42 karolherbst: you know that each cstate has a voltage map entry?
05:42 karolherbst: sure you know ;)
05:42 karolherbst: but
05:42 karolherbst: some entries aren't used by cstates
05:42 karolherbst: for example, if you look at this entry: "-- ID = 1, link: 3d, voltage_min = 1150000, voltage_max = 1150000 [µV] --"
05:43 karolherbst: and the linked one: "-- ID = 61, link: ff, voltage_min = 0, voltage_max = 25000 [µV] --"
05:43 karolherbst: 1150000 + 25000 is the max voltage used while boosting
05:43 karolherbst: if you lower ID 1 voltage to 1000000
05:43 karolherbst: the blob only boost to a voltage of 1000000 + 25000 uv
05:44 karolherbst: and a lower clock of course
05:44 mupuf: and what references this voltage map entry_
05:44 mupuf: :
05:44 mupuf: ?
05:44 karolherbst: no idea
05:44 karolherbst: searching for it currently
05:44 mupuf: sorry, was blocked in the finnish layout
05:45 karolherbst: but this was very obvious that the blob reacts to this value
05:45 karolherbst: because the set VID fits to it
05:46 mupuf: having fun on reator?
05:47 mupuf: I investigated the drops/blocking behaviour yesterday
05:47 mupuf: I was sick at home
05:47 mupuf: the problem comes from the router
05:47 mupuf: cisco router...
05:47 karolherbst: ....
05:47 mupuf: I tried disabling a ton of stuff but it is still there
05:48 karolherbst: NSA doesn't like nouveau, that simple
05:48 mupuf: ah ah
05:48 mupuf: so, I need to check out what is going on, because it is fucking annoying
06:08 karolherbst: mupuf: maybe the first two entries have a fixed meaning for all cards? :/
06:08 mupuf: I doubt it, look inside the header of the table
06:08 mupuf: maybe the entry 1 is referenced from there
06:08 mupuf: or better, from the pstate
06:08 karolherbst: mhhh
06:09 karolherbst: yeah maybe
06:09 karolherbst: 0x751e: 20 0c 22 40 01 c8 00 01 00 02 00 00
06:09 karolherbst: there are two 01 values :D
06:09 mupuf: try to change the last one to a bigger id
06:09 mupuf: and see if it changes the boost clock
06:17 karolherbst: mupuf: is there support for openwrt for your router? :D
06:17 mupuf: not for cable modems
06:18 karolherbst: ohh really?
06:19 karolherbst: sad ./
06:20 karolherbst: mupuf: okay changing the 01 has a strange effect
06:21 karolherbst: the voltage is still 1.175V, but only 836MHz clock
06:21 mupuf: you are on the right track
06:22 nchauvet_: karolherbst, no, only xorg.conf.d files related to input
06:22 mupuf: have to go to my Finnish class, see you!
06:22 nchauvet_: hum, sorry, wrong tab...
06:22 karolherbst: mupuf: yeah, the clock related to the voltage set though
06:22 karolherbst: *relates
06:23 mupuf: ok, it may just be a bug on nvidia's side, but we need to match it :s
06:23 mupuf: anyway, have to run!
06:23 karolherbst: yeah I will try to figure it out
06:28 karolherbst: mupuf: now it fits :)
06:28 karolherbst: I think if you go under the "voltages" for a pstate, the blob messes up
06:28 karolherbst: but as long as you keep above, it works
07:49 Hauke: where do I find the nouveau development git tree which will go into linux 4.5?
07:49 imirkin: Hauke: http://cgit.freedesktop.org/~darktama/nouveau/
07:50 imirkin: Hauke: it should have your patch to support 225mhz hdmi on fermi... and a kernel param to override it to higher frequencies
07:51 Hauke: imirkin: thanks
07:52 Hauke: that was the information I was actually searching for ;-)
07:53 imirkin: someone with a GF106 said they could get up to 297mhz... no idea where that info comes from though :(
07:53 imirkin: so i just threw a kernel param in and called it a day
07:55 imirkin: [i also asked the nvidia guys about how to detect it, but no info so far]
07:55 Hauke: imirkin: I have a GF114 and I think I tried something bigger than 225 and it failed, the blob also limits at 225 mhz
07:56 imirkin: right, so the 225mhz thing is a real thing... just not for everyone :)
07:56 imirkin: maybe it's chip-specific, maybe it's board-specific
07:56 imirkin: i found something promising in the vbios, but it said 225mhz for that GF106 guy
07:59 Hauke: an older blob only allowed 165 mhz max, but a recent blob allowed 225 mhz
08:00 Hauke: imirkin: I have only one nvidia graphics card to test here
08:00 imirkin: Hauke: right, i'm not suggesting that you would do anything in addition to what you've done :)
08:01 imirkin: that's why i asked the nvidia guys... hard to get all the equipment in the right place to test it all out, not to mention time-consuming
08:05 Hauke: for SoC kernel-ci is helpfull
08:11 karolherbst: imirkin: maybe it is just a "marketing" limit or a stability thing, at which clock did he used the clock in the end?
08:12 karolherbst: or was the card sold with support for 297?
08:12 imirkin: karolherbst: the GF106 guy said that the blob driver allowed 297, and he was able to use it just fine at 297
08:12 imirkin: which happens to be the freq for 4k@30 or something like that
08:12 karolherbst: imirkin: ahh k
08:12 imirkin: whereas Hauke's experience is that the blob allows 225, and he's only able to go up to 225
08:13 karolherbst: mhh
08:13 karolherbst: k
08:15 karolherbst: I am just wondering about stuff like that sometimes, because, I don't know if this is still a thing, but years ago you could just hack some engine cores free if you flashed your vbios and get more perf that way
08:16 imirkin: karolherbst: and now you know how it worked :)
08:17 karolherbst: :D
08:17 karolherbst: yeah of course, but I am wondering if that is still a thing
08:17 karolherbst: like is my gpu able to do more (not only freq/voltage wise) but has it actually more stuff on the chip than advertised through the vbios
08:18 Hauke: I do not know for sure what happend when I used it with more than 225
08:19 imirkin: karolherbst: oh like masked off TPC/etc?
08:19 karolherbst: yeah
08:20 Hauke: could it be that the max pixel clock also depends on some off chip stuff?
08:20 imirkin: Hauke: yep
08:21 imirkin: could depend on everything including the physical connector wired onto the board
08:23 Hauke: lets see what the nvidia people will answer
08:25 karolherbst: pmoreau: just sent a better version of the series :)
08:25 karolherbst: but I think my finding today may solve the main mystery about boosting
08:26 karolherbst: the other part would be the algorithm for tdp/temp/max_clock => actual_clock
08:26 karolherbst: but we do have the max_clock now
08:36 karolherbst: prg_: do you know if nouveau clocked much higher with your kepler card than the binary driver did?
09:48 joi: imirkin: still interested in running warsow windowed?
09:48 imirkin_: joi: not really... it's just screwed
09:49 imirkin_: joi: i gave up when i accidentally deleted all my wip changes
09:49 imirkin_: but i wasn't getting far... deadlocking with my stupid mutexes
09:49 imirkin_: because some functions are both public and private
09:49 imirkin_: so this will all need some careful thought
09:49 imirkin_: and for now my conclusion is "sorry, warsow doesn't work on nouveau"
09:50 joi: warsow uses one context from multiple threads?
09:50 imirkin_: no, it uses multiple contexts from multiple threads
09:50 imirkin_: which is perfectly legal
09:50 imirkin_: just unsupported by nouveau
09:50 joi: so can we allocate separate channel for each context?
09:50 imirkin_: sure, but that kills perf and is unnecessary for everything else
09:51 imirkin_: we want to keep using a single channel.
09:51 imirkin_: we could allocate separate pushbufs for each context, but even that's not particularly useful
09:51 joi: anyone measured this?
09:51 imirkin_: that hw context switches are slow? yeah, afaik
09:52 imirkin_: i haven't personally though
09:52 simulacr: what's the way to change fan speed? i think 1000 (sensors output) not enough because xorg freezes after some load with opengl video output in mpv or in some games, xv video output doesn't cause a freeze because more cpu-related afaik
09:53 imirkin_: simulacr: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/thermal/nouveau_thermal
10:00 joi: imirkin_: so the problem comes from nouveau not tracking state per context or not invalidating gl state of other contexts?
10:01 imirkin_: joi: not at all
10:01 imirkin_: joi: in fact that part works great :)
10:01 imirkin_: joi: it comes from not locking access to the gpu from multiple concurrent e.g. draws
10:01 imirkin_: or... other things, like buffer uploads
10:01 imirkin_: can't really do one of those in the middle of a draw
10:02 imirkin_: because of how the kick handler works
10:02 imirkin_: and also other reasons like you can't do random stuff between begin/end
10:02 simulacr: imirkin_: this is it, thanks
10:03 imirkin_: joi: i'll get back to it eventually, but it's not a simple task
10:03 imirkin_: joi: you want to do the locking logically and not slow down the average case
10:03 imirkin_: (average case = single thread doing things at any given time)
10:24 joi: found a workaround :)
10:24 joi: ./warsow +set r_multithreading 0
10:25 joi: :D
10:25 imirkin_: joi: ah excellent. problem solved ;)
10:25 joi: yeah ;)
10:26 imirkin_: i figured there'd be something like that
10:27 imirkin_: glad you found it
10:27 joi: it's undocumented
10:29 joi: I found it by "strings */* | grep thread"
10:42 Tom^: karolherbst: ive been in stockholm, :<
10:46 joi: heh, I'm sooo lucky - 2 crashes in reservation_object_wait_timeout_rcu in 20 minutes
10:48 karolherbst: Tom^: no worries :)
10:48 imirkin_: joi: that sucks... out of my domain unfortunately. make some logs for skeggsb ?
10:49 karolherbst: Tom^: could you try out my stable_kepler_reclocking branch on your card without any other modifications?
10:49 Tom^: probably can tomorrow, gonna hit the hay. been on a course and flown airplane back home and just got home so a bit tired :P
10:51 karolherbst: k
10:54 joi: imirkin_, skeggsb: http://paste.ubuntu.com/13627889/
10:56 karolherbst: joi: did you build nouveau yourself?
10:59 joi: ... and third one happened 10 seconds after I posted above link ...
11:01 joi: karolherbst: yeah, it happened on kernel 4.2 with drm-next from some time ago and your gddr5 patch
11:02 karolherbst: mhh, maybe you could bisect it then?
11:02 karolherbst: will be time consuming though :/
11:02 karolherbst: or do you mean with some time ago, just with no obvious reason?
11:02 joi: IIRC it was crashing before
11:54 pmoreau: karolherbst: Great! I'll have a look at it. :-)
12:13 karolherbst: pmoreau: nice thanks
13:12 ravior: Does someone knows if there is someone currently looking at this? https://bugs.freedesktop.org/show_bug.cgi?id=92961
13:13 imirkin_: ravior: not aware of anyone
13:14 ravior: The GPU that is observed on is usually the only graphic chip mounted to some Dell business laptops.
13:15 karolherbst: ravior: maybe you want to use either nvidia or nouveau
13:15 karolherbst: but not both
13:15 ravior: imirkin_: Thanks for the reply. I wanted to see if I can help with the debugging of this problem.
13:16 ravior: karolherbst: I'm just using the nouveau driver. I don't have the proprietary driver installed.
13:16 karolherbst: ahh okay
13:16 ravior: The proprietary driver behaves strange on my machine + combined with a latest bug in the kernel, makes it unusable
13:17 karolherbst: ravior: which is the latest version of nouveau you tried?
13:17 karolherbst: there is always the chance, that newer software magically solves issues ;)
13:17 ravior: 1.0.11+31+g1ff13a9-1
13:17 karolherbst: not the ddx
13:17 karolherbst: kernel
13:18 ravior: I've tried the latest testing driver from the Arch testing repository.
13:19 karolherbst: imirkin_: this issue is basically nouveau got an unknown interrupt and doesn't know what to do, right?
13:19 ravior: I've tried some downgrades to xorg/libdrm/xorg/kernel/mesa/nouveau, but this problem happened as far as july of 2015
13:20 imirkin_: karolherbst: haven't the faintest clue
13:20 ravior: I went as far as february with no results, but after that point I should have downgraded everything, so I stoped
13:20 ravior: I can try to provide some logs, if it helps
13:21 ravior: I've tried rising the drm log level from the kernel, but the messages didn't helped
13:21 karolherbst: imirkin_: I meant this: https://bugs.freedesktop.org/attachment.cgi?id=103307 last few lines
13:21 karolherbst: ravior: nouveau.debug
13:21 karolherbst: ravior: http://nouveau.freedesktop.org/wiki/KernelModuleParameters/
13:22 imirkin_: ravior: you sure you have that issue? the original person who filed it was on a GT215
13:22 imirkin_: you appear to be on a GF119 which is an extremely different gpu
13:22 imirkin_: in order to say "yes, i have the same bug" that means that you understand the other person's bug, your bug, and have concluded that they are the same
13:23 ravior: imirkin_: GF119M [NVS 4200M]
13:23 imirkin_: if the issue is "desktop freezes", that can happen for a million different reasons
13:23 ravior: I've attached the Xorg log in the ticket mentioned above
13:23 imirkin_: all that'll have is "xorg froze. XORG FROZE! OH NOOOO XORG FROZE"
13:24 karolherbst: I proudle quote from the xorg.log: "(EE) [mi] These backtraces from mieqEnqueue may point to a culprit higher up the stack."
13:24 karolherbst: and so on
13:24 karolherbst: basically I don't think the xorg tells us much
13:24 ravior: imirkin_: The Xorg log and dmesg messages before the log are in https://bugs.freedesktop.org/show_bug.cgi?id=71659
13:24 imirkin_: it's a side-effect of the gpu hanging
13:25 pmoreau: karolherbst: Don't you need to do some capping for `boost_mode == 3`? Or are we retrieving the data directly from VBIOS and everything is fine?
13:25 imirkin_: ravior: where's your dmesg?
13:25 imirkin_: i don't see it
13:25 karolherbst: pmoreau: boost_mode > 2 basically means no clamping of the highest clock available
13:25 karolherbst: pmoreau: I mean, we could parse this and say "4" is not a valid number
13:26 karolherbst: but then again, I could also just use keywords
13:26 pmoreau: :-D
13:26 karolherbst: you can also tell gcc to do -O6
13:26 karolherbst: but then again, it is the same as -O3
13:26 karolherbst: :D
13:26 ravior: imirkin_: I'm sorry. I haven't attached the full dmesg log on the ticket. I've posted only the errors seen on the dmesg generated by nouveau before the freeze
13:26 pmoreau: "4V might be too much, please use something somewhat smaller"
13:27 karolherbst: pmoreau: anyway I think we are slowly getting there
13:27 ravior: The rest of the dmesg seemed clean. I'll attach the full dmesg log if it will help the debug effort.
13:28 karolherbst: pmoreau: I got mupufs kepler card to crash under nvidia, just because I raised the "boost_max_voltage"
13:28 karolherbst: :D
13:28 karolherbst: so maybe if we stick to that value, all kepler cards run stable at such a clock then
13:28 pmoreau: karolherbst: It's more that you say "3: boost to max clock available (still limited by gpu and boost voltage)", and I was wondering how the "limited by gpu and boost voltage" was applied
13:28 karolherbst: pmoreau: https://github.com/karolherbst/nouveau/commit/db2aab7af61741d57fa9039f8a1f4aa687256b82 and https://github.com/karolherbst/nouveau/commit/07c51b807bfdab306c47c264278d65d4ccf2f4ed
13:29 karolherbst: the idea is simple: if a cstate wants a voltage higher than the card supports: drop it
13:29 karolherbst: if a cstate wants a voltage higher than the max boost voltage: drop it
13:29 pmoreau: Ah! It was in the previous patches… :-D
13:29 karolherbst: yes
13:29 pmoreau: I should have looked backwards
13:29 karolherbst: these are things we want to do anyway
13:30 karolherbst: regardless whether we support dyn reclocks and boosting and all that stuff
13:30 karolherbst: we shouldn't go beyond these voltages
13:30 karolherbst: this is OC domain
13:32 pmoreau: Could have been nice to have some more hints at what had changed in the v2: you had a v2 comment in one of the patch, but not in other ones you modified, nor in the ones you added.
13:32 pmoreau: But it's a minor thing since the commits are small enough
13:36 karolherbst: pmoreau: ohh right, I have to do that cleaner :)
13:36 karolherbst: pmoreau: basically I improved "clk: allow boosting only when NvBoost is set " and added that boost_max_voltage thingy
13:38 karolherbst: ohh I think I done something wrong there :/
13:38 karolherbst: or maybe not
13:39 hakzsam: imirkin_, right, your way to implement emitMEMBAR() is much better :)
13:39 imirkin_: hakzsam: i've had practice :)
13:39 hakzsam: yeah!
13:42 karolherbst: pmoreau: the bad thing about most of these patches are is, that I can't test them myself :/ all my cstates have voltages attached lower than what the boost_max_voltage and the pwm max voltage says :/
13:42 pmoreau: karolherbst: Looks like hakzsam doesn't want to right v2 message as well :p
13:43 karolherbst: ?
13:43 hakzsam: pmoreau, I was lazy yeah :)
13:44 karolherbst: pmoreau: I have hard time to get what your sentence should mean :/ sorry
13:45 pmoreau: karolherbst: s/right/write
13:45 hakzsam: s/right/write I guess
13:45 pmoreau: Getting tired… --"
13:45 karolherbst: :D
13:45 karolherbst: ahhh
13:45 karolherbst: now it makes sense
13:45 hakzsam: :)
13:45 karolherbst: usually I write them though
13:51 karolherbst: mhh maybe I will get the blob driver to go above the tdp on my gpu :/
13:51 karolherbst: sounds tricky though
13:56 karolherbst: how do I do some vdpau video playback again?
14:01 imirkin_: karolherbst: mplayer -vo vdpau
14:01 imirkin_: karolherbst: iirc DRI3 support patches landed very recently for it, i haven't tried it myself though
14:01 imirkin_: karolherbst: should be apparent what's going on when you do vdpauinfo... might have to force VDPAU_DRIVER=nouveau
14:01 karolherbst: nah, I want to run it on the blob
14:01 karolherbst: to max out power consumption
14:02 karolherbst: yeah well :/
14:03 karolherbst: core 100%, video 100%, memory 22%, pcie 18%
14:03 karolherbst: still only 56W :/
14:04 karolherbst: then I have to mess with the pwm myself
14:06 karolherbst: nope, gpu is getting too hot
14:06 karolherbst: already at 80°C at only 60W
14:06 karolherbst: and TDP is 80W
14:19 ravior_: imirkin_, I've attached the dmesg log for the freeze in: https://bugs.freedesktop.org/show_bug.cgi?id=71659
14:19 imirkin_: ravior_: i don't suppose kernel 4.3 or 4.4-rc3 helps?
14:20 ravior_: imirkin_, I can't update the kernel because of: https://bugs.archlinux.org/task/46894
14:43 karolherbst: mupuf: will nvafakebios work if the memory are is at 0xa007b300 ?
14:44 karolherbst: or is it too high
15:47 ravior_: imirkin_, If I can provide more debug info for this problem, just leave a note on the ticket. I'll respond as soon as possible. Thanks for listening in.
15:48 imirkin_: ravior_: sorry i'm not much help... but i'm just largely unfamiliar with the issues at hand
15:51 Arbition: Hi, I have a GK208M, and am running on fedora rawhide kernels, would I be getting nouveau patches close to release?
15:51 Arbition: just updated to kernel 4.4.0-0.rc3.git1.1
15:52 imirkin_: Arbition: can you rephrase your question? not sure i understand...
15:52 ravior_: Nothing to be sorry about:). I just wanted to highlight this problem. It bothers me that I can't evade it without more or less breaking my system.
15:52 Arbition: Well I saw http://lists.freedesktop.org/archives/nouveau/2015-December/023442.html and am wondering when that will be available in the main kernel tree
15:53 imirkin_: Arbition: not for another 3 months or so, in all likelihood
15:53 Arbition: not even in linux-next?
15:53 imirkin_: skeggsb is bad about sending stuff up early to drm-next, so... no
15:53 karolherbst: maybe we could squeeze that in for 4.5, but I wouldn't feel good about that without proper testing, so 4.6
15:54 Arbition: ok
15:54 karolherbst: don't expect it earlier than 4.6 ;)
15:54 karolherbst: but you can try it out if you want though :p
15:54 Arbition: karolherbst: as you were the one posting that patch, what chipsets were you able to test it on?
15:54 karolherbst: don't think it makes much sense for your gpu though
15:54 karolherbst: Arbition: gk106
15:55 imirkin_: Arbition: fwiw your GK208 is unlikely to benefit much from karol's work... you probably have DDR3 vram?
15:55 karolherbst: I don't think they are needed for GK208M actually, because they don't volt too high
15:55 Arbition: ah ok
15:55 karolherbst: Arbition: are there any issues with your kepler card with 4.4?
15:55 imirkin_: Arbition: i'd guess everything already works for you... except the pcie stuff
15:55 Arbition: Well I'm not so sure
15:56 imirkin_: pastebin dmesg
15:56 karolherbst: Arbition: are you able to reclock to max perf state without messing up?
15:56 Arbition: no, I set to 0a but only got base and then I was unable to change it again, or sudo for some reason
15:57 karolherbst: yeah then we need dmesg
15:57 Arbition: Give me a summary of what logs to give and I will try it again
15:57 Arbition: just dmesg?
15:57 karolherbst: yeah
15:57 Arbition: so just add nouveau.pstate=1 to the kernel, or should I add other options?
15:58 karolherbst: its fine
15:58 Arbition: alright, trying now
15:59 karolherbst: imirkin_: seems like all mobile gk208 are ddr3
16:00 imirkin_: not just the mobile ones... i think some are gddr5 though
16:00 karolherbst: imirkin_: the 740M has a gddr5 variant, but thats gk10x again
16:01 karolherbst: ohh gt 640 rev 2 and gt 730 (gddr5) are gddr5 gk208
16:01 karolherbst: and the quadro ones
16:02 Arbition: This is an optimus 730M
16:02 Arbition: thats all I could say about it
16:02 imirkin_: ohhhh i should have run http://cgit.freedesktop.org/mesa/mesa/commit/?id=52a800a687ee68483fe7cd83b137630b74e2127b through shader-db
16:02 imirkin_: oh well. next time.
16:05 Arbition: I seem to be getting stack traces
16:05 karolherbst: 730M seems to be ddr3 only then
16:05 karolherbst: ohh nice
16:05 karolherbst: show us :p
16:05 karolherbst: and please full dmesg
16:05 imirkin_: Arbition: perhaps the gpu is off when you're trying to reclock?
16:05 imirkin_: that might be an issue
16:05 karolherbst: ohhh wait
16:05 karolherbst: yeah
16:05 karolherbst: this is an issue
16:05 Arbition: yeah it knows its supposed to go into 0f, but its not active
16:06 karolherbst: this might help: https://github.com/karolherbst/nouveau/commit/e52f60b00010700fba1839c62d622e34879ee1a4
16:06 karolherbst: Arbition: try to reclock while something runs on the nvidia gpu
16:06 Arbition: hmm, not really sure how to do that
16:07 Arbition: any examples?
16:07 karolherbst: Arbition: start any gl application from command line with DRI_PRIME=1 in front of that
16:07 karolherbst: ohhh wait
16:07 karolherbst: for that optimus has to work
16:07 karolherbst: try this: DRI_PRIME=1 glxinfo | grep "OpenGL vendor string"
16:07 karolherbst: what is the output?
16:08 Arbition: interesting, I think gtk3 applications were not working until I executed that, but the command itself still hasn't returned
16:08 Arbition: base is now active though, but not the requested pstate
16:09 Arbition: ok now my laptop has locked up
16:10 karolherbst: yeah, I think this also happened for me, after trying to mess with the pstate while the gpu is off
16:10 karolherbst: Arbition: boot with nouveau.runpm=0
16:10 Arbition: hmm
16:10 imirkin_: Arbition: moral of the story: don't futz with the gpu while the gpu is off
16:10 karolherbst: in that case the gpu won't turn off
16:10 Arbition: ok
16:10 karolherbst: imirkin_: the patch looks good though, doesn't it?
16:11 imirkin_: karolherbst: dunno maybe? get skeggsb to look at it
16:11 imirkin_: skeggsb: there are like a million patches waiting on you... please try to process them :)
16:11 karolherbst: :D
16:11 imirkin_: bbl
16:12 Arbition: Hmm, interesting, running without pm has also fixed some other issues which aren't graphically related
16:12 karolherbst: for example?
16:13 Arbition: after logging in, the display manager refuses to do anything for about 30 seconds, even though I run xmonad
16:13 karolherbst: ohh yeah
16:13 Arbition: vts would also not show up for about the same time if I switched to one
16:13 karolherbst: nouveau is funny sometimes, or the X server
16:13 karolherbst: ohhhh wait
16:14 karolherbst: there is this issue in one library
16:14 karolherbst: mhhhhhh
16:14 karolherbst: which was it again
16:14 karolherbst: right libpcieaccess
16:15 Arbition: ok so I echoed 0f into pstate, but as before, the command doesn't return, yet the output changes to indicate it knows the target pstate
16:15 karolherbst: mhhh
16:16 karolherbst: dmesg please
16:16 Arbition: glxinfo also isn't returning
16:16 Arbition: oh wait, it just did, partially
16:16 karolherbst: it hangs before printing memory
16:16 karolherbst: after "Accelerated: yes"=
16:16 karolherbst: ?
16:17 Arbition: I don't know, as I grepped
16:17 karolherbst: then without grep
16:17 Arbition: if I try it again, it'll probably hang like last time, I'm going to upload dmesg first
16:17 karolherbst: k
16:19 Arbition: well I would paste it, but dmesg only seems to return line after line of "nouveau 0000:01:00.0: fifo: CHSW_ERROR 00000002"
16:19 karolherbst: ohhh
16:19 karolherbst: okay
16:19 karolherbst: something is really messed up then
16:19 Arbition: glxinfo finally returned
16:20 karolherbst: Arbition: could you reboot and then dmesg without doing anything?
16:20 Arbition: ok
16:21 Arbition: well having just run glxinfo, at the moment the last thing its returned is a table of "64 GLXFBConfigs"
16:21 Arbition: rebooting
16:21 Arbition: but just as I executed the command, hang
16:23 karolherbst: dmesg?
16:23 Arbition: just waiting to get in
16:24 Arbition: https://dpaste.de/qzXE
16:25 karolherbst: Arbition: okay, but you still don't have nouveau.pstate=1 in your kernel ;)
16:25 karolherbst: but yeah
16:25 karolherbst: this thing with waking up the gpu all the time is a known issue
16:25 Arbition: oh, thought you asked for no changes
16:25 karolherbst: ahh
16:25 karolherbst: I meant no changes in no commands on the gpu and stuff
16:26 karolherbst: but you could try this out:
16:26 karolherbst: run lspci
16:26 karolherbst: it should also hang a while
16:26 Arbition: no
16:26 Arbition: returned almost immediately
16:26 karolherbst: well almost or like 1 second later?
16:26 Arbition: 1 second I guess
16:26 Arbition: second time, less than
16:26 karolherbst: then the gpu was woken up ;)
16:26 karolherbst: yes
16:26 karolherbst: for the second run the gpu is still on
16:27 karolherbst: if you wait 5 seconds between runs, it will wait again
16:27 karolherbst: same with glxinfo
16:27 Arbition: just tried again, less than one second
16:27 Arbition: barely perceptable
16:27 Arbition: maybe 200ms
16:27 karolherbst: glxinfo should wait for a bit after "Accelerated: yes"
16:27 Arbition: hang on
16:28 Arbition: with DRI_PRIME=1 or without?
16:28 karolherbst: without
16:28 Arbition: no, didn't hang on anything
16:28 karolherbst: mhh okay
16:28 karolherbst: maybe this is an fixed issue by now or something
16:28 karolherbst: anyway
16:29 Arbition: not seeing any nouveau in glx info, even though I ran lspci the second prior
16:29 karolherbst: then boot again with nouveau.runpm=0 nouveau.pstate=1
16:29 Arbition: ok
16:31 Arbition: ok so I turned off runpm, but running glxinfo off the bat still shows intel graphics
16:32 karolherbst: dmesg
16:33 Arbition: https://dpaste.de/dNst
16:33 karolherbst: okay, now output of DRI_PRIME=1 glxinfo | grep "OpenGL vendor string"
16:34 Arbition: returns nouveau immediately
16:34 karolherbst: okay, nice
16:34 karolherbst: now try to reclock to max perf level
16:35 Arbition: just to double check, this is the correct command to do so echo "0f" > /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/pstate
16:35 Arbition: I did a find /sys -iname pstate to find it
16:36 karolherbst: should work
16:36 karolherbst: though you also find it in /sys/class/drm/card1/device/pstate ;)
16:36 Arbition: actually... its on card0 for me
16:36 Arbition: i'm pretty sure
16:37 karolherbst: :O
16:37 karolherbst: card0 should be intel
16:37 Arbition: no card1 is intel for me
16:37 karolherbst: weird
16:37 Arbition: anyway, put 0f into pstate, and the command isn't returning
16:37 karolherbst: dmesg
16:38 Arbition: nothing from the past 2 minutes in dmesg
16:38 karolherbst: something is odd
16:38 karolherbst: okay
16:38 karolherbst: then this
16:39 Arbition: oh wait
16:39 Arbition: there was something from earlier, possibly from when I ran glxinfo
16:40 karolherbst: upload this file somewhere /sys/kernel/debug/dri/0/vbios.rom
16:40 karolherbst: you might have to cat it into /tmp or somewhere before being able to upload it
16:40 Arbition: well here is another dmesg anyway https://dpaste.de/vYZd
16:41 karolherbst: ohhh
16:41 karolherbst: this doesn't look too good
16:41 Arbition: tell me doc, whats the prognosis
16:42 karolherbst: no idea
16:42 Arbition: ok I'll upload the vbios
16:42 karolherbst: just that it isn't caused by nouveau
16:42 Arbition: ah
16:42 karolherbst: most likely
16:42 karolherbst: maybe it is
16:42 karolherbst: who knows
16:45 Arbition: does nouveau use shm at all?
16:45 karolherbst: no clue
16:46 Arbition: /dev/shm that is
16:46 imirkin: for what?
16:46 imirkin: not explicitly...
16:46 Arbition: wait, nevermind
16:46 Arbition: just remembered thats a userspace issue
16:46 karolherbst: imirkin: any idea about this locking issue?
16:46 imirkin: karolherbst: if it's about the kernel, i have no idea
16:47 karolherbst: k
16:47 karolherbst: something dma buf related :/
16:47 karolherbst: imirkin: but this nvidia card is also card0 in debugfs
16:47 karolherbst: really weird
16:47 imirkin: why is that odd?
16:47 imirkin: driver load order is wtvr
16:48 karolherbst: ohhh okay
16:48 karolherbst: right
16:48 Arbition: if it is at all useful given you've noticed stuff, vbios https://drive.google.com/file/d/0B2jHgkGt14XJQnZVVm53SG1Dbk0/view?usp=sharing
16:48 karolherbst: maybe, maybe not
16:49 Arbition: :| reboot locking up again
16:50 Arbition: So is there any other information I can get?
16:50 Arbition: or deliver
16:50 karolherbst: mhhh
16:50 karolherbst: hard to tell
16:51 karolherbst: Arbition: does this "[ INFO: possible circular locking dependency detected ]" issue appears again?
16:51 Arbition: under what conditions?
16:51 karolherbst: running something with DRI_PRIME=1
16:52 Arbition: Well I just rebooted without runpm=0 and pstate=1
16:53 karolherbst: well
16:53 karolherbst: what does DRI_PRIME=1 glxgears do?
16:53 Arbition: ah well I just did it with glxinfo and it did show up again
16:54 Arbition: glxgears works, but it doesn't cause it to show up again
16:57 Arbition: curious, 45 seconds after running glxgears, I'm seeing "DMA-API: debugging out of memory - disabling"
16:57 karolherbst: Arbition: do you mind sending this snippet: https://gist.githubusercontent.com/karolherbst/cd8292689959417a0111/raw/d5837b96ff56ec72a36ab12519dcbbd815be1d86/gistfile1.txt to dri-devel@lists.freedesktop.org ?
16:57 Arbition: um, I've never posted to a mailing list before
16:58 karolherbst: and write under which circumstances you can reproduce this issue
16:58 karolherbst: mhhh
16:58 karolherbst: Arbition: text only, no html ;)
16:58 karolherbst: and subscripe to the ML before
16:58 karolherbst: that's it :p
16:58 karolherbst: it is better that you are the contact person, because I wouldn't be able to help there
16:58 Arbition: oh... I use gmail, I'm not 100% sure I can send text only (no html) I think I may have seen the option to switch it off, but I'm not sure
16:58 karolherbst: should be possible
16:58 Arbition: ah I see
16:59 Arbition: so how do I subscribe to the list?
16:59 karolherbst: Arbition: http://lists.freedesktop.org/mailman/listinfo/dri-devel
17:00 karolherbst: Arbition: you will get the message from the ML though, so you might want to bundle them ;)
17:01 karolherbst: "Would you like to receive list mail batched in a daily digest?" -> yes
17:01 Arbition: oh I was going to leave it as no, thinking it meant, get none >.< thanks for the tip
17:03 karolherbst: Arbition: I am sure your other nouveau issues might be somewhat related to that locking issue
17:03 Arbition: could be
17:09 imirkin: RSpliet: congrats -- found another bug in the nv50 mad stuff ;)
17:09 imirkin: RSpliet: it's just the feature that keeps on giving
17:09 imirkin: admittedly it's only triggered when there's a constant folding fail... but... heh
17:10 imirkin: [i mean seriously, who does mad(0.0, 0.0, val)
17:10 imirkin: but apparently our const folding doesn't handle that? very odd...
17:12 karolherbst: Arbition: but as it seems, my patches may help your gpu, but only when this locking issue is fixed :/
17:13 Arbition: I posted to the list
17:13 karolherbst: yeah, saw it
17:13 Arbition: I'm a little concerned most posts have something in [...] while mine does not
17:13 karolherbst: ? what do you mean?
17:13 Arbition: in the subject
17:14 karolherbst: doesn't really matter thought
17:14 Arbition: ok
17:15 karolherbst: maybe you should have choosen a more "news articke" like subject, like: "deadlock while using DRI_PRIME" :p
17:15 Arbition: I'm also curious what they'll say about my kernel taint line. G and W don't look particularly problematic...
17:16 karolherbst: usually nothing
17:20 karolherbst: but besides that it somehow seems to work though, I mean, maybe this deadlockijg scenario is just rare and everything
17:20 Arbition: well I repeated it?
17:21 karolherbst: yeah don't know acutally, did DRI_PRIME=1 glxgears run fine?
17:21 Arbition: yes
17:21 Arbition: I suspect it only happens once per boot
17:21 karolherbst: well it is more an info about a deadlock I guess
17:21 karolherbst: than the actualy deadlock
17:21 karolherbst: would be still bad if that would trigger
17:21 karolherbst: mhhh
17:21 karolherbst: but you said an echo into pstate also locked the call?
17:22 karolherbst: do you want to cat the pstate file?
17:22 Arbition: Everytime I echoed into pstate it locked, yes
17:22 Arbition: but the contents of the pstate node did change to (indicated with a *) the targeted pstate
17:22 karolherbst: I hope you still boot with nouveau.runpm=0?
17:23 Arbition: but AC: remained on base
17:23 karolherbst: mhhh
17:23 karolherbst: okay, then we need that stack of the process
17:23 Arbition: I think that lock occured both with and without runpm=0
17:24 karolherbst: yeah, doesn't matter now (the lock). I am more concerned why the echo into pstate blocks
17:24 karolherbst: there is something really fishy going on
17:24 Arbition: restarting with pstate and runpm
17:24 Arbition: yes that behaviour also occurs regardless of runpm
17:25 karolherbst: okay
17:25 karolherbst: in the blocking shell
17:25 karolherbst: try to terminate the echo call with ctrl+c
17:25 Arbition: Already tried, does nothing
17:25 karolherbst: it should print ^C
17:25 karolherbst: k
17:25 karolherbst: good
17:25 karolherbst: do you have htop installed?
17:25 Arbition: yes
17:25 karolherbst: open it in another shell ;)
17:25 karolherbst: press F4
17:25 karolherbst: type in bash
17:26 karolherbst: enter
17:26 Arbition: hang on, let me do the pstate switch first
17:27 Arbition: huh, nV is on card1 now
17:27 karolherbst: as imirkin said: load order
17:27 karolherbst: might change
17:27 karolherbst: depending on stuff in the kernel
17:27 Arbition: ok command ran, ctrl+c did nothing, running htop
17:27 Arbition: no excess CPU load
17:28 karolherbst: doesn't matter
17:28 karolherbst: F4
17:28 karolherbst: bash
17:28 Arbition: ok
17:28 karolherbst: this should only display bash commands then
17:28 karolherbst: one of them should have a "D" in the S coloumn
17:28 Arbition: Yep, thats also the evelated privelage one
17:28 karolherbst: right
17:28 karolherbst: we need its PID
17:28 Arbition: ok
17:29 karolherbst: go into /proc/PID_here
17:29 Arbition: ok
17:29 karolherbst: and cat the stack file
17:29 karolherbst: I need this :D
17:31 Arbition: This should be it https://drive.google.com/file/d/0B2jHgkGt14XJTW5PbV9LQkFKV2M/view?usp=sharing
17:31 karolherbst: looks about right
17:32 karolherbst: ohh okay
17:32 karolherbst: Arbition: htop again
17:32 Arbition: yep
17:32 karolherbst: F2
17:32 karolherbst: Display options
17:32 karolherbst: unselect Hide kernel threads
17:32 Arbition: ok
17:32 karolherbst: F10
17:33 karolherbst: F4
17:33 karolherbst: kworker
17:33 karolherbst: enter
17:33 karolherbst: one of them should be "D"
17:33 Arbition: yes, only one
17:33 karolherbst: stack of this one then ;) you know the drill
17:33 imirkin: neat. so for nv50, my "use $r63 instead of 0" change had this effect over a large-ish shader-db: http://hastebin.com/ugaguqebay.coffee
17:33 karolherbst: imirkin: nice :D
17:34 imirkin: surprising that so many programs were hurt... oh well
17:34 karolherbst: yeah, but why does it help at all? :/
17:34 karolherbst: I can't figure why
17:34 imirkin: because registers can go anywhere
17:34 Arbition: https://drive.google.com/file/d/0B2jHgkGt14XJZWtuVW10ZmpxNjA/view?usp=sharing
17:34 imirkin: whereas immediates can't
17:35 imirkin: also immediates force 8-byte instructions, while registers often fit into 4-byte instructions
17:35 karolherbst: ohhh
17:35 karolherbst: had
17:35 karolherbst: the pmu messed up
17:35 karolherbst: :D
17:35 karolherbst: *ha
17:35 Arbition: I guess thats card switching for you >.>
17:36 karolherbst: well
17:36 Arbition: idk maybe lenovo is agressive with its pm?
17:36 imirkin: i guess i should make my script print *which* ones were hurt
17:36 karolherbst: nvidia gpus have multiple little co processors on it
17:36 karolherbst: called "falcons"
17:36 karolherbst: and the pmu is one of them
17:36 karolherbst: what basically happens is this: your kernel sends a request to one of them and waits for a reply
17:36 Arbition: right
17:36 karolherbst: but doesn't get one
17:36 karolherbst: and now it just waits forever
17:37 karolherbst: I might have a fix for this already
17:37 karolherbst: I also got such issues
17:37 karolherbst: but more like 1 in 20.000 requests
17:38 karolherbst: Arbition: this patch might help here: https://github.com/karolherbst/nouveau/commit/f159e2910b44c52b89b6512d1213be5d02bdafd9
17:38 Arbition: so might be a while before this makes its way to release candidate kernels
17:39 karolherbst: well
17:39 karolherbst: I have to know if that helps you
17:39 karolherbst: which means you need to compile nouveau yourself :p
17:39 Arbition: Guess I'll have to tool up
17:39 Arbition: to build a kernel
17:39 karolherbst: yeah, but I won't be able to do that tonight
17:39 Arbition: now isn't a good time though
17:39 karolherbst: it is already 2:40 am here
17:39 Arbition: yeah, I was thinking, Germany, would be late
17:39 karolherbst: yes
17:41 karolherbst: but it bothers me why this issue tirggers for you like always :/
17:41 karolherbst: this has all kinds of side effects and stuff
17:42 karolherbst: I wrote that with the fact, that this happens mabe once an hour in normal unstable load use case (with dynamic reclocking) in mind, but not if that triggers like every time :/
17:43 karolherbst: Arbition: could you install envytools?
17:43 karolherbst: I just want to confirm it is the issue I am thinking off
17:45 Arbition: installed
17:45 karolherbst: as root:
17:46 karolherbst: nvapeek 0x10a4cc
17:46 karolherbst: nvapeek 0x10a4c8
17:46 karolherbst: output of both please
17:46 Arbition: before or after trying to change pstate?
17:46 karolherbst: after
17:46 karolherbst: it has to lock
17:47 Arbition: both 00000001
17:48 karolherbst: mhhh
17:48 karolherbst: that's odd
17:50 karolherbst: I am not that good with the pmu though :/
17:51 karolherbst: okay
17:51 karolherbst: lets mess stuff up
17:52 karolherbst: Arbition: nvapoke 0x10a4c8 0x2
17:52 Arbition: ok
17:52 karolherbst: did the echo call return?
17:52 Arbition: no
17:53 karolherbst: nvapeek 0x10a4c8 0x8
17:53 Arbition: 0010a4c8: 00000002 00000001
17:53 karolherbst: mhhhh
17:54 karolherbst: something strange is going on, really
17:54 karolherbst: no idea know
17:54 karolherbst: but we can figure out something tomorrow, but I am not that good in that area, yet
17:55 karolherbst: will go to bed now
17:56 Arbition: ok sleep well
21:02 gnurou: hey everyone - how are files like Mesa's nv50_texture.xml.h generated from rnndb? I cannot find any rule to build it in either envytools or mesa...
21:43 skeggsb: gnurou: from rnndb/, execute "../rnn/headergen graph/g80_3d.xml" (etc)
22:00 gnurou: skeggsb: uh, nice, thanks! I couldn't find a nv50_texture.xml in rnndb, so I suppose the name has changed
22:02 gnurou: skeggsb: finally got textures to (mostly) work with GM2 thanks to help from ahuillet, it turned out to be the texture headers that have completely changed for Maxwell and old headers got obsoleted starting from GM2
22:02 gnurou: now I'm seeing whether I can get permission to release the texture header doc to rnndb...
22:05 gnurou: skeggsb: of course I know this makes little sense if firmware loading doesn't work, but the other good news is that I finally got a debug card and can work on dGPU support for secure boot