WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: xf86-video-nouveau.tcz -> missing nouveau.ko module  (Read 22566 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14816
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #15 on: October 27, 2019, 09:17:37 PM »
Hmm - it looks like the missing module is not listed..

Offline madmax

  • Jr. Member
  • **
  • Posts: 98
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #16 on: October 28, 2019, 07:36:43 AM »
Hello:
Hmm - it looks like the missing module is not listed..
From what I understand, all dependencies are met.

Just guessing here ...
Could it possibly be a mismatch issue? 

See: https://nouveau.freedesktop.org/wiki/TroubleShooting/#index1h3
Quote from: nouveau.freedesktop.org/wiki/TroubleShooting
Your DDX does not work with your current kernel and/or libdrm. There are at least three possible reasons for this: the nouveau DRM kernel module is not loaded, a version mismatch between the Nouveau DRM and libdrm, or KMS being disabled.

A search for the error string in dmesg got me only four hits, but this one may have a clue (?):
https://pyra-handheld.com/boards/threads/contributing-to-pyraos.83744/page-3

Quote from: pyra-handheld.com/boards
Trying to force load:
Code: [Select]
root@letux:~# modprobe -f pvrsrvkm
[  183.101188] pvrsrvkm: bad vermagic: kernel tainted.
[  183.106342] Disabling lock debugging due to kernel taint
[  183.112517] pvrsrvkm: loading out-of-tree module taints kernel.
[  183.120513] pvrsrvkm: Unknown symbol drm_legacy_mmap (err -2)
modprobe: ERROR: could not insert 'pvrsrvkm': Unknown symbol in module, or unknown parameter (see dmesg)
root@letux:~#

This means the 4.19.4-letux-lpae-zmatt-pyra kernel module is not compatible to the 4.19.4-letux kernel...
In other words: an archive of pvrsrvkm.ko variants isn't enough if the matching kernel image + other modules is missing.

I don't know what to make of it (or the rest of the thread) but you surely can.

Thanks in advance,

MM

Offline madmax

  • Jr. Member
  • **
  • Posts: 98
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #17 on: October 31, 2019, 07:40:03 AM »
Hello:
... the depends line in “modinfo nouveau” to see which module is missing.

Like I said earlier and unless I am missing something, all module depencencies seem to have been met.
ie: the result of *depends* (drm,drm_kms_helper,ttm,agpgart,mxm-wmi,wmi,video,i2c-algo-bit) is shown when each of the dependencies are looked for via lsmod.

So, what could be the issue now with the nouveau-KERNEL extension you posted?
I understand that you do not have access to the hardware but I can run any tests you need.

Do you need me to run any more tests?

Thanks in advance,

MM

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #18 on: October 31, 2019, 09:02:00 AM »
Hi madmax
I suggest starting with some basic information so we can compare what's not working with what is.
Execute:
Code: [Select]
dmesg > dmesg.txt
lsmod > lsmod.txt

Boot up the working Mint disk.
Execute:
Code: [Select]
dmesg > dmesgMint.txt
lsmod > lsmodMint.txt

Attach those 4 files to your next post.

Offline madmax

  • Jr. Member
  • **
  • Posts: 98
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #19 on: October 31, 2019, 02:23:43 PM »
Hello Rich:
... some basic information so we can compare ...
Done.
Let me know if you need anything else.

Thanks a lot for your help.
Best,

MM

Offline madmax

  • Jr. Member
  • **
  • Posts: 98
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #20 on: November 01, 2019, 07:12:45 PM »
Hello Rich:
... some basic information so we can compare ...

I was thinking that maybe comparing the outputs of modinfo mouveau could be useful to you.
I'm attaching both, from Mint and from TC.

Cheers,

MM

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14816
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #21 on: November 05, 2019, 06:00:59 AM »
Hmm - maybe CONFIG_DRM_LEGACY needs to set as well...

Offline madmax

  • Jr. Member
  • **
  • Posts: 98
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #22 on: November 05, 2019, 06:17:58 AM »
Hello Juanito:
Hmm - maybe CONFIG_DRM_LEGACY needs to set as well...
You may be right, sort of makes sense.

It's just an educated guess on my behalf, but seeing that my Quadro FX580 cards are only supported by the NVidia 340.xx legacy drivers, it could be (?) that setting CONFIG_DRM_LEGACY would enable the Nouveau drivers to work as they should.

If you would upload the nouveau-KERNEL extension with both the CONFIG_DRM_NOUVEAU and CONFIG_DRM_LEGACY options set, I'll test it and report back attaching the new versions of the files I uploaded earlier.

Thank you very much for your help in this matter.

Best,
MM

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14816
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #23 on: November 05, 2019, 06:23:21 AM »
CONFIG_DRM_LEGACY cannot be set standalone, it needs (at least) "Enable legacy drivers".

From Kconfig:
Quote
menuconfig DRM_LEGACY
   bool "Enable legacy drivers (DANGEROUS)"
   depends on DRM && MMU
   select DRM_VM
   help
     Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous
     APIs to user-space, which can be used to circumvent access
     restrictions and other security measures. For backwards compatibility
     those drivers are still available, but their use is highly
     inadvisable and might harm your system.

That notwithstanding, I believe you would need to remaster tinycore (vmlinuz) for these changes to work.

Offline madmax

  • Jr. Member
  • **
  • Posts: 98
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #24 on: November 05, 2019, 06:44:57 AM »
Hello Juanito:

CONFIG_DRM_LEGACY cannot be set standalone, it needs (at least) "Enable legacy drivers".
From Kconfig:
Quote
menuconfig DRM_LEGACY
   bool "Enable legacy drivers (DANGEROUS)"
   depends on DRM && MMU
   select DRM_VM
   help
     Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous
     APIs to user-space, which can be used to circumvent access
     restrictions and other security measures. For backwards compatibility
     those drivers are still available, but their use is highly
     inadvisable and might harm your system.
That notwithstanding, I believe you would need to remaster tinycore (vmlinuz) for these changes to work.

Am I to undestand that, at least in TC10.x, the only way to get the Nouveau drivers to work properly is by remastering TinyCore?

Thanks in advance,

MM

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14816
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #25 on: November 05, 2019, 06:50:15 AM »
affirmative - I believe that vmlinuz would need to be replaced and an extension made for the additional modules.

Note that, given the kconfig warning, it is unlikely that this functionality would be added in future versions of tinycore.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #26 on: November 05, 2019, 09:46:50 AM »
Hi Juanito
CONFIG_DRM_LEGACY cannot be set standalone, it needs (at least) "Enable legacy drivers".

From Kconfig:
Quote
menuconfig DRM_LEGACY
   bool "Enable legacy drivers (DANGEROUS)"
   depends on DRM && MMU
   select DRM_VM
   help
     Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous
     APIs to user-space, which can be used to circumvent access
     restrictions and other security measures. For backwards compatibility
     those drivers are still available, but their use is highly
     inadvisable and might harm your system.

That notwithstanding, I believe you would need to remaster tinycore (vmlinuz) for these changes to work.

That looks like may be the issue. From  drm_vm.c:
Code: [Select]
int drm_legacy_mmap(struct file *filp, struct vm_area_struct *vma)
{
struct drm_file *priv = filp->private_data;
struct drm_device *dev = priv->minor->dev;
int ret;

if (drm_dev_is_unplugged(dev))
return -ENODEV;

mutex_lock(&dev->struct_mutex);
ret = drm_mmap_locked(filp, vma);
mutex_unlock(&dev->struct_mutex);

return ret;
}
EXPORT_SYMBOL(drm_legacy_mmap);

It seems odd that nouveau didn't include drm_vm as a dependency.

Offline madmax

  • Jr. Member
  • **
  • Posts: 98
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #27 on: November 07, 2019, 04:00:11 PM »
Hello Juanito:

Now that the xfe issue has been solved, I'd like to see if we get back to this one: TinyCore, Nouveau, it's lack of stability and why it won't work in TC.

... vmlinuz would need to be replaced and an extension made for the additional modules.
... given the kconfig warning, it is unlikely that this functionality would be added in future versions ...

I've been spending some time burning DVDs and checking what drivers different distributions use and what goes on inside the kernel configuration files.

While I clearly understand the type of problems that enabling DRM_LEGACY could entail ...

    menuconfig DRM_LEGACY
       bool "Enable legacy drivers (DANGEROUS)"
       depends on DRM && MMU
       select DRM_VM
       help
         Enable legacy DRI1 drivers. Those drivers expose unsafe and dangerous
         APIs to user-space, which can be used to circumvent access
         restrictions and other security measures. For backwards compatibility
         those drivers are still available, but their use is highly
         inadvisable and might harm your system.

... the fact that Devuan, Mint, Open Suse and Ubuntu (to name just these four) use Nouveau drivers in their distributions makes me think that we may be looking at this the wrong way or there's something we are missing. (using the pronoun we very generously).

I, for one, am missing absolutely everything, but I'm trying. 8^O!

What I mean to say is that the chaps in charge of packaging these mainstream distributions are certainly not oblivious to the menuconfig DRM_LEGACY warning you have quoted and there is absolutely nothing that leads me to think they are going rogue with respect to kernel security issues, so to speak. Especially in the case of the Devuan maintainers.

But in all these distributions the Nouveau drivers work out of the box with the right native resolution for the installed screen and will run my three screen hardware setup with just some tweaking of a bespoke xorg.conf file, to the extent that said file can be transplanted between distributions without much issue.

So ...
What is going on?

I booted up Devuan, Mint and OpenSuse to see what I could find in terms of kernel configuration and try to compare it to the TCore kernel configuration, but I can't find it. I did found some pertinent entries (ie: Nouveau and DRM_LEGACY) in the other distribution files, albeit in different places.

Devuan kernel configuration:
Code: [Select]
ACP (Audio CoProcessor) Configuration
#
CONFIG_DRM_AMD_ACP=y
CONFIG_DRM_NOUVEAU=m                                     <<<<<<<                 
CONFIG_NOUVEAU_DEBUG=5
CONFIG_NOUVEAU_DEBUG_DEFAULT=3
CONFIG_DRM_NOUVEAU_BACKLIGHT=y
CONFIG_DRM_I915=m
# CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set
CONFIG_DRM_I915_USERPTR=y
# CONFIG_DRM_I915_GVT is not set
---
# Display Interface Bridges
#
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
CONFIG_HSA_AMD=m
CONFIG_DRM_LEGACY=y                                      <<<<<<<
CONFIG_DRM_TDFX=m
CONFIG_DRM_R128=m
# CONFIG_DRM_I810 is not set
CONFIG_DRM_MGA=m
CONFIG_DRM_SIS=m
CONFIG_DRM_VIA=m
CONFIG_DRM_SAVAGE=m

Mint 17.1 kernel configuration. Note that there is no DRM_LEGACY entry:
Code: [Select]
# I2C encoder or helper chips
#
CONFIG_DRM_I2C_ADV7511=m
CONFIG_DRM_I2C_CH7006=m
CONFIG_DRM_I2C_SIL164=m
CONFIG_DRM_I2C_NXP_TDA998X=m
CONFIG_DRM_PTN3460=m
CONFIG_DRM_TDFX=m
CONFIG_DRM_R128=m
CONFIG_DRM_RADEON=m
# CONFIG_DRM_RADEON_UMS is not set
CONFIG_DRM_NOUVEAU=m                                        <<<<<<<
CONFIG_NOUVEAU_DEBUG=5
CONFIG_NOUVEAU_DEBUG_DEFAULT=3
CONFIG_DRM_NOUVEAU_BACKLIGHT=y
CONFIG_DRM_I810=m
CONFIG_DRM_I915=m
CONFIG_DRM_I915_KMS=y
CONFIG_DRM_I915_FBDEV=y
CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT=y
CONFIG_DRM_MGA=m
CONFIG_DRM_SIS=m
CONFIG_DRM_VIA=m
CONFIG_DRM_SAVAGE=m
CONFIG_DRM_VMWGFX=m
CONFIG_DRM_VMWGFX_FBCON=y
CONFIG_DRM_GMA500=m
CONFIG_DRM_GMA600=y
CONFIG_DRM_GMA3600=y
CONFIG_DRM_UDL=m
CONFIG_DRM_AST=m
# CONFIG_DRM_MGAG200 is not set
CONFIG_DRM_CIRRUS_QEMU=m
CONFIG_DRM_QXL=m
# CONFIG_DRM_BOCHS is not set
CONFIG_DRM_PANEL=y

Open Suse kernel configuration:
Code: [Select]
# AMD Library routines
#
CONFIG_CHASH=m
# CONFIG_CHASH_STATS is not set
# CONFIG_CHASH_SELFTEST is not set
CONFIG_DRM_NOUVEAU=m                                                <<<<<<<
CONFIG_NOUVEAU_DEBUG=5
CONFIG_NOUVEAU_DEBUG_DEFAULT=3
# CONFIG_NOUVEAU_DEBUG_MMU is not set
CONFIG_DRM_NOUVEAU_BACKLIGHT=y
CONFIG_DRM_I915=m
# CONFIG_DRM_I915_ALPHA_SUPPORT is not set
CONFIG_DRM_I915_CAPTURE_ERROR=y
CONFIG_DRM_I915_COMPRESS_ERROR=y
CONFIG_DRM_I915_USERPTR=y
CONFIG_DRM_I915_GVT=y
CONFIG_DRM_I915_GVT_KVMGT=m
---
# Display Interface Bridges
#
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
CONFIG_HSA_AMD=m
# CONFIG_DRM_HISI_HIBMC is not set
CONFIG_DRM_TINYDRM=m
CONFIG_TINYDRM_MIPI_DBI=m
CONFIG_TINYDRM_ILI9225=m
CONFIG_TINYDRM_ILI9341=m
# CONFIG_TINYDRM_MI0283QT is not set
CONFIG_TINYDRM_REPAPER=m
CONFIG_TINYDRM_ST7586=m
CONFIG_TINYDRM_ST7735R=m
CONFIG_DRM_XEN=y
CONFIG_DRM_XEN_FRONTEND=m
# CONFIG_DRM_LEGACY is not set                                           <<<<<<<
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=m
# CONFIG_DRM_LIB_RANDOM is not set

Like I said earlier, I can't make heads or tails of all this but I think the secret to making Nouveau feasible in TCore is there.

I'm attaching the full configuration files for you to see. In case you need more info, please let me know.

Cheers,
MM

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14816
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #28 on: November 08, 2019, 01:58:36 AM »
Since I don't have the hardware to test, I suggest you compile the kernel yourself - i.e.
Code: [Select]
$ tce-load -i compiletc perl5 bash ncursesw-dev bc glibc_apps elfutils-dev
$ tar xf linux-4.19.10-patched.txz
$ cp config-4.19.10-tinycore64 linux-4.19.10/.config
$ cd  linux-4.19.10
$ make oldconfig
$ make menuconfig [figure out which combination enables the module with the missing symbols]
$ make

Once done, you'll need bzImage/vmlinuz, the nouveau module and whatever the modules with the missing symbols are called.
« Last Edit: November 17, 2019, 02:30:00 AM by Juanito »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: xf86-video-nouveau.tcz -> missing nouveau.ko module
« Reply #29 on: November 08, 2019, 04:36:20 AM »
...and once you can compile the kernel, you can also compile the Nvidia drivers, which support your card much better than nouveau.
The only barriers that can stop you are the ones you create yourself.