08:09 anYc: Hi, is reclocking useable with NVC0/Fermi? I am using nouveau but never had high demands - just normal desktop apps - but now I need some 3D apps from time to time. Should I switch to the binary drivers? I wouldn't mind switching the levels manually.
12:40 pendingchaos: imirkin or someone who understands GM107+ instruction scheduling: can you explain this?: https://hastebin.com/imojohetew.txt
12:41 pendingchaos: (full shader assembly with instructions of previous paste indented in case it's interesting: https://hastebin.com/humivasoca.txt)
12:49 RSpliet: anYc: currently not I'm afraid. Existing code in various places is WIP and/or stalled in the wake of limited people-power and varying priorities (like Volta bring-up)
12:59 diogenes_: Hi guys, i'm trying to run wine game with DRI_PRIME=1 in terminal and i'm getting: libGL error: unable to load driver: nouveau_dri.so
12:59 diogenes_: but the game starts and i don't know whether it's still using nouveau or intel?
13:00 diogenes_: the full output: http://termbin.com/dx7h
13:18 RSpliet: diogenes_: or worse, it might fall back to software rendering ;-)
13:19 RSpliet: diogenes_: can you try something simpler first... like DRI_PRIME=1 glxinfo - and see if it reports nouveau rendering or llvmpipe/softpipe/whatever software fall-back?
13:19 diogenes_: RSpliet, i ran verbose and it turns out it looks for it in /usr/lib/dri/nouveau_dri.so but on my system it's located in /usr/lib64/dri/nouveau_dri.so
13:19 RSpliet: aha!
13:19 diogenes_: i'll try ln -s
13:20 RSpliet: Well, I was about to type... you might want to also install the 32-bit version of nouveau dri
13:20 RSpliet: As this is likely required by wine and a lot of steam games and the likes
13:20 diogenes_: cool let me try that
13:21 RSpliet: The paths make me suspect it's a centos or fedora system? Shouldn't be a pain to do that
13:21 diogenes_: RSpliet, openSUSE :)
13:21 RSpliet: ah fair enough! I've got blinders on that limit my world to debian/ubuntu and redhat/fedora :-P
13:22 diogenes_: hehe
13:24 diogenes_: RSpliet, YAY!!! just installed Mesa-dri-nouveau-32bit and it works, thanks a lot!
13:25 RSpliet: No worries
13:26 RSpliet: Which graphics card are you playing with, if I may ask?
13:26 RSpliet: oh nm, you've already discovered pstates, so I guess something something Kepler or marginally newer ;-)
13:27 diogenes_: RSpliet, GeForce GT 650M
13:27 diogenes_: GDDR5
13:27 RSpliet: Yeah, I got a discrete one of those in my office. That's a nice card for nouveau
13:27 diogenes_: yes it is
13:28 diogenes_: running nouveau with =15 power mode gives me almost the same performance as with proprietary nvidia, only 2 fps difference
13:28 RSpliet: You might want to install a newer kernel than 4.4 though, there's been some pstate work since that lets you squeeze even more performance out of it (by playing with different boost settings. If you're truly curious karolherbst can probably tell you some more about that)
13:29 RSpliet: Depends on the game, but yeah, nouveau can be pretty good for stuff with relatively simple shaders.
13:29 RSpliet: ... oh god I wish I had time for nouveau again :-C
13:30 diogenes_: RSpliet, later this month my distro will upgrade to 4.16 so till then i'm pretty much satisfied with the nouveau driver, thanks guys for a good job, i'll make a donation in the future.
13:30 RSpliet: Only hardware donations are accepted I think ;-) But no sweat, glad you can use your laptop pain-free!
13:31 diogenes_: :) yes, all open source, no proprietary nvidia, that's an awesome work!
13:46 diogenes_: i was asking yesterday if there is any kind of nouveau monitoring tool (gpu utilization ans so on) and as i was told, there isn't one and indeed there isn't but i've found a different way
13:48 diogenes_: my solution is to run: sensors, if no application is using nouveau, then you get GPU core: N/A, temp1: N?A, but, if there is a running application that uses nouveau, then running sensors it showed me: GPU core: +1.01 V and temp1: +62.0°C.
13:50 RSpliet: diogenes_: this is correct. When no application uses the card it's sent into a deep sleep mode, deep enough not to be able to read out the sensors without waking it up ;-)
13:51 diogenes_: RSpliet, yes i know, that's why i love optimus, no need to use morepower than it's necessary.
13:52 RSpliet: Not sure if a newer kernel has different behaviour, but its undesirable to burn power waking up a sleeping device just to discover its temperature, which we know isn't going to exceed its threshold because unlike humans, chips cool down massively when they're asleep :-P
13:58 diogenes_: RSpliet, actually on ubuntu, nouveau is the only option now to use optimus technology in the right way, afaik the newer kernel don't support bumblebee anymore so you should have that pain called PRIME when you switch to the card you want to use, the re-log to apply the changes and that sucks, so nouveau is the best option.
14:12 RSpliet: I thought ever since nvidia implemented a proper drm driver, that shouldn't be a problem anymore? Idk, never tried tbh
14:22 diogenes_: RSpliet, i personally don't like nvidia's implementation, it turns out that few people who worked on opensource nouveau, did a lot much better work than nvidia's army of well paid developers.
14:48 anYc: RSpliet: ok, thank you
14:59 imirkin: pendingchaos: did you work it out, or need some help?
15:07 karolherbst: mupuf: I have now a spare laptop I could use for CI with a nve6 :)
15:13 pendingchaos: no, I have not
15:14 pendingchaos: would anyone be interested in a patch that allows you to dump both the binaries and the tgsi of shaders and replace the binaries with one's own?
15:16 pendingchaos: (binaries = input of envydis, output of envyas btw)
15:21 pendingchaos: (like MESA_SHADER_*_PATH in https://www.mesa3d.org/shading.html)
16:06 imirkin: pendingchaos: yes, that'd be awesome
16:07 imirkin: something would have to be worked out for number of gpr's
16:07 pendingchaos: would just setting it to 254 be fine?
16:09 imirkin: i guess yeah
16:09 imirkin: or max allowable by isa
16:10 imirkin: oh, except for compute =/
16:10 imirkin: invocations * num gpr <= global gpr file size
16:16 pendingchaos: I think I'll do target->getFileSize(FILE_GPR)
16:16 imirkin: it doesn't have to work 100% of the time, at least initially
16:17 pendingchaos: I assume setting it to 255 would be fine (asking since register 255 seems to be a zero register)?
16:17 imirkin: yes, i think so
16:19 mupuf: karolherbst: laptops are a little annoying to deal with when they crash
16:19 mupuf: but that's a good start for mesa testing
16:19 karolherbst: mupuf: I am aware
16:19 mupuf: with RSpliet, we used the docking connector to be able to press the power button
16:19 karolherbst: mupuf: but you know my old laptop, no?
16:19 mupuf: oh, right :D
16:19 karolherbst: I think I will have no problem adding some additional hardware to it :D
16:20 mupuf: but if you get the battery out and you use a power cutter like intel-gfx-ci does, you can easily make it work
16:20 karolherbst: mhh
16:20 karolherbst: I only need to wire up the power button, no?
16:20 mupuf: nope. there is a bios option to boot when the power comes back
16:20 karolherbst: uhhh
16:20 karolherbst: I see
16:21 mupuf: and I was surprised to find out that this is pretty universal
16:21 karolherbst: I think the firmware/EC of that laptop is pretty much messed up anyway
16:22 pendingchaos: imirkin: it seems setting it to 255 breaks things actually, so I'll cap it at 254
16:24 pendingchaos: maybe things are similar cards that have smaller gpr files
16:25 imirkin: likely.
16:26 imirkin: last gpr is always zero on all G80+ isa's (which is what codegen deals with)
16:53 imirkin: pendingchaos: i looked at your shader ... doesn't seem like there's anything obvious in there. it's overwriting the result of the suld (r4..r7) with r5, but the suld has a wr 0 (write dep bar), and the mov $r5 waits on that barrier, so ... odd.
16:53 imirkin: perhaps the st has to be higher in the suld?
16:53 imirkin: could also start sticking yl all over the place -- afaik blob always does yl
16:53 imirkin: (yl = yield)
16:57 pendingchaos: changing the suld's (st 0x1 wr 0x0) to (st 0x2 wr 0x0) seems to fix the issue
16:58 pendingchaos: not sure why, why did you suggest it?
16:58 imirkin: well, you said that sticking a nop in there worked
16:58 imirkin: which does nothing, but you had (st 0x1) there
16:59 imirkin: 1+1 = 2, so ... :)
17:00 imirkin: it definitely goes a little counter to my understanding of how this stuff works
17:01 imirkin: i forget how the barriers get reset
17:01 imirkin: iirc if you do (wr 0x1) and then a bunch of (wt 0x0), it all works out
17:01 imirkin: question is ... what happens if you do (wr 0x1) (wr 0x1) -- does the write wait for the previous barrier to be signaled?
17:02 imirkin: basically what causes the signaled -> not-signalled transition
17:02 pendingchaos: I've got to go, I'll be back in ~2 hours or so
17:03 imirkin: k, ttyl
17:03 imirkin: hakzsam: do you remember this stuff clearly in any way?
17:05 imirkin: pendingchaos: https://github.com/NervanaSystems/maxas/wiki/Control-Codes
17:05 imirkin: "Barriers take one additional clock cycle to become active on top of the clock consumed by the instruction doing the setting. So you may need to also use a stall count of 2 if you intend to wait with the subsequent instruction."
17:05 imirkin: probably need to adjust the auto-sched-code generator
17:05 imirkin: if that rule's not there already
17:06 karolherbst: you are hitting a bug inside the sched calculator?
17:07 imirkin: not sure
17:07 imirkin: i think he may have been doing this by hand
17:08 karolherbst: I see
17:08 karolherbst: imirkin: anyway, ping on that RA regression ;)
17:09 imirkin: let's assume i have no recollection of "that"
17:09 imirkin: care to remind me?
17:10 karolherbst: https://lists.freedesktop.org/archives/mesa-dev/2018-May/193851.html
17:10 karolherbst: you know, that return; thing
17:10 imirkin: oh right yes
17:10 imirkin: let me have a look
17:10 pendingchaos: the failing code is generated with some nops thrown in
17:10 pendingchaos: I think there was also mention of stalls >12 needed a yield flag in there too? I'm not sure if the sched calculate takes than into account
17:10 pendingchaos: (I probably won't be available for long)
17:10 imirkin: pendingchaos: yes, there was such a mention
17:10 imirkin: and yes, i don't think it does
17:11 imirkin: but iirc blob just throws yield flag in everywhere nowadays
17:11 imirkin: i guess they decided it was beneficial in the average case too
17:13 karolherbst: imirkin: or doesn't matter
17:14 imirkin: karolherbst: you got an example of the RA fail?
17:14 karolherbst: imirkin: everything which spills
17:15 karolherbst: but I don't think I have any glsl example
17:15 imirkin: got a concrete example? :)
17:15 karolherbst: but should be failry easy to trigger
17:15 karolherbst: just load something where you have more than 255 live values
17:16 imirkin: yeah that stinks. but i could reduce the reg count
17:16 imirkin: to e.g. 8
17:16 karolherbst: ohh, yeah
17:16 karolherbst: but this might cause other issues
17:16 imirkin: and what's the failure?
17:16 karolherbst: RA fails
17:16 karolherbst: no spill candidate
17:16 imirkin: right.
17:17 pendingchaos:disappears
17:17 imirkin: poof. where'd he go...
17:19 imirkin: so anyways... because i move the def right next to the merge
17:19 imirkin: if the merge can't spill, then that *effectively* means that its args can't spill
17:20 imirkin: (they can, but it won't do any good to reducing register pressure)
17:20 imirkin: so the question is ... will this be OK for the tex
17:20 imirkin: on nv50
17:21 karolherbst: I can check on a tesla GPU if the stuff is still fixed though
17:21 imirkin: i have one plugged in
17:21 karolherbst: ahh
17:21 imirkin: i just need to think for a bit
17:22 imirkin: question is -- should that noSpill thing just get dumped entirely
17:22 mangix: quick question, is inability to turn the display back on after the screen gets blanked by GNOME a known issue?
17:23 imirkin: no
17:23 mangix: should I try debugging with nouveau.debug?
17:23 imirkin: you could describe the issue...
17:25 mangix: so GNOME blanks the screen after 5 minutes. Moving the mouse or pressing keyboard buttons or really anything doesn't turn the screen back on
17:25 mangix: the good news is, no kernel panic or anything so I can do ctrl+alt+f7 and ctrl+alt+del to restart the system safely
17:26 mangix: screen comes back of course
17:27 imirkin: anything in xorg log?
17:28 imirkin: what about ctrl+alt+f1 and then ctrl+alt+f7 (or f4 or whatever vt X is on by default)
17:28 imirkin: also what GPU is this?
17:31 mangix: maxwell 980
17:33 imirkin: mangix: and how are the screens connected?
17:34 mangix: this is a laptop, so eDP
17:34 mangix: this is not a 980m btw
17:35 imirkin: ok. do you have an xorg log from after the problem happens?
17:36 imirkin: and do you have a second computer?
17:37 mangix: no and yes
17:38 mangix: i can get one
17:41 imirkin: well if you ssh in while the issue is occurring
17:41 imirkin: then it's easier to figure out wtf is going on
17:41 mangix: oh I see
17:41 imirkin: oh, also are you using a recent kernel?
17:41 mangix: 4.16
17:41 imirkin: if not, i think some people had various issues
17:41 imirkin: ok, 4.16 should be good
17:41 imirkin: although SOMEONE had issues with a GM204 actually
17:41 imirkin: (was it you?)
17:41 imirkin: retrieving EDID
17:41 mangix: no. I have not been in here for almost a year
17:42 imirkin: although stuff like dpms is similar
17:42 mangix: uhhhh
17:42 mangix: I did report an i2c bug a while back
17:42 imirkin: https://bugs.freedesktop.org/show_bug.cgi?id=103351
17:42 mangix: which got fixed
17:42 imirkin: right yeah
17:42 mangix: an not me
17:42 imirkin: but someone's reporting issues with that fix
17:44 mangix: interesting...
17:44 mangix: so 13a86519202c5d119d83640d6f781f3181205d2c did indeed fix nouveau for me
17:47 mangix: in any case this seems like a different issue
17:50 imirkin: pendingchaos: looks like the sched calculator takes care of this -- https://hastebin.com/ajisivamil.php
17:56 mangix: alright
17:56 mangix: so screen is not turning on
17:57 imirkin: right
17:57 imirkin: are you ssh'd in?
17:57 imirkin: [from another box]
17:57 mangix: bah i forgot to turn ssh on
18:01 mangix: k screen is off
18:02 imirkin: remembered to turn ssh on this time? :)
18:02 mangix: yeah i did. it's woeking
18:02 mangix: working
18:02 imirkin: cool. so now grab the xorg log, and put it up in a hastebin
18:04 mangix: oh wait. I'm running wayland
18:04 imirkin: ahhh
18:04 mangix: there's no Xorg.log file
18:04 imirkin: sorry, can't help =/
18:04 mangix: will redo on X
18:04 imirkin: [not that i have anything against people using wayland, i just know nothing about how to operate or debug it]
18:05 imirkin: you could ask in the wayland support chans for assistance perhaps? not sure.
18:08 mangix: Well, same thing happens on X
18:08 imirkin: yay
18:08 imirkin: (sorta)
18:10 mangix: imirkin: https://pastebin.com/XNUsiSM6
18:11 mangix: screen blank is set to a minute
18:11 mangix: hence the 154 enty
18:11 mangix: *entry
18:13 imirkin: mangix: DISPLAY=:0 xrandr
18:13 imirkin: (pastebin results)
18:15 mangix: https://pastebin.com/EZxCbphm
18:16 imirkin: mangix: ok, let's try this: DISPLAY=:0 xrandr --output eDP-1 --off and then DISPLAY=:0 xrandr --output eDP-1 --auto
18:19 mangix: still nothing
18:19 mangix: i'm assuming no root needed
18:19 imirkin: nope
18:19 imirkin: mangix: DISPLAY=:0 xrandr -s 1920x1080
18:21 mangix: nope
18:22 mangix: the screen is black
18:22 mangix: the backlight isn't even on
18:22 imirkin: hmmmmmmmmmmmmm
18:22 imirkin: i wonder if that's it
18:22 imirkin: can you kinda tell if things are displaying despite the lack of backlight?
18:23 imirkin: (e.g. shine a flashlight onto the screen if you got one)
18:23 mangix: nope
18:24 mangix: the screen is no different than if the laptop were off
18:24 mangix: so
18:24 imirkin: check if you have a backlight property
18:24 imirkin: like in /sys/class/backlight
18:24 imirkin: or something
18:24 imirkin: and see if you can flip it on manually
18:24 mangix: when the dimming happens, first is becomes black with the backlight turned on
18:24 mangix: then the backlight turns off
18:25 mangix: there's an nv_backlight yes
18:26 imirkin: is there stuff in there?
18:26 mangix: yeah there's an entry called bl_power
18:26 mangix: i'm trying to flip it to 1
18:27 mangix: sudo echo 1 > bl_power is giving me permission denied
18:27 imirkin: yeah... is there anything else in there?
18:27 imirkin: sudo su -
18:27 imirkin: then echo
18:28 imirkin: or some people cleverly do echo 1 | sudo tee bl_power
18:28 imirkin: i just like having root shells around instead of dicking around with sudo
18:31 mangix: i agree, but fedora decided to get rid of it like ubuntu
18:31 mangix: anyway
18:31 mangix: i tried setting bl_power to 1
18:31 mangix: nothing
18:31 mangix: oh
18:31 mangix: bl_power of 0 is supposed to be on
18:32 imirkin: normally there's a brightness setting
18:32 mangix: yeah it's set to 61
18:32 imirkin: hmmm
18:32 imirkin: ok
18:32 mangix: both actual and brightness
18:32 imirkin: so when did this happen?
18:33 mangix: after GNOME blanked the screen
18:33 imirkin: i meant more like ... after upgrading what
18:34 mangix: that...is an interesting question. I think I've always had this problem. I just worked around it by disabling screen blanking in GNOME
18:34 imirkin: ah. super.
18:34 imirkin: well, it'd probably be interesting to get a debug session of the blanking/unblanking stuff
18:34 imirkin: skeggsb is the one who really understands this stuff
18:34 imirkin: so try to get his attention.
18:34 mangix: will do
18:35 imirkin: he's in australia, so he's likely still asleep
18:35 mangix: what was the kernel command line again?
18:35 imirkin: [and tends to not be around on weekends]
18:35 imirkin: you could try like nouveau.debug=i2c=debug,disp=debug drm.debug=0x1e
18:47 mangix: alright
18:47 mangix: output created
18:47 mangix: let's see what's in there...
18:49 mangix: no idea
18:51 mangix: so from what I can tell, nouveau thinks the screen comes back on
18:52 mangix: https://gist.github.com/neheb/49f3a5f7173fe8eab88e494ff631f2a9
18:53 mangix: 40 > 45 is where I move the mouse
20:06 pendingchaos: turns out another difference (aside from adding the nops) from the code I gave and what was generated was that I added the (wt: 0x1) and then forgot about it
20:07 pendingchaos: so the code that was actually being generated is: https://hastebin.com/idexupafiw.txt
20:08 pendingchaos: it seems the code generator is failing to recognize that the "mov" needs a barrier to wait for the suld to finish
20:09 pendingchaos: perhaps SchedDataCalculateGM107::firstFirstUse() should check both "insn"'s sources and definitions?
20:09 imirkin: so ... internally it knows that that's $r4q right?
20:09 imirkin: this is a WaW
20:10 pendingchaos: that suld writes to r4-r7? yes
20:10 pendingchaos: I think WaW is correct
20:10 imirkin: so it should detect that
20:10 imirkin: and throw in a barrier
20:10 imirkin: if it doesn't, that's bad :)
20:14 pendingchaos: does the modification of findFirstUse() solution sound good?
20:24 imirkin: pendingchaos: pppprobably. yes.
20:24 imirkin: would have to check where else it's called
20:25 gnarface: so, supposedly some new version of the Spectre attack can "reveal firmware secrets" ... does that mean there's a chance this could be used to provide insight into the nvidia binary blob and/or firmware that wasn't possible before?
20:25 pendingchaos: just at write barrier creation and placement
20:26 imirkin: gnarface: no.
20:26 gnarface: oh, drat
20:29 imirkin: pendingchaos: yeah, looks like modifying findFirstUse to essentially contain findFirstDef makes sense
20:30 imirkin: to prevent WaW in general
20:30 pendingchaos: I don't think I'll literally use findFirstDef() in findFirstUse() btw
20:34 imirkin: right, that won't work exactly
20:34 imirkin: either refactor, or just copy. wtvr.
20:34 imirkin: i'm not picky
20:34 imirkin: comment update would be nice though
21:05 pendingchaos: imirkin: both the WaW and shader dump/replacement patches sent
21:05 pendingchaos: forgot to add "nv50/ir: " or something for the WaW though
21:14 imirkin: ok thanks