* [PATCH 0/2] fix qemu segfault with nVidia proprietary driver
@ 2011-03-16 12:32 Zhai Edwin
2011-03-16 12:32 ` [PATCH 1/2] qemu: Give warnings when running qemu if nVidia GL library installed on host Zhai Edwin
2011-03-16 12:32 ` [PATCH 2/2] qemu: Use mesa's libGL rather than nVidia's to avoid segfault of qemu Zhai Edwin
0 siblings, 2 replies; 4+ messages in thread
From: Zhai Edwin @ 2011-03-16 12:32 UTC (permalink / raw)
To: poky
From: Zhai Edwin <edwin.zhai@intel.com>
Saul,
When linked with nVidia's libGL, qemu get segfault. Patch 1 give warnings to
end user if nVidia's libGL installed. Patch 2 use original libGL to avoid
segfault.
Scott can comment on patch 2 if something better to do this.
Thanks for Kevin's help.
Best Rgds,
edwin
Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: gzhai/fix2
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=gzhai/fix2
Thanks,
Zhai Edwin <edwin.zhai@intel.com>
---
Zhai Edwin (2):
qemu: Give warnings when running qemu if nVidia GL library installed
on host
qemu: Use mesa's libGL rather than nVidia's to avoid segfault of qemu
scripts/poky-qemu | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] qemu: Give warnings when running qemu if nVidia GL library installed on host
2011-03-16 12:32 [PATCH 0/2] fix qemu segfault with nVidia proprietary driver Zhai Edwin
@ 2011-03-16 12:32 ` Zhai Edwin
2011-03-16 12:32 ` [PATCH 2/2] qemu: Use mesa's libGL rather than nVidia's to avoid segfault of qemu Zhai Edwin
1 sibling, 0 replies; 4+ messages in thread
From: Zhai Edwin @ 2011-03-16 12:32 UTC (permalink / raw)
To: poky
From: Zhai Edwin <edwin.zhai@intel.com>
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
---
scripts/poky-qemu | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/scripts/poky-qemu b/scripts/poky-qemu
index c76b3ab..2d94a11 100755
--- a/scripts/poky-qemu
+++ b/scripts/poky-qemu
@@ -394,6 +394,18 @@ if [ "$libgl" != 'yes' ]; then
exit 1;
fi
+# qemu got segfault if linked with nVidia's libgl
+nv_libgl='no'
+
+test -e /usr/lib/nvidia*/libGL.so && nv_libgl='yes'
+test -e /usr/lib64/nvidia*/libGL.so && nv_libgl='yes'
+
+if [ "$nv_libgl" == 'yes' ]; then
+ echo "************** !!!Warning!!! **************
+ You installed nVidia's libGL.so that probably lead qemu segfault!
+ Pls. uninstall proprietary nVidia driver or make mesa libgl precede nvidia's."
+fi
+
INTERNAL_SCRIPT=`which poky-qemu-internal`
. $INTERNAL_SCRIPT
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] qemu: Use mesa's libGL rather than nVidia's to avoid segfault of qemu
2011-03-16 12:32 [PATCH 0/2] fix qemu segfault with nVidia proprietary driver Zhai Edwin
2011-03-16 12:32 ` [PATCH 1/2] qemu: Give warnings when running qemu if nVidia GL library installed on host Zhai Edwin
@ 2011-03-16 12:32 ` Zhai Edwin
2011-03-16 18:18 ` Scott Garman
1 sibling, 1 reply; 4+ messages in thread
From: Zhai Edwin @ 2011-03-16 12:32 UTC (permalink / raw)
To: poky
From: Zhai Edwin <edwin.zhai@intel.com>
Proprietary nVidia driver introduce its own libGL that precede mesa's.
qemu has segfault if linked with it. This fix try to use mesa's libGL
in such case.
[YOCTO #649]
[YOCTO #698]
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
---
scripts/poky-qemu | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/scripts/poky-qemu b/scripts/poky-qemu
index 2d94a11..1d04c37 100755
--- a/scripts/poky-qemu
+++ b/scripts/poky-qemu
@@ -404,6 +404,10 @@ if [ "$nv_libgl" == 'yes' ]; then
echo "************** !!!Warning!!! **************
You installed nVidia's libGL.so that probably lead qemu segfault!
Pls. uninstall proprietary nVidia driver or make mesa libgl precede nvidia's."
+
+ # To avoid segfault of qemu, skip nVidia's libGL and use mesa's instead
+ echo "Skip nVidia's libGL!"
+ export LD_PRELOAD="/usr/lib/libGL.so $LD_PRELOAD"
fi
INTERNAL_SCRIPT=`which poky-qemu-internal`
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 2/2] qemu: Use mesa's libGL rather than nVidia's to avoid segfault of qemu
2011-03-16 12:32 ` [PATCH 2/2] qemu: Use mesa's libGL rather than nVidia's to avoid segfault of qemu Zhai Edwin
@ 2011-03-16 18:18 ` Scott Garman
0 siblings, 0 replies; 4+ messages in thread
From: Scott Garman @ 2011-03-16 18:18 UTC (permalink / raw)
To: poky
On 03/16/2011 05:32 AM, Zhai Edwin wrote:
> From: Zhai Edwin<edwin.zhai@intel.com>
>
> Proprietary nVidia driver introduce its own libGL that precede mesa's.
> qemu has segfault if linked with it. This fix try to use mesa's libGL
> in such case.
>
> [YOCTO #649]
> [YOCTO #698]
>
> Signed-off-by: Zhai Edwin<edwin.zhai@intel.com>
This fixes the problem on my Ubuntu 10.10 system using NVIDIA
proprietary graphics.
Acked-by: Scott Garman <scott.a.garman@intel.com>
> ---
> scripts/poky-qemu | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/poky-qemu b/scripts/poky-qemu
> index 2d94a11..1d04c37 100755
> --- a/scripts/poky-qemu
> +++ b/scripts/poky-qemu
> @@ -404,6 +404,10 @@ if [ "$nv_libgl" == 'yes' ]; then
> echo "************** !!!Warning!!! **************
> You installed nVidia's libGL.so that probably lead qemu segfault!
> Pls. uninstall proprietary nVidia driver or make mesa libgl precede nvidia's."
> +
> + # To avoid segfault of qemu, skip nVidia's libGL and use mesa's instead
> + echo "Skip nVidia's libGL!"
> + export LD_PRELOAD="/usr/lib/libGL.so $LD_PRELOAD"
> fi
>
> INTERNAL_SCRIPT=`which poky-qemu-internal`
--
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-16 18:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-16 12:32 [PATCH 0/2] fix qemu segfault with nVidia proprietary driver Zhai Edwin
2011-03-16 12:32 ` [PATCH 1/2] qemu: Give warnings when running qemu if nVidia GL library installed on host Zhai Edwin
2011-03-16 12:32 ` [PATCH 2/2] qemu: Use mesa's libGL rather than nVidia's to avoid segfault of qemu Zhai Edwin
2011-03-16 18:18 ` Scott Garman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.