Summary: | x11-drivers/nvidia-drivers No working ebuilds on Gentoo/FreeBSD | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | Enzo ME <enzo_me> |
Component: | FreeBSD | Assignee: | Gentoo/BSD Team <bsd+disabled> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | jer, nigoro.dev |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | FreeBSD | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
[WIP] sample patch for nvidia-drivers-375.10-r1.ebuild Xorg logfile patch for nvidia-drivers-375.10-r1.ebuild |
Description
Enzo ME
2016-11-05 13:01:50 UTC
Created attachment 452494 [details, diff]
[WIP] sample patch for nvidia-drivers-375.10-r1.ebuild
I confirmed that compile and install was successful.
But, I don't have the nvidia card.
Would you try this patch ?
FYI,
# emerge -pv x11-drivers/nvidia-drivers
Calculating dependencies... done!
[ebuild R ] x11-drivers/nvidia-drivers-375.10-r1:0/375::gentoo USE="X driver kms (-acpi) -compat -gtk3 (-multilib) (-pax_kernel) -static-libs -tools -uvm (-wayland)" 0 KiB
Note,
I have not test with USE=tools.
can not compile gtk+-2 on Gentoo/FreeBSD. I got Segmentation fault...
(In reply to Yuta SATOH from comment #1) > Created attachment 452494 [details, diff] [details, diff] > [WIP] sample patch for nvidia-drivers-375.10-r1.ebuild > > I confirmed that compile and install was successful. > But, I don't have the nvidia card. > > Would you try this patch ? > Yes i did. Patch and qmerge applyed successfully but still no luck. I try to compile from original ebuild by hands. Create empty files when it need. Copy Linux-elf so.files with renaming when it have to be. And result is only noise display without responsible image. > Note, > I have not test with USE=tools. > can not compile gtk+-2 on Gentoo/FreeBSD. I got Segmentation fault... glib2 library need to be patched (because freebsd has no some posix thread functions and modes) diff -urNp a/glib/gthread-posix.c b/glib/gthread-posix.c --- a/glib/gthread-posix.c 2015-08-30 14:17:42.561235000 +0600 +++ b/glib/gthread-posix.c 2015-08-30 20:33:00.452642000 +0600 @@ -98,7 +98,7 @@ g_mutex_impl_new (void) if G_UNLIKELY (mutex == NULL) g_thread_abort (errno, "malloc"); -#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP +#if defined(PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP) && !defined(__FreeBSD__) pthread_mutexattr_init (&attr); pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_ADAPTIVE_NP); pattr = &attr; @@ -107,7 +107,7 @@ g_mutex_impl_new (void) if G_UNLIKELY ((status = pthread_mutex_init (mutex, pattr)) != 0) g_thread_abort (status, "pthread_mutex_init"); -#ifdef PTHREAD_ADAPTIVE_MUTEX_NP +#if defined(PTHREAD_ADAPTIVE_MUTEX_NP) && !defined(__FreeBSD__) pthread_mutexattr_destroy (&attr); #endif @@ -654,7 +654,8 @@ g_cond_impl_new (void) #ifdef HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP #elif defined (HAVE_PTHREAD_CONDATTR_SETCLOCK) && defined (CLOCK_MONOTONIC) if G_UNLIKELY ((status = pthread_condattr_setclock (&attr, CLOCK_MONOTONIC)) != 0) - g_thread_abort (status, "pthread_condattr_setclock"); + if G_UNLIKELY ((status = pthread_condattr_setclock (&attr, CLOCK_VIRTUAL)) != 0) + pthread_condattr_setclock (&attr, 0); #else #error Cannot support GCond on your platform. #endif I have less segfaults with this patch both gtk2 and gtk3 utils Created attachment 452620 [details]
Xorg logfile
Logfile after applying patch and kldloading new version of nvidia.ko
Additionally kernel module nvidia-modeset.ko compiles successfully but it does not load because it have undeclared symbol that is present in nvidia.ko module. Created attachment 452882 [details, diff]
patch for nvidia-drivers-375.10-r1.ebuild
Thanks for testing.
I confirmed the issue that nvidia-modeset.ko does not work properly.
# kldload nvidia-modeset
kldload: an error occurred while loading the module. Please check dmesg(8) for more details.
# dmesg | tail -n 2
link_elf_obj: symbol nvidia_get_rm_ops undefined
linker_load_file: Unsupported file type
Cause investigation)
# USE=-tools ebuild nvidia-drivers-375.10-r1.ebuild clean compile
# nm /var/tmp/portage/x11-drivers/nvidia-drivers-375.10-r1/work/NVIDIA-FreeBSD-x86_64-375.10/src/nvidia/nvidia.ko | grep nvidia_get_
00000000005c29fc t nvidia_get_card_info
00000000005c4db6 t nvidia_get_rm_ops
# USE=-tools ebuild nvidia-drivers-375.10-r1.ebuild merge
# nm /boot/modules/nvidia.ko | grep nvidia_get_
00000000005c29fc t nvidia_get_card_info
hmm... nvidia_get_rm_ops is removed when merged.
I added kernel_FreeBSD? ( strip ) to RESTRICT.
New patch results,
# nm /boot/modules/nvidia.ko | grep nvidia_get_
00000000005c29fc t nvidia_get_card_info
00000000005c4db6 t nvidia_get_rm_ops
# (Don't forget to unload the old nvidia module.)
# kldunload nvidia
# kldunload nvidia-modeset
# kldload nvidia-modeset
# dmesg | tail -n 1
nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 375.10 Fri Oct 14 09:32:07 PDT 2016
(In reply to Enzo ME from comment #3) > Created attachment 452620 [details] > Xorg logfile > > Logfile after applying patch and kldloading new version of nvidia.ko I found the following line from your log. (II) NVIDIA(0): Validated MetaModes: (II) NVIDIA(0): "NULL" Please use nvidia-modeset instead of nvidia. Details please see https://github.com/freebsd/freebsd-ports/blob/master/x11/nvidia-driver/files/pkg-message.in#L34 Aaaaand oooopen! (c)(CL4P-TP) Many thanks! It works for me! It seems problem was solved. I hope that maintainers will apply changes to portage tree in future. (In reply to Enzo ME from comment #7) > Aaaaand oooopen! (c)(CL4P-TP) > Many thanks! It works for me! It seems problem was solved. I hope that > maintainers will apply changes to portage tree in future. Thank you for checking. please don't close bug until the maintainer merges patch into main tree... @maintainer, Would you review the patch ? *-fbsd is gone. |