09:38 Ingvix: Hey, I got this mess of a optimus setup with all external outputs being wired to only nvidia gpu and intel can only use the internal display. So is there any hope for me to get a somewhat battery-preserving solution with a possibility of easily connecting to an external display if needed? Is reverse prime the best solution though it would continuously use both cards? I had hoped to use only intel
09:38 Ingvix: gpu when using no external displays. Is there any change nouveau could provide access to the external outputs with the normal PRIME?
09:46 karolherbst: Ingvix: nope, as long as the outputs are on the nvidia GPU, it has to be on while using the outputs
09:46 karolherbst: but
09:46 karolherbst: if you don't use displays, the nvidia GPU should be off and shouldn't consume any power
10:41 Ingvix: in optimus-manager's wiki seems to be indicated that with nouveau loaded with intel mode, you may gain access to video outputs wired to nvidia gpu but I'm not sure if it does normal or reversed prime with that configuration. Under Configuration 2: PCI power control: https://github.com/Askannz/optimus-manager/wiki/A-guide--to-power-management-options
10:42 Ingvix: I'll probably be testing later unless someone can give me a definitive answer before that
11:00 karolherbst: Ingvix: why are you botherthing with optimus-manager?
11:01 Ingvix: karolherbst, just getting to know my options
11:01 Ingvix: I'm not using it currently
11:02 karolherbst: Ingvix: well, you won't need anything additional
11:02 karolherbst: it just works out of the box
11:02 Ingvix: what does, exactly?
11:02 karolherbst: reverse prime and prime
11:04 Ingvix: but that doesn't really answer to my question about the battery-preserving case with access to nvidia gpu outputs
13:45 imirkin: Ingvix: unless you explicitly disable it, nouveau will automatically auto-suspend your GPU when it's not in use.
13:45 imirkin: this is known as "runtime pm" or "runpm"
13:45 imirkin: (and relies on the platform allowing this, but most laptops do)
13:46 Ingvix: yeah, I read about it. What I don't know yet if I can access the nvidia gpu wired outputs while using prime
13:47 imirkin: sure
13:47 imirkin: this is known as "reverse prime"
13:48 Ingvix: but isn't nvidia gpu then always active? I was specifically asking about non-reverse prime
13:48 imirkin: if the output is turned on, the gpu has to be active.
13:48 imirkin: there's no way around that.
13:49 Ingvix: yeah, but I want it only when I'm using an external display and when using the internal that intel can handle by itself, I'd want nvidia gpu to be at rest which isn't the case with reverse prime, if I understood correctly
13:50 imirkin: if the display is off, then nouveau can suspend the gpu
13:51 imirkin: (it waits like 5s i think? to avoid too much on/off activity)
13:51 Ingvix: are you now talking about regular or reverse prime?
13:51 Ingvix: or both
13:52 imirkin: prime is just a set of software interfaces
13:52 imirkin: the gpu doesn't give a shit about any of that
13:52 imirkin: either it's being used or it's not
13:52 imirkin: if it's not, it can auto-suspend itself
13:52 imirkin: "used" is defined as "output enabled" or "rendering commands running"
13:53 imirkin: so if you're using "prime" to offload computation onto the nvidia GPU, it will turn on
13:53 imirkin: if you use "reverse prime" to enable an output on the nvidia GPU, it will turn on
13:53 imirkin: if neither of these are currently happening, it will auto-suspend
13:55 karolherbst: (there are some laptops with firmware workarounds to disable the power savings though)
13:55 karolherbst: in case you noticed a high power consumption
13:55 imirkin: there are always exceptions
13:55 imirkin: but they're rare
13:55 karolherbst: imirkin: the ones I talk about are not rare
13:56 imirkin: and when issues are discovered, work is performed to fix them
13:56 karolherbst: canonical worked with vendors to add those instead of working with us on a fix...
13:56 imirkin: karolherbst: you're talking about those Linux-Bla acpi strings?
13:56 karolherbst: yes
13:56 Ingvix: Okay, I'm just a bit confused with all this. I don't think I fully understand the meaning of source and sink in the context. Source is the one that processes and sends the image to sink that just renders the image to display? Is this correct?
13:56 karolherbst: Ingvix: ignore xrandr
13:56 karolherbst: it should work out of the box
13:56 karolherbst: if not, file a bug against your desktop
13:56 imirkin: Ingvix: generally yes. but the act of stuff being hooked up doesn't actually cause the secondary gpu to be "enabled"
13:56 imirkin: you have to actually be using it
13:57 karolherbst: Ingvix: for you there is nothing to do really
13:57 karolherbst: it should just work
13:57 karolherbst: and if not, then you can report the bug :)
13:58 Ingvix: karolherbst, I just want to understand the power-management aspect in this.
13:58 karolherbst: Ingvix: quite simple: if you don't use the GPU, it should get turned of
13:58 karolherbst: if you use it, it gets power on and set up for whatever thing you plan to do with it
13:59 karolherbst: there is really not more to it
14:00 karolherbst: like you have no external displays and don't use the nvidia GPU for rendering, but it's still on and consumes power -> bug
14:00 Ingvix: so with reverse prime when I believe nouveau is the sink, the nvidia gpu isn't actually used unless I use one of the outputs wired only to nvidia gpu?
14:01 karolherbst: yes
14:01 imirkin: Ingvix: nvidia "gpu" and "display" are part of the same chip though, so the chip has to be powered on.
14:01 Ingvix: okay, cool
14:03 Ingvix: Do you know if it's possible to have two x sessions at the same time, one using nouveau and the other nvidia's driver?
14:03 karolherbst: not possible
14:03 Ingvix: alright
14:04 karolherbst: well... maybe with two GPUs... but I doubt anybody tested that yet
14:04 Ingvix: yeah but not with optimus anyway
14:04 Ingvix: with only one nvidia card
14:05 imirkin: they use separate kernel drivers
14:05 imirkin: it should be possible to set things up so that one kernel driver binds to one gpu, and the other binds to the other, but like karol said, it's never been done
14:09 Ingvix: I was just dreaming of a setup where I could use all the video outputs with the power-saving benefits and also have the possibility to start another x session on demand with nvidia driver in case of intensive gpu needs. Though I'm not sure if nouveau's enough for my need alone. So next I ask if I can have two x sessions, one with reverse prime and the other nouveau alone?
14:09 imirkin: reverse prime is still nouveau
14:09 imirkin: if you're using the output, the chip is turned on
14:09 imirkin: so you don't get power-saving.
14:13 Ingvix: oh, okay so after all I can't get a setup where I'm using only intel gpu when using only the internal display and nouveau when I need one of the outputs wired to only nvidia gpu. Without starting a new x session with a different configuration, that is
14:13 imirkin: no, you can
14:13 imirkin: perhaps i misunderstood what you saying
14:14 imirkin: you said "a setup where I could use all the video outputs"
14:14 imirkin: if you're using all the video outputs, then the chip has to be on to drive them.
14:14 imirkin: if you're not actually driving those outputs, but they're sorta there to be used, then the chip can be powered off.
14:15 Ingvix: I see
14:17 Ingvix: yeah, I want the power-saving only when using the internal display. If I'm using external displays, I either got my laptop plugged or it's only for a brief moment
14:17 imirkin: makes sense
14:17 imirkin: so it should Just Work (tm)
14:17 Ingvix: cool
14:20 karolherbst: "FMUL.FTZ R4, R4, UR0 ;" :) I am getting there
14:20 imirkin: karolherbst: will be interesting to see if it moves the needle anywhere
14:21 karolherbst: my hope is that we are able to reduce the amount of needed gprs
14:21 karolherbst: ugprs are "free" to use
14:22 karolherbst: anyway.. I have 2 emited fmuls using uniform registers in a pixmark_piano shader...
14:22 karolherbst: :D
14:22 karolherbst: and outside the loops :/
14:22 karolherbst: but there is sooo much codegen stuff needs fixing
14:22 karolherbst: like loadpropagation
14:22 imirkin: sure
14:23 imirkin: btw - fun fact - there's ->isUniform() but you can't use it pre-ssa
14:23 karolherbst: 4: ld u32 $ur0 c0[0x0] (16)
14:23 karolherbst: 15: mul ftz f32 $r4 $r4 $ur0 (16)
14:23 karolherbst: :/
14:23 imirkin: (well, you can, but it's unlikely to tell you what you want to hear)
14:23 imirkin: you should update isUniform to treat your new register file as uniform too
14:23 karolherbst: ohh, maybe
14:24 Ingvix: one thing I'd still like to know is when using reverse prime and I'm having, say a game on an external display, wired to nvidia card, is the image created by intel or nvidia? as in which one is doing the heavy-duty here?
14:24 karolherbst: imirkin: it's already handled :D
14:24 imirkin: Ingvix: you can decide that
14:24 imirkin: Ingvix: prime and reverse prime are orthogonal concepts
14:24 karolherbst: imirkin: Symbol::isUniform seems... bogus?
14:24 imirkin: karolherbst: no clue.
14:24 Ingvix: right, sort of forgot the point of prime for a moment
14:25 imirkin: karolherbst: sysvals are symbols, most are uniform?
14:25 karolherbst: yeah.. but you can't load a sysval into uniform regs directly
14:25 karolherbst: ohh wait
14:25 karolherbst: you can
14:25 karolherbst: mhhh, interesting
14:26 Ingvix: is there a way I can easily check if nvidia gpu is at rest or active?
14:27 karolherbst: Ingvix: there is a power/ directory for each device under /sys/bus/...
14:27 karolherbst: and one file called "runtime_status" or something
14:27 imirkin: Ingvix: vgaswitcherro is easier
14:27 imirkin: vgaswitcheroo*
14:27 karolherbst: uhmm. right
14:27 imirkin: in /sys/kernel/debug/vgaswitcheroo/status iirc?
14:27 karolherbst: cat /sys/kernel/debug/vgaswitcheroo/switch
14:27 imirkin:was close
14:30 Ingvix: I'm not currently using nouveau and it doesn't exist. Does it appear when using nouveau or do I need laptop-mode or something
14:31 Ingvix: hmm, I got it already installed so probably not laptop-mode. It just got a module with the same name
14:36 karolherbst: Ingvix: your setup might be a little funky with all the additional software you might used in the past?
14:36 karolherbst: nouveau needs to be loaded for it to work
14:36 karolherbst: but if you have bumblebee/bbswitch or whatever thing installed, they do tricks to mess around with stuff
14:37 Ingvix: yeah, okay. I think it's just cause it's not loaded
17:36 enyc:would like to know, GT218 [GeForce 210] ... previousily (ubuntu 16.04/mint-18.3) [kernel 4.4, or updated to 4.15], this has worked okay under Nouveau *and* nvidia-340 driver.
17:37 enyc: uerm -- would like to know opinions please -- is this likely to still be as good as any under nouveau and (still supported seemingly) nvidia driver, in 20.04/mint-20, kernel * 5.4 * particularly curious if nouveau changed much in that regard/timescale.
17:37 enyc: in any case will be getting them to try, just wondered (in particular) if Nouveau suffers the "older cards get messed up support" problem that nvidia-driver has!
17:38 karolherbst: enyc: performance is still an annoying issue and nouveau generally has more bugs, but yeah.. without nvidia supporting your device anymore you don't have many options
17:38 enyc: karolherbst: interestingly, i notice, it seems nvidia-340 driver is supported across many ubuntu-releases, become an LTS of sorts, before that I recall nvidia drivers going out of fashion much more quickly
17:39 karolherbst: well.. they do update against new interfaces from time to time
17:39 karolherbst: I think the latest 340 compiles against 5.0?
17:39 ericonr: the nvidia-340 drivers broke somewhere between 5.4 and 5.7
17:39 enyc: I was particularly wondering if thre esi something resembling "nouveau changelog" which is not yet apparent to me
17:39 ericonr: they still compile against 5.4
17:39 imirkin: enyc: nouveau should continue to work as well as it ever has on that GPU
17:40 enyc: ericonr: useful to know too, thankyou
17:40 karolherbst: enyc: not really
17:40 ericonr: needs some patches to compile for 5.7
17:40 enyc: imirkin: ok thankyou too!
17:40 enyc:meows
17:40 imirkin: enyc: as of a fairly long time ago, reclocking should be supported too
17:40 enyc: OK got my useful answers!
17:40 imirkin: but even clock-for-clock, nouveau performs worse than nviida
17:40 enyc: imirkin: reclocking as in power saving?
17:41 imirkin: enyc: more like the opposite - power using ;)
17:41 enyc: aah i see
17:41 enyc: ok
17:41 imirkin: usually those GPUs boot up to lower frequencies
17:41 enyc: Thaknyou all, very helpful!.
17:41 imirkin: reclocking is the act of changing frequencies (up or down)
17:41 enyc: Since I'm getting helpful answers!!!!
17:41 enyc: Any opinions on GT218 [GeForce 210] vs Intel-integral-graphics on Core-2-Duo era chips?
17:42 imirkin: the geforce 210 should be much better
17:42 enyc: imirkin: OK thats what i *suspected* we will find out in practice
17:42 imirkin: core2 duo is a gen4 or gen4.5 chip
17:42 imirkin: which was ... shit.
17:42 enyc: in friends' case, a case of Cinnamon or MATE destop ;p
17:45 imirkin: not that geforce 210 is some sort of powerhouse
17:45 imirkin: but at least it exposes GL 3.3, while gen4 gets you GL 2.1
17:46 imirkin: (technically it could do GL 3.3, but no drivers support this - neither linux nor windows)
17:46 enyc: imirkin: it was deliberately purchased cheaply ages ago, as a fanless card to use to support dual-monitors nicely in said core-2 era machine being used email/web type usage.
17:47 imirkin: yep, makes sense
17:49 imirkin: as always, the proof is in the pudding ... try it out, see if it works for you
17:50 enyc: imirkin: said friends have 2* core-2 era machines, desktop, laptop
17:50 enyc: imirkin: then the 3rd core-2 machine died of old age (capacitors, etc, rather than ram/cpu fault), replaced with a Thinkpad-L450 with 1080p IPS screen....!
17:51 imirkin: wave of the future
17:51 enyc: imirkin: which, confusingly, probably to be used as this 3rd tv-attached machine rather than as a "main" machine because of its' tv-matching-resolution ;p
17:51 imirkin: isn't that all that laptops are used for -- watching movies?
17:51 enyc: hey-ho!
17:51 enyc: imirkin: no
17:52 imirkin: ever since they became widescreen, can't actually use them to do work
17:52 imirkin: so what else is there
17:53 imirkin: (and it's not so much that they got wider screens, it's that the screens became smaller as a result, since a 14" 16:9 screen is a lot smaller than a 14" 4:3 screen)
17:53 enyc: imirkin: vmmgh I know, i like my tablet-thinkpads! I want to attach a 2nd screen to top of my x201-tablet screen somehow, a clip-on!
18:01 imirkin: i was a huge fan of the t42
18:01 imirkin: all downhill from there
18:02 Tom^: x230 with the x220 keyboard modded is quite sweet :p
18:03 Tom^: got it here waiting for the nitrocaster addon board to solder on an then its 1080p ips panel time too!
19:10 karolherbst: imirkin: mhhh.. regs.getMaxAssigned(FILE_UGPR) returns bogus values :/
19:10 imirkin: i forget how that works
19:11 karolherbst: well.. it reads from fill which gets filled...
19:12 karolherbst: maybe I forgot to do something
19:14 karolherbst: ohh.. I think I see it
19:14 karolherbst: TargetNVC0::getFileUnit needs to return 2 :)
19:14 imirkin: yes.
19:14 imirkin: it does.
19:15 karolherbst: ../nouveau_shaderdb/gputest_pixmark_piano/merged/36e4a6751c12e5ebc10a2039a8b6bc463fe2e88b.shader_test - type: 1, local: 0, shared: 0, gpr: 82, ugpr: 2, inst: 2976, bytes: 47616 :)
19:15 karolherbst: I guess I should fix loadpropagation...
19:17 karolherbst: yeah well.. ../nouveau_shaderdb/gputest_pixmark_piano/merged/36e4a6751c12e5ebc10a2039a8b6bc463fe2e88b.shader_test - type: 1, local: 0, shared: 0, gpr: 82, ugpr: 0, inst: 2969, bytes: 47504
19:17 karolherbst: :D
19:18 karolherbst: don't support U* instructions yet so all of that doesn't help with working load propagation
20:18 enyc: Tom^: i hear is a pain to get decent quality ips panels, you get lots of manufacturing-rejects ...........
22:58 karolherbst: ahhh.. flattening eats my setps
22:58 karolherbst: "set u8 $p0 ge s32 $r1 $ur0"