X_GLXCreateNewContext problem on Fedora 24

I’m having issues with GL applications.

>glxinfo
name of display: :0
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  153 (GLX)
  Minor opcode of failed request:  24 (X_GLXCreateNewContext)
  Value in failed request:  0x0
  Serial number of failed request:  45
  Current serial number in output stream:  46

Xorg log:

X.Org X Server 1.18.4
Release Date: 2016-07-19
[     3.951] X Protocol Version 11, Revision 0
[     3.951] Build Operating System:  4.6.4-301.fc24.x86_64 
[     3.951] Current Operating System: Linux 4.8.6-201.fc24.x86_64 #1 SMP Thu Nov 3 14:38:57 UTC 2016 x86_64
[     3.951] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.8.6-201.fc24.x86_64 root=UUID=d8bc0b45-0491-4705-b154-8e68b54ff417 ro quiet LANG=en_US.UTF-8
[     3.951] Build Date: 25 August 2016  05:27:31PM
[     3.951] Build ID: xorg-x11-server 1.18.4-4.fc24 
[     3.951] Current version of pixman: 0.34.0
[     3.951] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[     3.951] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[     3.951] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Nov 15 11:11:40 2016
[     3.961] (==) Using config file: "/etc/X11/xorg.conf"
[     3.961] (==) Using config directory: "/etc/X11/xorg.conf.d"
[     3.961] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[     3.970] (==) ServerLayout "Layout0"
[     3.970] (**) |-->Screen "Screen0" (0)
[     3.970] (**) |   |-->Monitor "Monitor0"
[     3.972] (**) |   |-->Device "Device0"
[     3.972] (**) |-->Input Device "Keyboard0"
[     3.972] (**) |-->Input Device "Mouse0"
[     3.972] (==) Automatically adding devices
[     3.972] (==) Automatically enabling devices
[     3.972] (==) Automatically adding GPU devices
[     3.972] (==) Max clients allowed: 256, resource mask: 0x1fffff
[     3.975] (**) FontPath set to:
	/usr/share/fonts/default/Type1,
	catalogue:/etc/X11/fontpath.d,
	built-ins
[     3.975] (**) ModulePath set to "/usr/lib64/nvidia/xorg,/usr/lib64/xorg/modules"
[     3.975] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
[     3.975] (WW) Disabling Keyboard0
[     3.975] (WW) Disabling Mouse0
[     3.975] (II) Loader magic: 0x824dc0
[     3.975] (II) Module ABI versions:
[     3.975] 	X.Org ANSI C Emulation: 0.4
[     3.975] 	X.Org Video Driver: 20.0
[     3.975] 	X.Org XInput driver : 22.1
[     3.975] 	X.Org Server Extension : 9.0
[     3.976] (++) using VT number 1

