05:35damex: hi, i have question regarding optimus. i have t420. i use nouveau (nvs4200m)+intel (hd3k). it works kinda fine (mouse speeds up a lot after enabling nvidia ports for intel card). but i want to ask about displayPort. if i enable optimus in bios - then i can't get hdmi sound via displayPort. if i enable only discrete card (nvs4200m) then it i can get hdmi sound. can there be any kind of workaround for that?
06:14RSpliet: damex: if it's not a matter of selecting the right output in your audio settings tool, I suspect it's a bug
06:15RSpliet: check whether upgrading to a sparkly new kernel helps (4.3 preferably)
06:15damex: RSpliet, audio device is not getting detected. i am using last kernel.
06:15damex: RSpliet, Linux foosha 4.3.3-gentoo #5 SMP PREEMPT Sat Jan 2 19:36:59 ICT 2016 x86_64 Intel(R) Core(TM) i7-2820QM CPU @ 2.30GHz GenuineIntel GNU/Linux
06:16RSpliet: that's new enough indeed
06:16RSpliet: got a dmesg?
06:17damex: RSpliet, full dmesg?
06:18damex: RSpliet, https://bpaste.net/show/534f971d95a7
06:27RSpliet: hmm, I don't see anything significantly strange in that log, but I don't dare to give a conclusive answer on what might be going wrong
06:38damex: RSpliet, i will do whatever is necessary. since i want to get linux properly working on that machine. i have few of them in reserve (refurb/used machines) in case that one dies.
06:39damex: and getting hdmi output working from nouveau card - win/win for using it to play video on tv
06:44karolherbst: damex: how many hdmi audio devices are listed in lspci?
06:45karolherbst: or audio devices in general
06:45damex: https://bpaste.net/show/1cc140ab6719 one audio device
06:45damex: karolherbst, ^
06:46karolherbst: damex: if you disable optimus in the bios, then you get hdmi sound via display port?
06:47damex: karolherbst, yes
06:47karolherbst: and what does disabling optimus mean, just intel?
06:47damex: karolherbst, i mean if i enabled only nouveau card. no intel. only discrete card. only nvs4200m.
06:47karolherbst: ahhh I see
06:47damex: since displayport wired to nvs4200m.
06:47karolherbst: yeah okay
06:48karolherbst: damex: could you disable optimus and paste lspci again?
06:48damex: karolherbst, sure. i will take some time to reboot ;p
06:48karolherbst: allthough the nvidia one won't be listed as an adiuo device anyway
06:48karolherbst: RSpliet: or will the nouveau hdmi audio controller be listed in lspci?
06:49RSpliet: karolherbst: something should be listed
06:50karolherbst: none is listed on my system, but there is also no port wired to the nvidia gpu
06:50karolherbst: so I wasn't sure
06:50karolherbst: the intel one is listed though
06:51damex: karolherbst, https://bpaste.net/show/2e8dc45e5eb8
06:51damex: karolherbst, it is listed separately.
06:53damex: do you need me to paste something from that nouveau-only setup?
06:53karolherbst: maybe dmesg
06:53karolherbst: something could be different
06:53damex: https://bpaste.net/show/39ef653cf93b full dmesg
06:53damex: i will go to reboot now
06:55karolherbst: RSpliet: any idea?
06:56karolherbst: the kernel doesn*t seem to see the audio device with optimus enabled
06:57karolherbst: well this doesn't seem to be a nouveau issue, maybe it is, but device detections runs before nouveau can do anything
06:57damex: karolherbst, ;(
06:57karolherbst: damex: you could open a kernel bug against pci or something
06:58karolherbst: but it is weird that it works on windows though
06:58damex: karolherbst, i never used it with windows :D
06:58damex: sorry but i can't say for sure if it works there
07:02karolherbst: I bet there is a nifty ACPI hack needed or something otherwise messy
07:16damex: karolherbst, i have progress
07:16damex: sudo lspci -H 1 | wgetpaste
07:18damex: it is with optimus enabled. i can clearly see hdmi nvidia port.
07:19karolherbst: but there is no nvidia card in there
07:20damex: 01:00.0 VGA compatible controller: NVIDIA Corporation GF119M [Quadro NVS 4200M] (rev a1)
07:20damex: 01:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1)
07:20damex: i dunno why i is different now
07:20damex: i will paste new one
07:20damex: i don't remember. probably first one was before running xrandr to pass nvidia ports
07:20karolherbst: shouldn't matter
07:21damex: now it is like that
07:21karolherbst: that looks better
07:21karolherbst: and is sound playing?
07:22karolherbst: it could be though that you have to tell pulse or alsa to use that audio output though first
07:24imirkin: karolherbst: for when damex comes back: https://bugs.freedesktop.org/show_bug.cgi?id=75985
07:25karolherbst: ohh right, this I wanted to try out next :D
07:25imirkin: damex: https://bugs.freedesktop.org/show_bug.cgi?id=75985
07:26damex: karolherbst, no. hdmi device does not get detected. detected only when i use lspci -H 1. and only lspci show it
07:26damex: system see only intel hda device.
07:27damex: imirkin, looks similar
07:27imirkin: that's why i mention it :)
07:27karolherbst: sometimes stuff is really overcomplexed :D
07:28damex: but i can't do rescan. echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/remove when i do that - my screen freeze.
07:28karolherbst: damex: well your display on the DP port will freeze for sure
07:28imirkin: did you... stop X & co?
07:28damex: imirkin, hm... oh i don't
07:29damex: okay. i will stop X & co
07:29damex: going to do that now
07:31damex: imirkin, lol it detects :D
07:31damex: imirkin, thanks :D i will try to use it now
07:34damex: hm... no sound output..
07:35karolherbst: damex: check what sound device you use
07:35imirkin: are you outputting to the right sound device?
07:35damex: imirkin, yep. i am
07:36imirkin: and this works when you're not in optimus mode?
07:36damex: imirkin, yes.
07:36imirkin: damex: pastebin the output of 'xrandr'
07:37damex: imirkin, ^
07:37imirkin: i won't even ask why the preferred resolution on that device is 1024x768...
07:37damex: imirkin, it is default one. i set 1920x1080 asap
07:38damex: i dunno why display report 1024x768 by default
07:38imirkin: i know. but if it can do 1920x1080 why does it set the preferred res to 1024x768 :)
07:38imirkin: anyhoo.... hrm.
07:38damex: imirkin, i found another issue that relate to enabled hdmi
07:39damex: if i do output from hdmi - for example youtube video or anything else that use graphic resources - gets stucked. it gets output frame by frame as if something overloaded
07:40imirkin: mind doing another pastebin of dmesg btw?
07:41damex: https://bpaste.net/show/b41f00a6644c dmesg
07:41damex: https://bpaste.net/show/b41f00a6644c lspci -k
07:41damex: : https://bpaste.net/show/de345fb86615 lspci -H 1
07:42imirkin: [ 431.780555] snd_hda_codec_hdmi hdaudioC2D0: Unable to sync register 0x5f0100. -5
07:42imirkin: [ 431.780566] snd_hda_codec_hdmi hdaudioC2D0: HDMI: invalid ELD buf size -1
07:42imirkin: that's probably not great
07:43imirkin: i have *no clue* about any of that stuff though
07:43imirkin: something that might avoid a bit of heartache at least at first is try to boot with "nouveau.runpm=0"
07:43imirkin: i doubt it's related, but... who knows
07:45damex: does that matter if i use x11-drivers/xf86-video-nouveau-1.0.11::gentoo ?
07:45damex: or should i give 9999/git head version a shot?
07:46damex: since people point to http://cgit.freedesktop.org/nouveau/linux-2.6/commit/?h=linux-3.18&id=cc2a9071458254cb0db6153811734750da0233ea that
07:46damex: imirkin, sure, i will try that out
07:47damex: i will give 9999 version a shot
07:50damex: but kernel is new too ;/
07:55imirkin: that won't matter
07:55damex: done the same once again
07:57imirkin: i don't think that had runpm=0
07:58damex: i tried to run from the scratch with new nouveau
07:58damex: going to use runpm=0 now
07:58imirkin: you mean ddx? like i said, that doesn't affect anything
08:04damex: imirkin, it does not see any sound device for nvidia now
08:04imirkin: did you do the reset routine?
08:05damex: system start xdm with 'slim. i stop it. run script that do reset. and then start xdm again.
08:06imirkin: oh fun. i bet runpm causes some callbacks to be called which enable the subdevice
08:06damex: echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/remove
08:06damex: echo "1" > /sys/bus/pci/rescan
08:06imirkin: someone needs to go into the acpi tables and do some spelunking
08:06imirkin:is working on finishing the GL_ARB_indirect_parameters stuff
08:21damex: sheeptimus ;(
08:21damex: would be better if there was a disengaged mode. where intel and nvidia cards will function separately.
08:22imirkin: that's normally how optimus works
08:22imirkin: other than being in the same system, the two gpu's are totally disconnected
08:23damex: but on normal pc if you have two videocards, their stuff initialized separately and work separately without accelerating each other.
08:23damex: unless you use something like crossfire/sli.
08:23damex: and even then
08:23imirkin: exactly same thing as with optimus :)
08:24damex: but why it is so complicated then?
08:24damex: and never works
08:24imirkin: multiple gpu's are hard
08:24imirkin: normally people have just one
08:24damex: i have 3 displays on work plus laptop display ;p
08:24damex: i can stick to one... but it is easier to use many of em as sysadmin ;p
08:25imirkin: well, with GF119... actually maybe that can drive 4 crtc's
08:25imirkin: GF10x can definitely just do 2
08:27damex: imirkin, i have dock station for t420. http://www1.partnerinfo.lenovo.com/partners/us/peripherals/downloads/ThinkPad-Multiple-Monitor-Configurations-Using-NVIDIA-Optimus.pdf Quad Multiple Monitors setup
08:28imirkin: right it's a question of which gpu drives which screen :)
08:29karolherbst: damex: well some laptop manufactures wants to make stuff difficult, but on pre haswell there is no much choice
08:29karolherbst: pre haswell intel can only drive two displays at once
08:29damex: karolherbst, i thought having hardware mux/switch for cards would be a huge plus :(
08:29karolherbst: as you see
08:29karolherbst: it isn't :D
08:29karolherbst: I have all ports wired to the intel gpu
08:29karolherbst: so I don't ahve to deal with such issues at all
08:29karolherbst: and hdmi output works perfectly through intel hdmi
08:30damex: i would stick to intel if it had atleast one digital port.
08:30damex: but it is not. displayport and dvi ports wired to nvidia
08:30karolherbst: I get the feeling that those lenovo laptops are even more ugly than other laptops, but this is only a personal feeling I slowly get
08:31damex: i still feel sad about ibm selling thinkpad business to lenovo :(
08:31karolherbst: yeah I don't really understand why, maybe because of performance, but the pcie bus is usually not under load, so that the buffer transfers over pcie shouldn't effect gameing performance _that_ much
08:32karolherbst: it is also worse for battery runtime and stuff
08:33damex: i think about trying it in windows 7. since it was shipped with laptop originally years ago;
08:33damex: maybe optimus audio does not even work there :D
08:34damex: maybe lenovo broke something
08:41karolherbst: mhh doubtful though
08:42imirkin: alright. now just need to do some ARB_indirect_parameters piglits...
08:43damex: karolherbst, what if it does work?
08:43imirkin:hates writing piglits
08:43karolherbst: damex: well there should be something related in the ACPI tables
08:43karolherbst: but I am no ACPI expert
08:44damex: i am downloading full driver set from lenovo. i will also use oem iso from msdn.
08:44damex: everything should be like intended to be by lenovo
08:50imirkin: karolherbst: damex: well from the sounds of it, nouveau is calling "the right thing" when doing runpm, so just a matter of reading the things that runpm ends up calling and seeing what other things it calls to see if those can be done more directly
08:58jarnos: I am using nouveau with GF4 MX420 in Mythbuntu and the problem is video playback stops occasionally (black screen) and stays that way until I exit playback. Audio works fine. This is when I use opengl or opengl-lite for playback which I chose for better quality OSD.
09:00imirkin: jarnos: are you using llvmpipe or are you using nouveau_vieux for opengl accel?
09:00imirkin: jarnos: glxinfo should tell you
09:03damex: for windows - i installed optimus driver from lenovo support website for windows. it worked out of box with audio output.
09:03damex: so thats it
09:08jarnos: Imirkin I can not see it from glxinfo.
09:08karolherbst: damex: would be nice to know if the nvidia driver does things the right way though
09:08imirkin: jarnos: pastebin glxinfo output?
09:09damex: karolherbst, how?
09:09karolherbst: damex: start X server on the nvidia card with the binary driver
09:09karolherbst: while a display is connected
09:09karolherbst: should just work
09:10damex: karolherbst, oh i tried doing it before. there is required some kind of empty configuration magic and auto pass MODESETTING device to NVIDIA-0. it didn't worked with nvidia audio tho
09:10damex: i just passed that idea
09:11karolherbst: damex: no
09:11karolherbst: just use the ports connected to your nvidia card
09:12damex: require some time
09:12damex: to exclude nouveau from kernel
09:12damex: and then somehow make it work with blob
09:12jarnos: imirkin pastebin.com/AwDHCFTQ
09:12karolherbst: damex: blacklist nouveau
09:13karolherbst: install nvidia
09:13karolherbst: write up a fine xorg.conf file
09:13damex: karolherbst, it is built'in. not a module
09:13imirkin: jarnos: OpenGL renderer string: Mesa DRI nv17 x86/MMX+/3DNow!+/SSE
09:13imirkin: jarnos: that means you're using nouveau
09:13imirkin: hmmm... mesa 10.5.9... let me see when i fixed some stuff for nouveau_vieux...
09:14imirkin: looks like "a while ago"
09:14imirkin: jarnos: well, you can try to move nouveau_vieux_dri.so out of the way and see if that improves the situation... the driver's not exactly perfect
09:25jarnos: imirkin Do I have to reboot?
09:25imirkin: just restart mythtv or whatever
09:28jarnos: imirkin now it is 3fps :(
09:28imirkin: jarnos: does "glxinfo" say llvmpipe now?
09:29imirkin: ohhh... i bet llvmpipe actually needs sse2. in that case you're screwed.
09:32jarnos: imirkin Gallium 0.4 on llvmpipe (LLVM 3.6, 128 bits)
09:33imirkin: jarnos: hm ok. that's right.
09:33imirkin: i guess whatever mythtv's trying to do requires too much cpu for it =/
09:34imirkin: if you can easily repro the issue you had earlier with nouveau_vieux, and you can make an apitrace of it, i could try to see if i can figure out what's wrong
09:53damex: haha optimus audio does not work in windows 10 but works in 8
09:53damex: lenovo didn't bothered to port their hack to windows 10
09:59jarnos: imirkin total CPU usage was 80%.
10:01jarnos: imirkin like this? https://www.xpra.org/trac/wiki/Debugging/OpenGL
10:02imirkin: apitrace = http://github.com/apitrace/apitrace
10:03jarnos: I have some version of apiytace-gl-frontend in repository
10:20jarnos: imirkin 3 years old version. If I need to build from Git, I do not have much experience. The PC has 1.5GB RAM.
10:40jarnos: imirkin maybe someday I continue. Now I could not repro.
10:41imirkin: jarnos: ok. the nouveau_vieux driver isn't the most tested in the world... i'm sure it has bugs, so do feel free to report stuff
10:42imirkin: jarnos: but the most important thing with those bugs is the ability to reproduce the issues. if you can't repro and explain to me how i can repro, it becomes much less likely that it'll get fixed.
10:52karolherbst: imirkin: is there a way to check how much vram nouveau uses?
10:52imirkin: karolherbst: no
10:53karolherbst: would it be easy to add support for that?
10:54imirkin: karolherbst: maybe? not sure.
11:00karolherbst: imirkin: I think his gpu is just too weak :O
11:00imirkin: karolherbst: whose?
11:00karolherbst: on the bug where you replied
11:00karolherbst: the hacknslash one
11:00karolherbst: because I don't have the issue
11:01imirkin: karolherbst: nvidia blob seems to work fine
11:01karolherbst: but I have a high core load
11:01imirkin: karolherbst: and you have more than 256mb of vram
11:01karolherbst: around 90% at 07
11:01karolherbst: well his gpu should have 512MB though
11:02imirkin: not according to dmesg
11:05karolherbst: mhh but right, the scene switch doesn't have a that high different gpu load
11:05karolherbst: reading out vram usage sounds nice though
11:29karolherbst: meh :/ why doesn't mmiotracing work for me anymore
11:38jarnos: imirkin I can repro without apitrace. Just playback few minutes. But with apitrace it did not happen. Maybe some timing issue.
11:39imirkin: jarnos: urgh, that's very unfortunate :(
11:45karolherbst: k.... so a mmiotrace doesn't help here :O
11:45karolherbst: imirkin: maybe the driver just keeps track of it?
11:56karolherbst: imirkin: mhh this is weird, I don't see anything related in the mmiotrace nor in an mmt :/ or is there some stuff not fetched by mmt?
11:57imirkin: this is amazing... my crazy macros all work fine from the first try
11:57imirkin: something must clearly be going horribly wrong
11:58karolherbst: well I do a "nvidia-settings --query UsedDedicatedGPUMemory" and made a mmiotrace and later a mmt :/
13:45jarnos: imirkin it seems there is some fault in the DVB-T hardware. It is not recognized anymore after I had to use power button after the frontend freezed in its menu. I do not know, if it could be the culprit.
13:57jarnos: Or its driver. I had to do some tweak to make the frontend available even when the devive was recognized.
18:50Tom^: karolherbst: does your laptop have iommu support?
18:50karolherbst: only half
18:50Tom^: i wonder if any optimus laptop does have it, would be neat to simply vga passthrough the nvidia one
18:50karolherbst: I think the board itself supports it, but not the cpu
18:50Tom^: hm ok
18:52karolherbst: well I could buy another cpu which has it though
18:52Tom^: isnt the cpus soldered on laptops?
18:52karolherbst: not a i7-4700MQ one
18:52karolherbst: my gpu is also a mxm card
18:52karolherbst: so all important stuff is replaceable
18:52karolherbst: mhhh everything is replaceable when I think about it :D even the wifi/bluetooth module
18:52Tom^: you are running around with an nuclear powerplant then heh
18:53karolherbst: 180W AC adapter
18:53karolherbst: well I have 6 ata ports :D
18:53karolherbst: so there is plenty of room too
18:53karolherbst: but I think one of them doesn't actually exist
18:54karolherbst: and two others are msata ones
18:58karolherbst: ohh wait
18:58karolherbst: why are my RAM thingies on different channels :O
18:59karolherbst: well lshw tells me that
18:59karolherbst: channela-dimm0 and channelb-dimm0
18:59karolherbst: but I have a HM87 chipset
19:00karolherbst: so yeah, my motherboard supports Vt-d
19:00imirkin: they *should* be on diff channels
19:01karolherbst: ohh okay
19:01karolherbst: ahh right
19:01karolherbst: makes more sense :D
19:01karolherbst: cause dual channel means you use both channels... right
19:01karolherbst: socket 947 mhh strange number somehow
19:02karolherbst: i7-4800MQ has Vt-d
19:02karolherbst: mhhh I think I know what I'll buy next then :D
19:03Tom^: vga passthrough and enjoy games in your vm!
19:03karolherbst: trace the windows driver :D
19:04Tom^: or that heh
19:05karolherbst: ohh the 4800 also has TX support
19:05Tom^: the question is tho how the nvidia driver will react with only seeing the nvidia gpu.
19:05karolherbst: and no display?
19:06karolherbst: 360€ :/ damn those i7 :D
19:09karolherbst: yeah I guess a 4810 is the right choice then
19:30imirkin: alright... atomic3 branch is a lot more cleaned up... hopefully i didn't break everything in the process
19:35Tom^: anything you want tested ?
19:35Tom^: im a bit bored anyways :p
19:36imirkin: i still haven't tested anything myself either
21:12imirkin: oh that's just great. looks like GRID Autosport also does GL dispatch from multiple threads.
21:12imirkin: i _really_ need to safen this stuff up
21:12imirkin: it's becoming a real thing :(
21:19Tom^: hm does mesa build with clang?
21:25imirkin: does anything?
21:27Tom^: =D the 64bit build did, the 32bit didnt.
21:27Tom^: "fatal error: error in backend: symbol 'x86_entry_start' is already defined
21:29karolherbst: well freebsd builds with clang :O
21:29karolherbst: in pre gcc-4.9 time it was always a good idea to ask clang if you didn't understand the error output of gcc :D
21:33Tom^: imirkin: https://bugs.freedesktop.org/show_bug.cgi?id=89599 :P
21:34imirkin: meh, i never felt that gcc error out was so bad...
21:34karolherbst: did you do heavy template programming with C++?
21:35karolherbst: this was the worst with gcc
21:35imirkin: karolherbst: yeah... it was unreadable the first time you ever looked at it, but after the first few times it was pretty clear
21:36karolherbst: I think boost was still too much for gcc
21:36imirkin: and in case you were still confused, there was c++filt
21:36karolherbst: there were these nice templates though to make the error more readable :D
21:36imirkin: (or is that something else? i forget)
21:36karolherbst: yeah, well the error output of clang was still better in every regard back then
21:37karolherbst: which I think actually pushed gcc devs to work on this :D
21:37imirkin: and yeah, boost is the worst
21:37imirkin: for that and other reasons
21:38imirkin: the solution is to not use boost, not to use some other compiler :)
21:38karolherbst: well boost has still pretty good things
21:38karolherbst: you just need to know how to use it
21:38imirkin: and rabbits eat their feces
21:38karolherbst: or how to develop templated c++ in general :D
21:39karolherbst: boost threading and filesystem libraries are pretty good though
21:39imirkin: if only they didn't rely on boost
21:39imirkin: then they'd be usable
21:39karolherbst: well they are pretty much close to the stuff inside c++11 and c++17 anyway now
21:40karolherbst: and boost lexical_cast was also really nice to have
21:40karolherbst: not only because it was much faster than the normal functions
21:40imirkin: sure, boost has plenty of nice little nuggets
21:40imirkin: the problem is that they are in the midst of this giant pile of crap
21:40Tom^: i see boost more as of a testing ground before things get into the c++ specs. :P
21:41karolherbst: yeah it somehow is
21:41imirkin: sure, it's great for experimenting and prototyping. but not for actual development.
21:41karolherbst: I think the entire spirit thing is just insane :D
21:41karolherbst: or was it fusion?
21:42karolherbst: I once did something with the MPL bits in boost....
21:42karolherbst: that's really crazy
21:43karolherbst: yeah but boost is really bloated now :/
21:43karolherbst: they should split it somehow
21:44karolherbst: also their build system is just crap
21:44karolherbst: I opened a bug once because bosot-build used like vc14 in a vc11 shell and they just told me to pass the vc version to boost-build myself ....
22:10imirkin: hakzsam: hey, so did you want to do images or compute (or both?)?
23:25Tom^: imirkin: hm is there anyway to debug and see if mesa/nouveau actually knows that i have 3gb vram?
23:25imirkin: Tom^: it knows.
23:26imirkin: it just doesn't do very much with that information.
23:26imirkin: Tom^: try "glxinfo"
23:26Tom^: the thing is im suspecting the hl2/source2 engine doesnt.
23:26imirkin: should be in the GLX_MESA_query_renderer section
23:27Tom^: i can make the hl2 engines print different opengl info running mat_info, it seems to assume i only have 512mb vram.
23:27Tom^: and im just connecting dots and assuming but i only saw ~500mb of vram usage in the gallium hud as most. the stutters doesnt come before it reaches that
23:28Tom^: glxinfo atleast reports Video memory: 3047MB
23:29imirkin: yeah, but the source engines don't know about that ext
23:30imirkin: i think there might be some config file where you can tweak it?
23:30Tom^: hm perhaps