nouveau: detect incompatible libglx.so
PATCH 1/1 nouveau: detect incompatible libglx.so
Exit with proper message instead of crashing when user forgot to uninstall the proprietary driver.
--- src/nv_driver.c | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-)
src/nv_driver.c +35 -0
@@ -194,6 +194,38 @@ NVIdentify(int flags) } } +static Bool glxIsCompatible () +{ +XF86ModuleData *d =LoaderSymbol ("glxModuleData" ); + +if (!d) { +xf86DrvMsg (-1 ,X_INFO , +"NOUVEAU: Couldn't find glx module informations. " +"Assuming it is disabled.\n" ); +return TRUE; + } + +if (!d->vers) { +xf86DrvMsg (-1 ,X_ERROR , +"NOUVEAU: glx module has no version information!\n" ); +return FALSE; + } + +if (!d->vers->vendor) { +xf86DrvMsg (-1 ,X_ERROR , +"NOUVEAU: glx module has no vendor information!\n" ); +return FALSE; + } + +Bool ok =strcmp (d->vers->vendor,MODULEVENDORSTRING ) ==0 ; +if (!ok) +xf86DrvMsg (-1 ,X_ERROR , +"NOUVEAU: glx module comes from incompatible vendor: \"%s\"\n" , + d->vers->vendor); + +return ok; +} +static Bool NVPciProbe (DriverPtr drv,int entity_num,struct pci_device *pci_dev,intptr_t match_data)
@@ -209,6 +241,9 @@ NVPciProbe(DriverPtr drv, int entity_num, struct pci_device *pci_dev,int chipset, ret;char *busid; +if (!glxIsCompatible ()) +return FALSE; +if (!xf86LoaderCheckSymbol ("DRICreatePCIBusID" )) {xf86DrvMsg (-1 ,X_ERROR ,"[drm] No DRICreatePCIBusID symbol\n" );return FALSE;
Signature · 1 line
1.7.1
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · Marcin Slusarz
Exit with proper message instead of crashing when user forgot to uninstall the proprietary driver.
Signed-off-by Marcin Slusarz <[email protected]>--- src/nv_driver.c | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-)
ping
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Marcin Slusarz
Quoted 7 lines · Marcin Slusarz
Exit with proper message instead of crashing when user forgot to uninstall the proprietary driver.
Signed-off-by Marcin Slusarz <[email protected]>--- src/nv_driver.c | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-)ping
I question the need for this. I quite often use nouveau with NVIDIA's libglx installed and don't see this crashing you report.
Ben.
Quoted 4 lines
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
Quoted 5 lines · Ben Skeggs
Quoted 4 lines · Marcin Slusarz
Quoted 3 lines · Marcin Slusarz
Exit with proper message instead of crashing when user forgot to uninstall the proprietary driver.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Signed-off-by Marcin Slusarz <[email protected]>--- src/nv_driver.c | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-)ping
I question the need for this. I quite often use nouveau with NVIDIA's libglx installed and don't see this crashing you report.
Really? It crashes for me every time. Maybe you were having libglx.so, but no (NVIDIA's) libGLcore.so (etc), so glx extension was disabled?
Before creation of Troubleshooting wiki page there were a lot of reports of crashes on #nouveau. They are still coming occasionally.
IMHO it would be great to have a driver which Just Works (tm) and if it can't it should clearly say why...
Marcin
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · Marcin Slusarz
Quoted 10 lines · Ben Skeggs
Quoted 9 lines · Marcin Slusarz
Quoted 7 lines · Marcin Slusarz
Exit with proper message instead of crashing when user forgot to uninstall the proprietary driver.
Signed-off-by Marcin Slusarz <[email protected]>--- src/nv_driver.c | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-)
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
ping
I question the need for this. I quite often use nouveau with NVIDIA's libglx installed and don't see this crashing you report.
Really? It crashes for me every time. Maybe you were having libglx.so, but no (NVIDIA's) libGLcore.so (etc), so glx extension was disabled?
Hmm, I can't reproduce it anymore...
Maybe a warning would be enough?
Marcin
A message that is not in the archive (sent off-list or not yet received): [email protected]
Marcin Slusarz kirjoitti torstai, 3. kesäkuuta 2010 15:15:54:
Quoted 15 lines · Marcin Slusarz
Quoted 14 lines · Ben Skeggs
Quoted 13 lines · Marcin Slusarz
Quoted 11 lines · Marcin Slusarz
Quoted 8 lines
Exit with proper message instead of crashing when user forgot to uninstall the proprietary driver.
Signed-off-by Marcin Slusarz <[email protected]>---
src/nv_driver.c | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-)ping
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
I question the need for this. I quite often use nouveau with NVIDIA's libglx installed and don't see this crashing you report.
Really? It crashes for me every time. Maybe you were having libglx.so, but no (NVIDIA's) libGLcore.so (etc), so glx extension was disabled?
Hmm, I can't reproduce it anymore...
For the record, IIRC this crash was recently fixed in mesa by a nvidia provided patch.
Signature · 1 line
Anssi Hannula