05:32 karolherbst: mupuf: do you know if nvidia configures the power sensors in some way?
05:42 karolherbst: ahhh very nice
05:42 karolherbst: maybe we should the sensor calculate the avarage values
05:42 karolherbst: the ina219 supports 128 sampes in 68.10 ms
05:43 karolherbst: this makes the power consumption value much more stable
05:50 huehner: karolherbst: do you need any testing of your ina patches on a gmx206?
05:51 karolherbst: huehner: well the i2c systems is locked for now afaik
05:51 karolherbst: not sure though, you can try it out, but I doubt that anything will show up
05:52 huehner: karolherbst: i can give it a try, just playing about with bens/gnurou's gm206 work
05:53 karolherbst: I think I already tried mupufs gm206 and then somebody told me, that special firmware is required to unlock the i2c bus, so I gave up :)
05:54 huehner: karolherbst: i have all the preview gm206 firmware loaded with gnurou published, not sure if that is enough though
05:54 karolherbst: not sure either
05:54 huehner: will give it a try when the piglit run here finishes
05:59 huehner: karolherbst: do you have a branch with those patches applied?
06:00 karolherbst: https://github.com/karolherbst/nouveau/commits/power_sensors
06:26 huehner: karolherbst: don't see anything showing up in `senors` output
06:27 karolherbst: yeah :/
06:27 karolherbst: you could check your vbios though to see if your card has the rails and sensors
06:27 karolherbst: but I am sure the i2c bus is locked for now
06:28 huehner: karolherbst: http://pastebin.com/raw/gj8u863b -> using your to_upstream branch of nvbios
06:30 karolherbst: huehner: what's extdev0?
06:30 huehner: EXTDEV 0: type 0x4e [INA3221] at 0x80 defbus 0
06:30 karolherbst: k
06:30 karolherbst: so it's all there
06:33 karolherbst: huehner: you could check if the i2c stuff contains some sane values
06:34 karolherbst: in this function: https://github.com/karolherbst/nouveau/blob/power_sensors/drm/nouveau/nvkm/subdev/iccsense/base.c#L120
06:34 karolherbst: i2c shouldn't be NULL
06:34 karolherbst: if it is, then there is no i2c nouveau subdev
06:35 karolherbst: and later i2c_bus should be set in the loop
06:51 huehner: karolherbst: in the loop index 0, i get past !r->mode but not past the extdev->parse
06:51 karolherbst: odd
06:52 karolherbst: r->extdev_id is 0?
06:59 huehner: it is
07:00 huehner: hmm
07:00 huehner: dcb version in gm206 is 4.1
07:01 huehner: and that extdev_table looks like it checks for 0x30 + 0x40 let me debug that parsing part a bit more
07:11 huehner: karolherbst: confirmed, and worked around got a i2c bus object now + it recognizes a INA3221
07:12 karolherbst: ohh nice
07:12 karolherbst: so you get a value in sensors?
07:12 huehner: i still do not see new entry in sensors command
07:12 karolherbst: maybe the read on the i2c bus fails
07:13 karolherbst: check what nvkm_iccsense_poll_lane returns
07:13 karolherbst: in nvkm_iccsense_ina3221_read
07:21 huehner: karolherbst: apparently aht 3221_read does never get called
07:22 karolherbst: ohh right, if there is no hwmon file, it can't
07:23 karolherbst: "++iccsense->rail_count" has to be executed
07:23 karolherbst: otherwise the count stays 0 and there is no useable rail
07:24 huehner: just checking those conditions in _read now..
07:24 karolherbst: read won't be called as long as there is no hwmon entry
07:35 huehner: karolherbst: not even hwmon_get_power1_input gets called. so lets go back i only took the last 4 patches of the git repo, + applied those manually on top of gnurou's secboot branch
07:35 huehner: is that enough ?
07:36 karolherbst: should be
07:36 karolherbst: something messes up in nvkm_iccsense_ctor
07:36 karolherbst: you should check if "++iccsense->rail_count;" gets executed at all
07:36 huehner: it gets to the ++rail count
07:36 karolherbst: mhh
07:36 huehner: i added debug there
07:36 karolherbst: and is it 1 afterwards?
07:37 huehner: let me check
07:37 huehner: but that power1_input is the first code reading rail_count and i see it not even get into that function?
07:38 karolherbst: do you have any hwmon entries at all for this gpu?
07:41 huehner: end of ctor rail_count =1
07:41 karolherbst: then something is funny with the hwom init code
07:42 huehner: hwmon -> no, only devices i see at all are: acpiz-virtual-0 which i assume is not cpu + intel coretemp-isa
07:42 karolherbst: k
07:42 huehner: is no cpu -> is not gpu
07:42 karolherbst: then hwmon messes up
07:42 karolherbst: nouveau_hwmon_init in nouveau_hwmon.c
07:42 huehner: that's what i meant by saying not even 'power1_input' gets called ever
07:43 karolherbst: it won't get called when there is no usable sensors anyway
07:44 huehner: let me trace the _init..
07:52 huehner: karolherbst: confirmed -> problem getting !therm in the hwmon_init so never got to iccsense
07:52 huehner: karolherbst: worked around that and now: seeing hwmon + getting some power data
07:53 karolherbst: mhh
07:53 huehner: gpu core 0.91V & power1: 11.09W
07:53 karolherbst: that's odd though
07:54 karolherbst: ohhh
07:54 karolherbst: that function just fails for !therm...
07:54 huehner: so maybe we should not break all of hwmon_init if just some part fails (but skip only the 'non working' sections?
07:54 karolherbst: why...
07:54 huehner: yes
07:54 huehner: note: 2-3 below depend of therm
07:54 karolherbst: yeah I will rework that
07:54 huehner: so maybe as was just easier to code
07:55 huehner: karolherbst: running piglit probably should cause power1 value to change?
07:55 karolherbst: mhhh
07:55 karolherbst: not really
07:55 karolherbst: furmark does
07:55 huehner: no idea how far mesa gm206 is at all piglit did run 50% though before hardlocking
07:55 karolherbst: you could also run glxgears with vsync disabled
07:56 karolherbst: that should cause _some_ power consumption
07:58 huehner: karolherbst: how to get it to not vsync?
07:58 karolherbst: vblank_mode=0
07:59 huehner: works
07:59 huehner: seeing some 1.5w diference then between running it and not
07:59 karolherbst: ...
07:59 karolherbst: mhh
07:59 karolherbst: can you reclock the gpu?
08:00 huehner: how?
08:00 karolherbst: with the pstate thing
08:00 huehner: as i think nobody looked even into that corner of maxwell at all
08:00 karolherbst: no idea if that works on gm2xx gpus though
08:00 karolherbst: well then you should try to run something heavier
08:01 karolherbst: I know that gputest_furmark causes a high power consumption
08:03 huehner: karolherbst: running it in window mode and seeing 15.31W now instead of around 11 in idle
08:04 karolherbst: k, that's good enough for now
08:04 huehner: and 1 cpu core at 100%
08:04 huehner: so looks like your code can get some power data from maxwell gm206
08:04 huehner: needed changed:
08:04 huehner: a.) dcb table version parsing in extdev code -> extend to cover 4.1
08:04 huehner: b.) the !therm in hwmon to not skip all hwmon device
08:09 huehner: karolherbst: what's your plan for b? just create hwmon_device always? a bit ugly as then theoretically we could get a hwmon entry without any attributes
08:09 karolherbst: we have default attributes
08:09 karolherbst: name and something
08:09 karolherbst: :D
08:11 karolherbst: huehner: does nvbios parse extdev 4.1 yet?
08:11 karolherbst: and what are the differences
08:12 huehner: i think extdev point to dcb table and that has version 4.1
08:13 huehner: and dcb parsing does understand 4.1 as i fixed a mini bug in there arlier to get hdmi monitor detection (also i2c) to work
08:13 karolherbst: I meant more from the layout of the table
08:15 huehner: karolherbst: would need to recheck to be sure but afaik table layout is fine, but luckily there is nvidia doc published for both 4.0+4.1,
08:16 karolherbst: k so for extdev there is no change
08:16 karolherbst: good
08:17 karolherbst: https://github.com/karolherbst/nouveau/commits/power_sensors
08:17 huehner: question is why extdev file have that hardcode 0x30 || 0x40 check (not covering the new 0x41) maybe intentional or as it was just good enough to cover all cases (up to gm20x)
08:17 karolherbst: well
08:17 karolherbst: if something changes we want to know
08:17 karolherbst: maybe some layout changes a lot and the parsed data is wrong
08:18 huehner: yes clear
08:18 huehner: but other code is covering 0x41 already now (i.e. i2c.c) just not extdev
08:18 huehner: that's why i assume it is a oversight
08:18 karolherbst: yeah, most likely
08:18 huehner: let me check that 4.1 really changes
08:19 huehner: karolherbst: ftp://download.nvidia.com/open-gpu-doc/DCB/2/DCB-4.x-Specification.html, even has a 4.1 changes section and i do not see text related to i.e. i2c -> power sensor directly(as far as i understand it)
08:21 karolherbst: yeah it will be fine
08:21 karolherbst: you can test the new patches from my branch
08:21 karolherbst: and if everything works, it's good enough
08:22 huehner: patches.. you are to ofast
08:22 huehner: was just about to write the same
08:28 karolherbst: and when I am motivated enough I also add the power sensor configuration bits...
08:28 karolherbst: mhhh
08:28 karolherbst: I messed up?
08:29 karolherbst: ohh no, I just forgot to end the rebase
08:41 huehner: karolherbst: seems to be fine with those 2 patches on top
08:42 karolherbst: k, thanks for verifiying
08:43 huehner: note: i did not test the repo but the 6 patches manually applied/merged on top of gnurou's secboot branch
08:43 huehner: so not sure if that's enough for a tested by on your series
09:04 karolherbst: ohh that's enough
09:05 karolherbst: gm206 was it, right?
09:07 huehner: karolherbst: yes gm206 aka GTX960
09:12 karolherbst: mupuf: seems like it works on maxwell gen2 :) just hwmon was in an old state (required valid therm for everything)
10:39 mupuf: ka
10:39 mupuf: ,
10:39 mupuf: karolherbst: rea,
10:39 mupuf: fuck!
10:39 mupuf: really good news!
12:14 karolherbst: mupuf: yeah the issue with the maxwell thing were kind of trivial though :/
12:16 karolherbst: mupuf: would you like to look over the patches? I think about adding support for configuring the extdevs a bit to increase precision and collected samples to get better data, but this can be done later too
17:39 randomguy: Hi! I have an optimus laptop running Debian testing, any ideas on how could i use nvidia card as default? lspci | grep "VGA" show only intel gpu
17:40 Riastradh: randomguy: You may need to enable the nvidia card in your BIOS setup.
17:42 randomguy: Riastradh: the option in BIOS is not exactly clear: it's something like a tick on "enable the use of gpu switching" option. tried it before and after restart i couldn't see this option in bios, so i've reset it to defaults
19:12 yyxxx:installs 4.4 *drum rolls*