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