09:38Ingvix: 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:38Ingvix: gpu when using no external displays. Is there any change nouveau could provide access to the external outputs with the normal PRIME?
09:46karolherbst: Ingvix: nope, as long as the outputs are on the nvidia GPU, it has to be on while using the outputs
09:46karolherbst: if you don't use displays, the nvidia GPU should be off and shouldn't consume any power
10:41Ingvix: 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:42Ingvix: I'll probably be testing later unless someone can give me a definitive answer before that
11:00karolherbst: Ingvix: why are you botherthing with optimus-manager?
11:01Ingvix: karolherbst, just getting to know my options
11:01Ingvix: I'm not using it currently
11:02karolherbst: Ingvix: well, you won't need anything additional
11:02karolherbst: it just works out of the box
11:02Ingvix: what does, exactly?
11:02karolherbst: reverse prime and prime
11:04Ingvix: but that doesn't really answer to my question about the battery-preserving case with access to nvidia gpu outputs
13:45imirkin: Ingvix: unless you explicitly disable it, nouveau will automatically auto-suspend your GPU when it's not in use.
13:45imirkin: this is known as "runtime pm" or "runpm"
13:45imirkin: (and relies on the platform allowing this, but most laptops do)
13:46Ingvix: yeah, I read about it. What I don't know yet if I can access the nvidia gpu wired outputs while using prime
13:47imirkin: this is known as "reverse prime"
13:48Ingvix: but isn't nvidia gpu then always active? I was specifically asking about non-reverse prime
13:48imirkin: if the output is turned on, the gpu has to be active.
13:48imirkin: there's no way around that.
13:49Ingvix: 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:50imirkin: if the display is off, then nouveau can suspend the gpu
13:51imirkin: (it waits like 5s i think? to avoid too much on/off activity)
13:51Ingvix: are you now talking about regular or reverse prime?
13:51Ingvix: or both
13:52imirkin: prime is just a set of software interfaces
13:52imirkin: the gpu doesn't give a shit about any of that
13:52imirkin: either it's being used or it's not
13:52imirkin: if it's not, it can auto-suspend itself
13:52imirkin: "used" is defined as "output enabled" or "rendering commands running"
13:53imirkin: so if you're using "prime" to offload computation onto the nvidia GPU, it will turn on
13:53imirkin: if you use "reverse prime" to enable an output on the nvidia GPU, it will turn on
13:53imirkin: if neither of these are currently happening, it will auto-suspend
13:55karolherbst: (there are some laptops with firmware workarounds to disable the power savings though)
13:55karolherbst: in case you noticed a high power consumption
13:55imirkin: there are always exceptions
13:55imirkin: but they're rare
13:55karolherbst: imirkin: the ones I talk about are not rare
13:56imirkin: and when issues are discovered, work is performed to fix them
13:56karolherbst: canonical worked with vendors to add those instead of working with us on a fix...
13:56imirkin: karolherbst: you're talking about those Linux-Bla acpi strings?
13:56Ingvix: 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:56karolherbst: Ingvix: ignore xrandr
13:56karolherbst: it should work out of the box
13:56karolherbst: if not, file a bug against your desktop
13:56imirkin: Ingvix: generally yes. but the act of stuff being hooked up doesn't actually cause the secondary gpu to be "enabled"
13:56imirkin: you have to actually be using it
13:57karolherbst: Ingvix: for you there is nothing to do really
13:57karolherbst: it should just work
13:57karolherbst: and if not, then you can report the bug :)
13:58Ingvix: karolherbst, I just want to understand the power-management aspect in this.
13:58karolherbst: Ingvix: quite simple: if you don't use the GPU, it should get turned of
13:58karolherbst: if you use it, it gets power on and set up for whatever thing you plan to do with it
13:59karolherbst: there is really not more to it
14:00karolherbst: 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:00Ingvix: 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:01imirkin: Ingvix: nvidia "gpu" and "display" are part of the same chip though, so the chip has to be powered on.
14:01Ingvix: okay, cool
14:03Ingvix: 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:03karolherbst: not possible
14:04karolherbst: well... maybe with two GPUs... but I doubt anybody tested that yet
14:04Ingvix: yeah but not with optimus anyway
14:04Ingvix: with only one nvidia card
14:05imirkin: they use separate kernel drivers
14:05imirkin: 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:09Ingvix: 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:09imirkin: reverse prime is still nouveau
14:09imirkin: if you're using the output, the chip is turned on
14:09imirkin: so you don't get power-saving.
14:13Ingvix: 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:13imirkin: no, you can
14:13imirkin: perhaps i misunderstood what you saying
14:14imirkin: you said "a setup where I could use all the video outputs"
14:14imirkin: if you're using all the video outputs, then the chip has to be on to drive them.
14:14imirkin: if you're not actually driving those outputs, but they're sorta there to be used, then the chip can be powered off.
14:15Ingvix: I see
14:17Ingvix: 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:17imirkin: makes sense
14:17imirkin: so it should Just Work (tm)
14:20karolherbst: "FMUL.FTZ R4, R4, UR0 ;" :) I am getting there
14:20imirkin: karolherbst: will be interesting to see if it moves the needle anywhere
14:21karolherbst: my hope is that we are able to reduce the amount of needed gprs
14:21karolherbst: ugprs are "free" to use
14:22karolherbst: anyway.. I have 2 emited fmuls using uniform registers in a pixmark_piano shader...
14:22karolherbst: and outside the loops :/
14:22karolherbst: but there is sooo much codegen stuff needs fixing
14:22karolherbst: like loadpropagation
14:23imirkin: btw - fun fact - there's ->isUniform() but you can't use it pre-ssa
14:23karolherbst: 4: ld u32 $ur0 c0[0x0] (16)
14:23karolherbst: 15: mul ftz f32 $r4 $r4 $ur0 (16)
14:23imirkin: (well, you can, but it's unlikely to tell you what you want to hear)
14:23imirkin: you should update isUniform to treat your new register file as uniform too
14:23karolherbst: ohh, maybe
14:24Ingvix: 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:24karolherbst: imirkin: it's already handled :D
14:24imirkin: Ingvix: you can decide that
14:24imirkin: Ingvix: prime and reverse prime are orthogonal concepts
14:24karolherbst: imirkin: Symbol::isUniform seems... bogus?
14:24imirkin: karolherbst: no clue.
14:24Ingvix: right, sort of forgot the point of prime for a moment
14:25imirkin: karolherbst: sysvals are symbols, most are uniform?
14:25karolherbst: yeah.. but you can't load a sysval into uniform regs directly
14:25karolherbst: ohh wait
14:25karolherbst: you can
14:25karolherbst: mhhh, interesting
14:26Ingvix: is there a way I can easily check if nvidia gpu is at rest or active?
14:27karolherbst: Ingvix: there is a power/ directory for each device under /sys/bus/...
14:27karolherbst: and one file called "runtime_status" or something
14:27imirkin: Ingvix: vgaswitcherro is easier
14:27karolherbst: uhmm. right
14:27imirkin: in /sys/kernel/debug/vgaswitcheroo/status iirc?
14:27karolherbst: cat /sys/kernel/debug/vgaswitcheroo/switch
14:30Ingvix: 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:31Ingvix: hmm, I got it already installed so probably not laptop-mode. It just got a module with the same name
14:36karolherbst: Ingvix: your setup might be a little funky with all the additional software you might used in the past?
14:36karolherbst: nouveau needs to be loaded for it to work
14:36karolherbst: but if you have bumblebee/bbswitch or whatever thing installed, they do tricks to mess around with stuff
14:37Ingvix: yeah, okay. I think it's just cause it's not loaded
17:36enyc: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:37enyc: 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:37enyc: 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:38karolherbst: 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:38enyc: 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:39karolherbst: well.. they do update against new interfaces from time to time
17:39karolherbst: I think the latest 340 compiles against 5.0?
17:39ericonr: the nvidia-340 drivers broke somewhere between 5.4 and 5.7
17:39enyc: I was particularly wondering if thre esi something resembling "nouveau changelog" which is not yet apparent to me
17:39ericonr: they still compile against 5.4
17:39imirkin: enyc: nouveau should continue to work as well as it ever has on that GPU
17:40enyc: ericonr: useful to know too, thankyou
17:40karolherbst: enyc: not really
17:40ericonr: needs some patches to compile for 5.7
17:40enyc: imirkin: ok thankyou too!
17:40imirkin: enyc: as of a fairly long time ago, reclocking should be supported too
17:40enyc: OK got my useful answers!
17:40imirkin: but even clock-for-clock, nouveau performs worse than nviida
17:40enyc: imirkin: reclocking as in power saving?
17:41imirkin: enyc: more like the opposite - power using ;)
17:41enyc: aah i see
17:41imirkin: usually those GPUs boot up to lower frequencies
17:41enyc: Thaknyou all, very helpful!.
17:41imirkin: reclocking is the act of changing frequencies (up or down)
17:41enyc: Since I'm getting helpful answers!!!!
17:41enyc: Any opinions on GT218 [GeForce 210] vs Intel-integral-graphics on Core-2-Duo era chips?
17:42imirkin: the geforce 210 should be much better
17:42enyc: imirkin: OK thats what i *suspected* we will find out in practice
17:42imirkin: core2 duo is a gen4 or gen4.5 chip
17:42imirkin: which was ... shit.
17:42enyc: in friends' case, a case of Cinnamon or MATE destop ;p
17:45imirkin: not that geforce 210 is some sort of powerhouse
17:45imirkin: but at least it exposes GL 3.3, while gen4 gets you GL 2.1
17:46imirkin: (technically it could do GL 3.3, but no drivers support this - neither linux nor windows)
17:46enyc: 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:47imirkin: yep, makes sense
17:49imirkin: as always, the proof is in the pudding ... try it out, see if it works for you
17:50enyc: imirkin: said friends have 2* core-2 era machines, desktop, laptop
17:50enyc: 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:51imirkin: wave of the future
17:51enyc: 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:51imirkin: isn't that all that laptops are used for -- watching movies?
17:51enyc: imirkin: no
17:52imirkin: ever since they became widescreen, can't actually use them to do work
17:52imirkin: so what else is there
17:53imirkin: (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:53enyc: 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:01imirkin: i was a huge fan of the t42
18:01imirkin: all downhill from there
18:02Tom^: x230 with the x220 keyboard modded is quite sweet :p
18:03Tom^: got it here waiting for the nitrocaster addon board to solder on an then its 1080p ips panel time too!
19:10karolherbst: imirkin: mhhh.. regs.getMaxAssigned(FILE_UGPR) returns bogus values :/
19:10imirkin: i forget how that works
19:11karolherbst: well.. it reads from fill which gets filled...
19:12karolherbst: maybe I forgot to do something
19:14karolherbst: ohh.. I think I see it
19:14karolherbst: TargetNVC0::getFileUnit needs to return 2 :)
19:14imirkin: it does.
19:15karolherbst: ../nouveau_shaderdb/gputest_pixmark_piano/merged/36e4a6751c12e5ebc10a2039a8b6bc463fe2e88b.shader_test - type: 1, local: 0, shared: 0, gpr: 82, ugpr: 2, inst: 2976, bytes: 47616 :)
19:15karolherbst: I guess I should fix loadpropagation...
19:17karolherbst: 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:18karolherbst: don't support U* instructions yet so all of that doesn't help with working load propagation
20:18enyc: Tom^: i hear is a pain to get decent quality ips panels, you get lots of manufacturing-rejects ...........
22:58karolherbst: ahhh.. flattening eats my setps
22:58karolherbst: "set u8 $p0 ge s32 $r1 $ur0"