01:55user_457788: I have an issue using nouveau driver with NVIDIA VGA
01:55user_457788: I can not change the backlight:
01:55user_457788: $ xbacklight -dec 10
01:55user_457788: No outputs have backlight property
01:56user_457788: dmesg shows a warning might be relevent
01:56user_457788: [ 17.529225] ACPI Warning: \_SB_.PCI0.PEGP.DGFX._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (201509 30/nsarguments-95)
01:57user_457788: [ 17.529924] ACPI: \_SB_.PCI0.PEGP.DGFX: failed to evaluate _DSM
01:58user_457788: [ 17.530187] nouveau 0000:01:00.0: NVIDIA GM107 (117330a2)
01:58user_457788: [ 17.539533] nouveau 0000:01:00.0: bios: version 82.07.6d.00.1a
01:58user_457788: [ 17.540355] nouveau 0000:01:00.0: mxm: BIOS version 3.0
01:58user_457788: [ 17.543051] ACPI Warning: \_SB_.PCI0.PEGP.DGFX._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (201509 30/nsarguments-95)
01:58user_457788: [ 17.544048] nouveau 0000:01:00.0: fb: 2048 MiB GDDR5
01:59user_457788: I used to use nvidia drivers on the same OS and the backlight was functioning without issues
02:01user_457788: This is a fresh install of the OS on the same machine using the same OS, but now I'm using nnouveau driver
02:01user_457788: lspci -v:
02:01user_457788: 01:00.0 VGA compatible controller: NVIDIA Corporation GM107GLM [Quadro K2200M] (rev a2) (prog-if 00 [VGA controller])
02:01user_457788: Subsystem: Hewlett-Packard Company GM107GLM [Quadro K2200M]
02:02user_457788: Kernel driver in use: nouveau
02:02user_457788: Kernel modules: nvidiafb, nouveau
02:03user_457788: ls /sys/class/backlight/
02:04user_457788: kernel 4.4.8
02:04tdaven: have you tried the brightness file under that acpi_video0?
02:04tdaven: can usually read from it to get the range
02:05user_457788: two files, I could write to one but nothing change and the other one (actual) access denied
02:05user_457788: the range 0-20
02:06tdaven: usually you can echo number > brightness to manually change...of course you'd need to be root...
02:07user_457788: right, i'm root and i could wirte to brightness, however nothing change
02:08user_457788: there's another file, actual_brightness, which denies writing by root
02:08tdaven: have you tried something like "find /sys/ -type f -iname '*brightness*'" to see if there is another brightness file? otherwise you'd need someone probably more familiar with acpi to understand what is getting parsed wrong
02:08tdaven: yeah...actual_brightness is read only I think
02:16user_45889: find /sys/ -type f -iname '*brightness*':
02:25user_45889: I will be around for a while in case additional info needed..
05:53hussam: does nouveau not fully support cards identified as nvc1?
05:54hussam: I tried nouveau on kernel 4.6 and trying to echo 0f to pstate said no implemented.
07:26hussam: is there any way to not use the lowest frequency speed on a nvidia 630 GT? (nvc1)
08:50RSpliet: imirkin: out of curiousity, did you observe a big change in gpr usage after 5c6b8cc... ("nv50/ir: treat addresses as local")?
08:54mwk: karolherbst: btw, a funny thing about nv eth you may not know of...
08:54mwk: I have no idea what it depends on
08:54mwk: but sometimes it identifies as the "network device" class, and sometimes as the "bridge" class
08:55karolherbst: ohh didn't know that
08:55mwk: so I think we need to stuff a list of PCI IDs and ignore the class
08:58mwk: luckily I do have a list :)
09:01mwk: oh, and another little-known fact
09:01mwk: the MCP2 chipset had two ethernet controllers
09:01mwk: one of them is the usual nv eth one
09:01mwk: the other... is a PCI core licensed from 3com
09:02mwk: and the chipset contains a separate PCI bridge just for it
09:02mwk: and yeah, it's built into the actual die of the MCP2
09:02mwk: it's disabled on my motherboard, but I managed to enable it in the southbridge PCI config space
09:02mwk: and it showed up in lspci...
09:03mwk: don't ask me why they have two different eths on a single chip
09:03mwk: a licensed one, at that
09:03mwk: I have no fucking clue
09:03karolherbst: the put a hw wrapper around the chip they used
09:03karolherbst: so they can just write a single driver
09:03karolherbst: or something stupid like that :D
09:04mwk: nah, there's reasonably good evidence on the internet that they are two separate chips
09:04karolherbst: ahh okay
09:04mwk: as in, if you get the right mobo, you actually get two NICs
09:05mwk: oh, and the network device and bridge also have a different PCI id
09:05pmoreau: user_45889: The ACPI warning should be irrelevant: it’s for detecting Optimus setups and auto-suspend in that case. And each time Nouveau does not find one of the Optimus methods, it outputs an error message, even if the method just does not exist, like on a desktop computer.
09:05mwk: as opposed to GPUs, which keep their pci id when you switch the pci class
09:06pmoreau: user_45889: Could you please paste the full dmesg somewhere? It looks like Nouveau did not register a backlight interface, otherwise you would have `/sys/class/backlight/nv_backlight`
09:14mwk: matter of fact
09:14mwk: I don't understand the numbering at all
09:14mwk: the bottom few bits can be reprogrammed by a PCI config register
09:15mwk: and, on MCP77/MCP79, there's a bit that changes the whole pci id to 0x57X instead of the usual
09:16mwk: *and* that applies not just to the eth device, but also to SATA and HDA (although they have different alt pci id ranges)
09:17mwk: the SATA controller has three ranges selected by IDE mode vs SATA mode vs RAID mode, but there are still 2 unexplained bits
09:18karolherbst: mwk: I guess AHCI is too new for those chips?
09:18karolherbst: or is SATA mode == AHCI?
09:18mwk: "prepare an alternate identity in case we commit a horrible crime and everyone is looking for us"? :)
09:18mwk: ah yes, I mean AHCI
09:18mwk: here's the list of all crap I found on the chipsets
09:19mwk: I also have a list of "nforce XXX" name mapping to the actual chips
09:19karolherbst: what about the co processor?
09:19mwk: you wouldn't believe how hard it was to get that one
09:20mwk: you mean the SMU?
09:20karolherbst: well it shows up as "co processor" in lspci
09:20mwk: yep, it's the SMU
09:20karolherbst: ahh okay
09:20mwk: a funny beast
09:20mwk: I still have no idea what it's supposed to be doing
09:20mwk: I could decompile the code for it, I suppose
09:21karolherbst: well poke stuff in it and check if you get some network traffic via wireshark or something :D
09:21mwk: but there's a little problem of messing with all these chipset PCI config register I don't understand
09:21mwk: nah, it's too dumb for that
09:21mwk: the code is quite small
09:21mwk: as in, Falcon-scale, and one of the smaller Falcons
09:22karolherbst: ahh okay
09:22mwk: I'm still impressed how the took the intel 8051 MCU and hooked it up as a HyperTransport master
09:23karolherbst: ohh right, wait. I think the SMU might be something like the ME thing or the SMU on those PPCs?
09:23mwk: so, what does it do?
09:24karolherbst: well on the macs it somehow stored some stuff between boots and also took care about some power management related things? not sure anymore
09:24karolherbst: I had to reset it once and now idea what it did back then anymore
09:24karolherbst: ohh it was called PMU, not SMU on powerpc
09:24mwk: that thing is called PMU too
09:24mwk: it seems they can't decide on a name
09:24karolherbst: ahh k
09:25karolherbst: well if your mac didn't boot, sometimes reseting the PMU helped
09:25mwk: the pciid database has it as "co-processor" on some chipsets, "SMU" on others, "PMU on yet others"
09:25tajjada: nouveau is quite unstable on my system; X server freezes somewhat frequently (mouse cursor still moves, and I can still hear my music playing, so I know the system is alive), and certain things like shadertoy.com (to be fair, I shouldn't even be trying to run that on a GPU as weak as mine) result in an instant crash/freeze
09:25karolherbst: I think it stored the initial volume of the audio chip
09:26tajjada: is it just that nouveau has poor support for my card (gt710, gk208 gpu), or is there something I could try to improve things
09:26karolherbst: like the bootup tune volume was reseted after PMU reset
09:26mwk: wow, that's an important task
09:26karolherbst: maybe it stored even the display brightness
09:26karolherbst: I think the mb clock was also on the PMU
09:26mwk: even more important!
09:26karolherbst: no idea though
09:27mwk: probably some power management stuff
09:27mwk: I blew it up a few times with no ill result
09:27pmoreau: karolherbst: Aren’t you mixing up with https://support.apple.com/en-us/HT204063 ? Or is that SMU including the NVRAM?
09:28pmoreau: tajjada: Do you have a dmesg from when your computer freezes? And which version of the kernel do you have?
09:28tajjada: kernel 4.6, using xf86-video-modesetting with DRI3
09:29mwk: also, here goes
09:29karolherbst: pmoreau: ahh right, that was PRAM
09:29pmoreau: I think you should use xf86-video-nouveau for Kepler (and below) cards. modesetting is needed for Maxwell
09:29karolherbst: pmoreau: but the SMC page also isn't really interessting
09:29karolherbst: pmoreau: https://support.apple.com/en-us/HT201295
09:29pmoreau: Yeah, I saw it afterwards
09:30tajjada: pmoreau: ok, I will try switching to xf86-video-nouveau for a while, see how that goes. if there are still issues, I will report back
09:31tajjada: pmoreau: i was just left with the impression that nouveau devs are trying to phase out the nouveau ddx because modesetting is somehow better
09:31pmoreau: tajjada: Pasting your dmesg and Xorg.log should still be helpful
09:31karolherbst: huh "chromium-browser: relocation error: chromium-browser: symbol pci_init, version LIBPCI_3.0 not defined in file libpci.so.3 with link time reference" :/
09:32tajjada: pmoreau: well, I don't have any of that at the moment, I will try to capture it when the issue happens again
09:32pmoreau: gtg though, I'll be back later
09:32karolherbst: stupid pciutils
09:33pmoreau: tajjada: xf86-video-nouveau will give you 2d acceleration on Kepler (and below), but that support is broken for Maxwell, hence using modesetting for now.
09:34pmoreau: (at least that one reason, but probably not the only one)
09:35tajjada: pmoreau: i got this card recently (used radeonsi on an amd card before, which I gave to my sister), and, as I said, I was just left with the impression that modesetting was better, so I just used that
09:35tajjada: from reading things online, on phoronix forums and other places, regarding nouveau vs modesetting
09:35karolherbst: tajjada: well on maxwell cards that is true
09:35tajjada: ok, i will switch to the nouveau DDX and see if things get better
09:37tajjada: brb restarting Xorg
09:40tajjada: ok i just ran one program that causes nouveau errors
09:40tajjada: fortunately, this time, just the program crashed
09:40tajjada: X didn't freeze
09:40tajjada: here is dmesg:
09:40tajjada: [ 144.294849] nouveau 0000:02:00.0: gr: ILLEGAL_CLASS ch 5 [003fb2d000 X] subc 0 class 0000 mthd 1b0c data 1000f010
09:40tajjada: and lots and lots of that same message
09:41tajjada: with different hexadecimal values at the end
09:57karolherbst: tajjada: updating mesa/kernel might be worth a host
09:58tajjada: karolherbst: i am running kernel 4.6, which just got released last weekend, and i am running mesa from git (and xorg server and drivers from git)
09:58tajjada: last time i updated mesa was on monday
09:58tajjada: i doubt that much has changed in git master since then
09:59tajjada: but sure
10:02karolherbst: then I think it won't change much
10:03karolherbst: I am sure imirkin or somebody else might be able to help more here
10:04tajjada: karolherbst: yeah, probably
10:09tajjada: i already ordered a cheap AMD card to use instead of this one, for stability, it will arrive next week monday, but I'll still keep this card, and I'll be happy to help debug/troubleshoot the issues
10:09tajjada: i like to see nouveau (and open-source drivers in general) improve
10:10karolherbst: tajjada: well it might also be, that the gpu is just missconfigured and that with my reclocking patches and an initial reclock it will be better, but my stuff is currently based on 4.5
10:11karolherbst: the X server doesn't freeze anymore
10:11karolherbst: so maybe it is just an userspace issue
10:11tajjada: BTW, i tried whatever reclocking is available in the mainline kernel
10:12tajjada: it worked, and i played xonotic on it, but there were still occasional freezes
10:13tajjada: initially, i suspected that maybe my CPU overclock is not as stable as i think it is, and might be causing problems, so I reset my CPU to stock settings, and freezes still happened
10:20karolherbst: tajjada: well stock nouveau reclocking isn't really stable anyway on kepler
10:21karolherbst: but there are also some random freezes we have to figure out besides that
10:22tajjada: karolherbst: well, i'll be glad to help in whatever way i can
10:22tajjada: i am very inexperienced in this driver stuff, though
10:31tajjada: .... aaaand pc crashed again
10:54pmoreau: karolherbst: Could it be the too low voltage problem? Or did it only occur while reclocking?
10:55pmoreau: karolherbst RSpliet: BTW, in case you haven’t seen it yet, Ben rebased on 4.6 and created a 4.7 branch. :-)
11:01pmoreau: tajjada: "Maybe" it is similar to the PGRAPH issues on GK106/GK107, so you could try the patches found here https://bugs.freedesktop.org/show_bug.cgi?id=93629 or using the blob firmware instead of Nouveau’s one (see the instructions https://nouveau.freedesktop.org/wiki/NVC0_Firmware/ )
11:02tajjada: pmoreau: the stuff in that bug report sounds very familiar
11:03tajjada: i'll give it a try
11:03tajjada: i'm a bit busy now, for a couple of hours, so i'll play around with it later today, when i have time
11:07pmoreau: Sure, whenever you have time
11:09pmoreau: tajjada: What kind of VRAM does your card have?
11:09tajjada: 1GB DDR3
11:10tajjada: this is my card: https://www.msi.com/Graphics-card/GT-710-1GD3H-LP.html#hero-specification
11:12karolherbst: pmoreau: I doubt that. Usually the stock config of the cards is pretty close, sometimes even overvolted
11:12pmoreau: tajjada: Ok, thanks
11:12pmoreau: karolherbst: Oh, ok :-D The graph firmware might be a better culprit then.
11:13karolherbst: or something else
11:13karolherbst: I think that maybe sometimes card have a real _bad_ production quality and that the driver can do some stuff to counter that? There are some more bits in PFUSE which might tell use stuff about that besides the speedo
11:14pmoreau: GDDR5 is the problematic VRAM on Kepler for reclocking, isn’t it? Or am I mixing everything again…
11:14pmoreau: Could be
11:14karolherbst: why should it?
11:14karolherbst: currently I would expect DDR3 being less stable
11:15karolherbst: pmoreau: I think we should collect information about which cards are still crashing on my branch and see if we find anything in common
11:15pmoreau: Dunno, I remember one type being not that supported for Kepler cards
11:16karolherbst: pmoreau: yeah, and I fixed that :p and it was gddr5
11:16pmoreau: Ah! My memory isn’t that bad then \o/
11:16karolherbst: pmoreau: https://github.com/karolherbst/nouveau/commit/616ed151cd5bd6e92df10e281862a9cc37c96282
11:17karolherbst: it might be that we also have PLL issues somewhere else
11:17karolherbst: there are som implicit rules the nvidia driver follows
11:17karolherbst: even on the cores
11:17karolherbst: but it shouldn't matter, by accidence only though
11:17pmoreau: I’ll retry your branch again on my GK107. Only the memory is being reclocked IIRC, which is not enough for playing Stellaris, but I made the mistake of updating to latest drm-next, and then I couldn’t build Nouveau against it.
11:17karolherbst: pmoreau: ahh right
11:18karolherbst: pmoreau: yeah, that's all fixed with my branch
11:18karolherbst: pmoreau: in fact there shouldn't be any bugs within the reclocking process itself anymore
11:18karolherbst: there might be some issue left, but generally it should work
11:19pmoreau: Cool :-) I think I tried your branch while you were working on it, and it was indeed working. But since I didn’t needed the reclocking, I reverted to using the stock kernel
11:19karolherbst: yeah, most likely
11:19karolherbst: well I will update to 4.6 when I get nvidia running on 4.6
14:33Tom^: nvidia runs on 4.6
14:33Tom^: oh karol isnt here
15:02user_45889: pmoreau: this is the full dmesg output: http://pastebin.com/raw/6UN8TtDU
15:04pmoreau: user_45889: Thanks
15:06pmoreau: Meh, I think I know why (or at least one possible reason)
15:06pmoreau: It looks like the backlight code does no registration for Maxwell cards: https://github.com/skeggsb/nouveau/blob/master/drm/nouveau/nouveau_backlight.c#L234
15:09pmoreau: user_45889: You could try adding `case NV_DEVICE_INFO_V0_MAXWELL:` right after `case NV_DEVICE_INFO_V0_KEPLER:`, and see if that helps (you will need to compile Nouveau yourself)
15:11user_45889: Ok. I will recompile and keep you posted
15:27pmoreau: user_45889: I need to go, but I should be back in ~2 hours.
15:29imirkin_: RSpliet: i assume the change is negligible/invisible. i just didn't like seeing that address in the main function's ins list.
15:30imirkin_: RSpliet: i've gotta imagine it helps *some* times, but it should be very rare.
15:41user_45889: pmoreau: recompiled the module and now I have /sys/class/nv_backlight
15:42user_45889: Now I can take off my sunglasses because the backlight is functioning properly
15:43imirkin_: send a patch :)
16:56pmoreau: user_45889: Cool! :-)
17:00user_45889: patch http://pastebin.com/raw/4RtqYUKm
17:33user_45889: xbacklight reports no outputs have a backlight property
17:33mjg59: Only Intel usually bother with that
17:33user_45889: perheps something to do with this: https://github.com/skeggsb/nouveau/blob/master/drm/nouveau/nouveau_backlight.c#L196
17:42user_45889: After the patch i'm only able to change the backlight through /sys/class/backlight/nv_backlight/brightness
17:47mjg59: user_45889: That sounds like everything's working, then
17:58user_45889: mjg59: partially working and I'm not sure if it has anything to do with nouveau. Now I'm able to change the backlight through nv_backligh dir, but xbacklight still reports no outputs have a backlight property.
17:59mjg59: user_45889: Yes, xbacklight only works on Intel
17:59user_45889: uh, isee
18:00user_45889: i think I had it working on the same machine when I had the proprietary diveres installed
18:00mjg59: The nvidia drivers may well expose it
18:01user_45889: then i will just map the keyboard keys to a script to modify the brightness file directly
19:02pmoreau: user_45889: Do you want to send a patch to the ML?
20:37FNTM-U3: I want to make a query on "BUG 84721".
20:37FNTM-U3: would it be fixable?
20:38imirkin_: i believe mupuf was part-way to a solution
20:38imirkin_: but afaik he hasn't worked on it in 6 months or so
23:10tajjada: i want to try to use nouveau with the blob firmware, but i haven't really done this before. I found the instructions on how to do a mmiotrace and extract the firmware from the blob.
23:10tajjada: but is there anything special i have to do in terms of options or configuration for nouveau
23:10tajjada: to tell it to load the blob firmware rather than its own?
23:10tajjada: or will it just autodetect it if i install it in the right path?
23:10tajjada: imirkin: thank you
23:11imirkin: however chances are this is not what you want
23:11tajjada: i want to test things
23:11tajjada: because i get random freezes
23:11tajjada: with nouveau
23:11imirkin: also you can use a script to extract firmware for fermi/kepler gpu's
23:11tajjada: and i found a bug report where people said that apparently it is firmware-related and goes away when using the blob's firmware
23:12imirkin: anyways, feel free to try whatever
23:12tajjada: it is not about my specific card, but i have similar symptoms as in this bug report https://bugs.freedesktop.org/show_bug.cgi?id=93629
23:13tajjada: i just wanted to give it a try and see what happens
23:13tajjada: you mentioned a "script" / better way to extract firmware than a mmiotrace?
23:14imirkin: it talks about video accel
23:14imirkin: but if you follow the instructions to the letter
23:14imirkin: then you'll also end up with pgraph firmware
23:15tajjada: ok, i only care about the pgraph one
23:16tajjada: i sorta ignored that wiki page because i thought it was just for video accel
23:36tajjada: imirkin_: apparently, i need to rename the pgraph firmware files, because nouveau now uses some new paths, correct?
23:36imirkin: that's right
23:36imirkin: starting with version ... not sure which version
23:37imirkin: i believe i mention what the mapping between old name and new name is in some bug
23:37imirkin: i can never remember which one is fecs and which one is gpccs
23:38tajjada: yeah, i am not sure which file to rename to what ... it would be nice if you (or someone) could tell me
23:39tajjada: my gpu is GK208B (saw in dmesg), or NV106 in nouveau terminology (saw in glxinfo)
23:42imirkin: ah... i think there's been very little testing on such GPUs
23:43tajjada: imirkin_: i still want to give it a try ... i am prepared for things to go wrong
23:44tajjada: these are the files for my gpu (judging by the file name) as extracted from your script:
23:44tajjada: nv106_fuc084 -> nve0_bsp
23:44tajjada: nv106_fuc085 -> nve0_vp
23:44tajjada: and nv106_fuc086 -> nvc0_ppp
23:44tajjada: if only i knew which one to rename to what ...
23:45imirkin: those are the video files
23:45tajjada: well, that's what your script gave me
23:45imirkin: you're looking for nv106_fuc41a[cd] and fuc409[cd]
23:46imirkin: yeah, i don't remember if i even extract GK208 firmware from that 325.15 archive
23:46tajjada: oh ... so if i am really keen on trying the firmware ... i have to do a mmiotrace then?
23:46Leftmost: Is there documentation of the output format of demmt/the ISA used?
23:47imirkin: Leftmost: you mean SM50?
23:47imirkin: Leftmost: not really. you can glean some ideas from PTX ISA docs, but those are docs for a fake isa
23:48imirkin: the names you see tend to be the ones used by nvdisasm... so it's a reasonable assumption that FADD is a floating point add :)
23:49tajjada: imirkin: ok, sorry for bothering you with my silly firmware stuff ... i'll figure it out; thank you for the info you gave me
23:49imirkin: tajjada: yeah, you might have to grab it from mmiotrace :(
23:50tajjada: imirkin: i'll do that; i am just really curious to see how nouveau will behave with blob firmware
23:50tajjada: on my card
23:50Leftmost: Yeah, figured. Just wasn't sure of all of the behaviors of things like, say, vmad. Not that I think it's hugely relevant to what I'm working on, but I was curious.
23:50imirkin: Leftmost: so for those, you should look at the PTX ISA docs
23:50imirkin: vmad is a "vector" multiply-add
23:51imirkin: except they call it "video"
23:51imirkin: it can address u8's and u16's inside of the 32-bit registers
23:51imirkin: envydis might not decode those 100% right btw
23:51imirkin: when in doubt, try it with nvdisasm
23:52imirkin: you might find the handlePFETCH in gm107 lowering instructive