[     3.977] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[     3.977] (II) xfree86: Adding drm device (/dev/dri/card0)
[     3.978] (--) PCI:*(0:1:0:0) 10de:0fc1:10de:093c rev 161, Mem @ 0xe3000000/16777216, 0xd0000000/268435456, 0xe0000000/33554432, I/O @ 0x00003000/128, BIOS @ 0x????????/131072
[     3.978] (WW) "glamoregl" will not be loaded unless you've specified it to be loaded elsewhere.
[     3.978] (II) "glx" will be loaded by default.
[     3.978] (II) LoadModule: "glx"
[     3.983] (II) Loading /usr/lib64/nvidia/xorg/libglx.so
[     4.072] (II) Module glx: vendor="NVIDIA Corporation"
[     4.072] 	compiled for 4.0.2, module version = 1.0.0
[     4.072] 	Module class: X.Org Server Extension
[     4.074] (II) NVIDIA GLX Module  367.57  Mon Oct  3 20:28:17 PDT 2016
[     4.075] (II) LoadModule: "nvidia"
[     4.081] (II) Loading /usr/lib64/xorg/modules/drivers/nvidia_drv.so
[     4.095] (II) Module nvidia: vendor="NVIDIA Corporation"
[     4.095] 	compiled for 4.0.2, module version = 1.0.0
[     4.095] 	Module class: X.Org Video Driver
[     4.097] (II) NVIDIA dlloader X Driver  367.57  Mon Oct  3 20:03:48 PDT 2016
[     4.097] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[     4.102] (II) Loading sub module "fb"
[     4.102] (II) LoadModule: "fb"
[     4.102] (II) Loading /usr/lib64/xorg/modules/libfb.so
[     4.105] (II) Module fb: vendor="X.Org Foundation"
[     4.105] 	compiled for 1.18.4, module version = 1.0.0
[     4.105] 	ABI class: X.Org ANSI C Emulation, version 0.4
[     4.105] (II) Loading sub module "wfb"
[     4.105] (II) LoadModule: "wfb"
[     4.110] (II) Loading /usr/lib64/xorg/modules/libwfb.so
[     4.112] (II) Module wfb: vendor="X.Org Foundation"
[     4.112] 	compiled for 1.18.4, module version = 1.0.0
[     4.112] 	ABI class: X.Org ANSI C Emulation, version 0.4
[     4.112] (II) Loading sub module "ramdac"
[     4.112] (II) LoadModule: "ramdac"
[     4.112] (II) Module "ramdac" already built-in
[     4.118] (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
[     4.118] (==) NVIDIA(0): RGB weight 888
[     4.118] (==) NVIDIA(0): Default visual is TrueColor
[     4.118] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[     4.120] (**) NVIDIA(0): Option "MetaModes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
[     4.120] (**) NVIDIA(0): Enabling 2D acceleration
[     4.640] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[     4.640] (--) NVIDIA(0):     CRT-0 (boot)
[     4.640] (--) NVIDIA(0):     DFP-0
[     4.640] (--) NVIDIA(0):     DFP-1
[     4.651] (--) NVIDIA(0): Samsung SME2420L (CRT-0): connected
[     4.651] (--) NVIDIA(0): Samsung SME2420L (CRT-0): 400.0 MHz maximum pixel clock
[     4.651] (--) NVIDIA(0): 
[     4.652] (--) NVIDIA(0): DFP-0: disconnected
[     4.652] (--) NVIDIA(0): DFP-0: Internal TMDS
[     4.652] (--) NVIDIA(0): DFP-0: 165.0 MHz maximum pixel clock
[     4.652] (--) NVIDIA(0): 
[     4.652] (--) NVIDIA(0): DFP-1: disconnected
[     4.652] (--) NVIDIA(0): DFP-1: Internal TMDS
[     4.652] (--) NVIDIA(0): DFP-1: 330.0 MHz maximum pixel clock
[     4.652] (--) NVIDIA(0): 
[     4.652] (II) NVIDIA(0): NVIDIA GPU GeForce GT 640 (GK107) at PCI:1:0:0 (GPU-0)
[     4.652] (--) NVIDIA(0): Memory: 1048576 kBytes
[     4.652] (--) NVIDIA(0): VideoBIOS: 80.07.26.00.2f
[     4.652] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[     4.652] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display
[     4.652] (**) NVIDIA(0):     device Samsung SME2420L (CRT-0) (Using EDID frequencies
[     4.652] (**) NVIDIA(0):     has been enabled on all display devices.)
[     4.654] (II) NVIDIA(0): Validated MetaModes:
[     4.654] (II) NVIDIA(0):     "nvidia-auto-select+0+0{ForceFullCompositionPipeline=On}"
[     4.654] (II) NVIDIA(0): Virtual screen size determined to be 1920 x 1080
[     4.662] (--) NVIDIA(0): DPI set to (93, 94); computed from "UseEdidDpi" X config
[     4.662] (--) NVIDIA(0):     option
[     4.662] (--) Depth 24 pixmap format is 32 bpp
[     4.663] (II) NVIDIA: Using 12288.00 MB of virtual memory for indirect memory
[     4.663] (II) NVIDIA:     access.
[     4.666] (II) NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon
[     4.666] (II) NVIDIA(0):     may not be running or the "AcpidSocketPath" X
[     4.666] (II) NVIDIA(0):     configuration option may not be set correctly.  When the
[     4.666] (II) NVIDIA(0):     ACPI event daemon is available, the NVIDIA X driver will
[     4.666] (II) NVIDIA(0):     try to use it to receive ACPI event notifications.  For
[     4.666] (II) NVIDIA(0):     details, please see the "ConnectToAcpid" and
[     4.666] (II) NVIDIA(0):     "AcpidSocketPath" X configuration options in Appendix B: X
[     4.666] (II) NVIDIA(0):     Config Options in the README.
[     4.680] (II) NVIDIA(0): Setting mode "nvidia-auto-select+0+0{ForceFullCompositionPipeline=On}"
[     4.737] (==) NVIDIA(0): Disabling shared memory pixmaps
[     4.737] (==) NVIDIA(0): Backing store enabled
[     4.737] (==) NVIDIA(0): Silken mouse enabled
[     4.738] (**) NVIDIA(0): DPMS enabled
[     4.739] (II) Loading sub module "dri2"
[     4.739] (II) LoadModule: "dri2"
[     4.739] (II) Module "dri2" already built-in
[     4.739] (II) NVIDIA(0): [DRI2] Setup complete
[     4.739] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[     4.741] (--) RandR disabled
[     4.744] (II) SELinux: Disabled by boolean
[     4.744] (II) Initializing extension GLX
[     4.744] (II) Indirect GLX disabled.
[     4.852] (II) config/udev: Adding input device Power Button (/dev/input/event1)
[     4.853] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[     4.853] (**) Power Button: Applying InputClass "system-keyboard"
[     4.853] (II) LoadModule: "evdev"
[     4.853] (II) Loading /usr/lib64/xorg/modules/input/evdev_drv.so
[     4.859] (II) Module evdev: vendor="X.Org Foundation"
[     4.859] 	compiled for 1.18.3, module version = 2.10.3
[     4.859] 	Module class: X.Org XInput Driver
[     4.859] 	ABI class: X.Org XInput driver, version 22.1
[     4.860] (II) Using input driver 'evdev' for 'Power Button'
[     4.860] (**) Power Button: always reports core events
[     4.860] (**) evdev: Power Button: Device: "/dev/input/event1"
[     4.860] (--) evdev: Power Button: Vendor 0 Product 0x1
[     4.860] (--) evdev: Power Button: Found keys
[     4.860] (II) evdev: Power Button: Configuring as keyboard
[     4.860] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1/event1"
[     4.860] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6)
[     4.860] (**) Option "xkb_rules" "evdev"
[     4.860] (**) Option "xkb_layout" "us"
[     4.860] (II) config/udev: Adding input device Power Button (/dev/input/event0)
[     4.861] (**) Power Button: Applying InputClass "evdev keyboard catchall"
[     4.861] (**) Power Button: Applying InputClass "system-keyboard"
[     4.861] (II) Using input driver 'evdev' for 'Power Button'
[     4.861] (**) Power Button: always reports core events
[     4.861] (**) evdev: Power Button: Device: "/dev/input/event0"
[     4.861] (--) evdev: Power Button: Vendor 0 Product 0x1
[     4.861] (--) evdev: Power Button: Found keys
[     4.861] (II) evdev: Power Button: Configuring as keyboard
[     4.861] (**) Option "config_info" "udev:/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0/event0"
[     4.861] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 7)
[     4.861] (**) Option "xkb_rules" "evdev"
[     4.861] (**) Option "xkb_layout" "us"
[     4.862] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=3 (/dev/input/event8)
[     4.862] (II) No input driver specified, ignoring this device.
[     4.862] (II) This device may have been added with another device file.
[     4.862] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=7 (/dev/input/event9)
[     4.862] (II) No input driver specified, ignoring this device.
[     4.862] (II) This device may have been added with another device file.
[     4.862] (II) config/udev: Adding input device HDA NVidia HDMI/DP,pcm=8 (/dev/input/event10)
[     4.862] (II) No input driver specified, ignoring this device.
[     4.862] (II) This device may have been added with another device file.
[     4.863] (II) config/udev: Adding input device HDA Intel PCH Front Headphone (/dev/input/event7)
[     4.863] (II) No input driver specified, ignoring this device.
[     4.863] (II) This device may have been added with another device file.
[     4.863] (II) config/udev: Adding input device HDA Intel PCH Rear Mic (/dev/input/event4)
[     4.863] (II) No input driver specified, ignoring this device.
[     4.863] (II) This device may have been added with another device file.
[     4.864] (II) config/udev: Adding input device HDA Intel PCH Front Mic (/dev/input/event5)
[     4.864] (II) No input driver specified, ignoring this device.
[     4.864] (II) This device may have been added with another device file.
[     4.864] (II) config/udev: Adding input device HDA Intel PCH Line Out (/dev/input/event6)
[     4.864] (II) No input driver specified, ignoring this device.
[     4.864] (II) This device may have been added with another device file.
[     4.865] (II) config/udev: Adding input device USB Optical Mouse (/dev/input/event2)
[     4.865] (**) USB Optical Mouse: Applying InputClass "evdev pointer catchall"
[     4.865] (II) Using input driver 'evdev' for 'USB Optical Mouse'
[     4.865] (**) USB Optical Mouse: always reports core events
[     4.865] (**) evdev: USB Optical Mouse: Device: "/dev/input/event2"
[     4.917] (--) evdev: USB Optical Mouse: Vendor 0x461 Product 0x4d81
[     4.917] (--) evdev: USB Optical Mouse: Found 3 mouse buttons
[     4.917] (--) evdev: USB Optical Mouse: Found scroll wheel(s)
[     4.917] (--) evdev: USB Optical Mouse: Found relative axes
[     4.917] (--) evdev: USB Optical Mouse: Found x and y relative axes
[     4.917] (II) evdev: USB Optical Mouse: Configuring as mouse
[     4.917] (II) evdev: USB Optical Mouse: Adding scrollwheel support
[     4.917] (**) evdev: USB Optical Mouse: YAxisMapping: buttons 4 and 5
[     4.917] (**) evdev: USB Optical Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
[     4.917] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.3/2-1.3:1.0/0003:0461:4D81.0001/input/input5/event2"
[     4.917] (II) XINPUT: Adding extended input device "USB Optical Mouse" (type: MOUSE, id 8)
[     4.917] (II) evdev: USB Optical Mouse: initialized for relative axes.
[     4.917] (**) USB Optical Mouse: (accel) keeping acceleration scheme 1
[     4.917] (**) USB Optical Mouse: (accel) acceleration profile 0
[     4.917] (**) USB Optical Mouse: (accel) acceleration factor: 2.000
[     4.917] (**) USB Optical Mouse: (accel) acceleration threshold: 4
[     4.918] (II) config/udev: Adding input device USB Optical Mouse (/dev/input/mouse0)
[     4.918] (II) No input driver specified, ignoring this device.
[     4.918] (II) This device may have been added with another device file.
[     4.919] (II) config/udev: Adding input device DELL Dell USB Entry Keyboard (/dev/input/event3)
[     4.919] (**) DELL Dell USB Entry Keyboard: Applying InputClass "evdev keyboard catchall"
[     4.919] (**) DELL Dell USB Entry Keyboard: Applying InputClass "system-keyboard"
[     4.919] (II) Using input driver 'evdev' for 'DELL Dell USB Entry Keyboard'
[     4.919] (**) DELL Dell USB Entry Keyboard: always reports core events
[     4.919] (**) evdev: DELL Dell USB Entry Keyboard: Device: "/dev/input/event3"
[     4.919] (--) evdev: DELL Dell USB Entry Keyboard: Vendor 0x413c Product 0x2107
[     4.919] (--) evdev: DELL Dell USB Entry Keyboard: Found keys
[     4.919] (II) evdev: DELL Dell USB Entry Keyboard: Configuring as keyboard
[     4.919] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.4/2-1.4:1.0/0003:413C:2107.0002/input/input6/event3"
[     4.919] (II) XINPUT: Adding extended input device "DELL Dell USB Entry Keyboard" (type: KEYBOARD, id 9)
[     4.919] (**) Option "xkb_rules" "evdev"
[     4.919] (**) Option "xkb_layout" "us"
[     9.150] (--) NVIDIA(GPU-0): Samsung SME2420L (CRT-0): connected
[     9.150] (--) NVIDIA(GPU-0): Samsung SME2420L (CRT-0): 400.0 MHz maximum pixel clock

nvidia-smi:

>nvidia-smi 
Tue Nov 15 18:07:34 2016       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 367.57                 Driver Version: 367.57                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GT 640      Off  | 0000:01:00.0     N/A |                  N/A |
| 55%   36C    P8    N/A /  N/A |    125MiB /   979MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0                  Not Supported                                         |
+-----------------------------------------------------------------------------+

I have the same issue using the packaged driver from rpmfusion or installing from the .run script.
nvidia-bug-report.log.gz (188 KB)

Can you attach the output of nvidia-bug-report.sh

See attached.
nvidia-bug-report.log.gz (188 KB)