WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Problem with graphics drm modules  (Read 10095 times)

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Problem with graphics drm modules
« on: June 01, 2018, 02:51:14 PM »
I just updated all the extensions in my TC 9 32-bit VM. Now when I startx I get:

Code: [Select]
[   981.227] (EE) Backtrace:
[   981.227] (EE) 0: /usr/local/lib/xorg/Xorg (xorg_backtrace+0x43) [0x815d427]
[   981.227] (EE) 1: /usr/local/lib/xorg/Xorg (0x8048000+0x140afb) [0x8188afb]
[   981.228] (EE) 2: linux-gate.so.1 (__kernel_rt_sigreturn+0x0) [0xb7f09b20]
[   981.228] (EE) 3: /usr/local/lib/xorg/Xorg (xf86DPMSSet+0x59) [0x81778a7]
[   981.228] (EE) 4: /usr/local/lib/xorg/modules/drivers/vmware_drv.so (0xb7790000+0x7d1b) [0xb7797d1b]
[   981.228] (EE) 5: /usr/local/lib/xorg/modules/drivers/vmware_drv.so (0xb7790000+0x10226) [0xb77a0226]
[   981.228] (EE) 6: /usr/local/lib/xorg/modules/drivers/vmware_drv.so (0xb7790000+0x7de9) [0xb7797de9]
[   981.228] (EE) 7: /usr/local/lib/xorg/Xorg (0x8048000+0x145595) [0x818d595]
[   981.228] (EE) 8: /usr/local/lib/xorg/Xorg (0x8048000+0xabb29) [0x80f3b29]
[   981.228] (EE) 9: /usr/local/lib/xorg/Xorg (0x8048000+0x123d1e) [0x816bd1e]
[   981.228] (EE) 10: /usr/local/lib/xorg/Xorg (0x8048000+0x2c8d0) [0x80748d0]
[   981.228] (EE) 11: /lib/libc.so.6 (__libc_start_main+0x156) [0xb7a317c6]
[   981.228] (EE) 12: /usr/local/lib/xorg/Xorg (0x8048000+0x2c9c1) [0x80749c1]
[   981.228] (EE)
[   981.228] (EE) Segmentation fault at address 0x4e4550b7

I took the open-vm-tools out of onboot.lst, but still no luck. Dropping the graphics-4.14.10-tinycore.tcz so the drm modules aren't loaded keeps it from crashing. When loading graphics-4.14.10-tinycore.tcz but not loading xf86-video-vmware.tcz Xorg doesn't crash but all I get is a black screen. Seems like there is something about vmwgfx and drm modules Xorg doesn't like.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Problem with graphics drm modules
« Reply #1 on: June 01, 2018, 11:30:36 PM »
xf86-video-vmware was updated in both the x86 and x86_64 repos due to the xorg-server update.

Do you have the same problem in a 64bit vm?

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Problem with graphics drm modules
« Reply #2 on: June 02, 2018, 05:57:21 AM »
I ran tce-update and it updated Xorg and some xf86 drivers in my 64-bit VM. It was working before, but yes, it segfaults now. At least I knew to start sshd and connect before I ran startx to see what happened this time ;)  The VM isn't locked up, just the console is useless now.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Problem with graphics drm modules
« Reply #3 on: June 03, 2018, 01:50:37 AM »
'seems there's been a fix - updated extensions posted

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Problem with graphics drm modules
« Reply #4 on: June 03, 2018, 07:41:51 PM »
Anything updated besides xf86-video-vmware.tcz? It still segfaults.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Problem with graphics drm modules
« Reply #5 on: June 04, 2018, 05:40:17 AM »
The changelog for xf86-video-vmware suggests that the drm kernel modules may need refreshing as well.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Problem with graphics drm modules
« Reply #6 on: June 04, 2018, 10:09:09 AM »
I build a 4.14.47 kernel using the TC 4.14.10 config file and a modules initrd and they boot OK it seems:
Code: [Select]
Linux version 4.14.47-tinycore64 (tc@box) (gcc version 7.2.0 (GCC)) #1 SMP Mon Jun 4 14:04:20 UTC 2018
Command line: BOOT_IMAGE=/boot/vmlinuz64-9asj loglevel=3 vga=791 syslog noswap nozswap text tce=sda1/tce64 lang=en_US.UTF-8 udev.children-max=24 initrd=/boot/rootfs64-9-0.gz,/boot/modules64-9asj.gz
...
NX (Execute Disable) protection: active
SMBIOS 2.4 present.
DMI: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/19/2017
Hypervisor detected: VMware
vmware: TSC freq read from hypervisor : 4089.757 MHz
vmware: Host bus clock speed read from hypervisor : 66000000 Hz
vmware: using sched offset of 3074896016 ns
...
To make the modules extensions, I'm assuming that they're based on certain directories, and not specific files in the module tree? I don't suppose these could be posted in http://tinycorelinux.net/9.x/x86_64/release/src/kernel/? I could mine each *4.14*.list file, but that seems like it would require some guessing and so my not have the desired outcome.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Problem with graphics drm modules
« Reply #7 on: June 04, 2018, 10:59:15 AM »
https://github.com/tinycorelinux/sorter has the kernel module sorting script.
The only barriers that can stop you are the ones you create yourself.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Problem with graphics drm modules
« Reply #8 on: June 04, 2018, 12:58:14 PM »
Thanks. With the new kernel version and modules:

Code: [Select]
tc@box:/var/log$ uname -a
Linux box 4.14.47-tinycore64 #1 SMP Mon Jun 4 14:04:20 UTC 2018 x86_64 GNU/Linux
tc@box:/var/log$ lsmod
Module                  Size  Used by    Not tainted
vmwgfx                184320  1
ttm                    57344  1 vmwgfx
drm_kms_helper         90112  1 vmwgfx
drm                   225280  4 vmwgfx,ttm,drm_kms_helper
intel_agp              16384  1
intel_gtt              16384  1 intel_agp
agpgart                28672  4 ttm,drm,intel_agp,intel_gtt
i2c_piix4              16384  0
cpufreq_powersave      12288  0
cpufreq_userspace      12288  0
cpufreq_conservative    12288  0
vmw_vsock_vmci_transport    20480  1
squashfs               28672  0
zstd_decompress        77824  1 squashfs
xxhash                 12288  1 zstd_decompress
pcspkr                 12288  0
xhci_pci               12288  0
vmxnet3                40960  0
xhci_hcd               81920  1 xhci_pci
vmw_vmci               40960  1 vmw_vsock_vmci_transport
loop                   20480  0
ac                     12288  0

It still segfaults:

Code: [Select]
tc@box:/var/log$ cat Xorg.0.log
[ 16713.348]
X.Org X Server 1.20.0
X Protocol Version 11, Revision 0
[ 16713.348] Build Operating System: Linux 4.14.10-tinycore64 x86_64
[ 16713.348] Current Operating System: Linux box 4.14.47-tinycore64 #1 SMP Mon Jun 4 14:04:20 UTC 2018 x86_64
[ 16713.348] Kernel command line: BOOT_IMAGE=/boot/vmlinuz64-9asj loglevel=3 vga=791 syslog noswap nozswap text tce=sda1/tce64 lang=en_US.UTF-8 udev.children-max=24 initrd=/boot/rootfs64-9-0.gz,/boot/modules64-9asj.gz
[ 16713.348] Build Date: 29 May 2018  01:41:32PM
...
[ 16713.746] (EE) Backtrace:
[ 16713.746] (EE) 0: /usr/local/lib/xorg/Xorg (xorg_backtrace+0x49) [0x51b05c]
[ 16713.746] (EE) 1: /usr/local/lib/xorg/Xorg (0x400000+0x13bdf2) [0x53bdf2]
[ 16713.746] (EE) 2: /lib/libpthread.so.0 (0x7f2f89b20000+0x10030) [0x7f2f89b30030]
[ 16713.746] (EE) 3: /usr/local/lib/xorg/Xorg (0x400000+0x12d4a2) [0x52d4a2]
[ 16713.746] (EE) 4: /usr/local/lib/xorg/Xorg (RROutputIsLeased+0x14) [0x4c5c4e]
[ 16713.746] (EE) 5: /usr/local/lib/xorg/Xorg (xf86DPMSSet+0x54) [0x4cd2f8]
[ 16713.746] (EE) 6: /usr/local/lib/xorg/modules/drivers/vmware_drv.so (0x7f2f86348000+0x9b98) [0x7f2f86351b98]
[ 16713.746] (EE) 7: /usr/local/lib/xorg/modules/drivers/vmware_drv.so (0x7f2f86348000+0x1189c) [0x7f2f8635989c]
[ 16713.746] (EE) 8: /usr/local/lib/xorg/modules/drivers/vmware_drv.so (0x7f2f86348000+0x9c2e) [0x7f2f86351c2e]
[ 16713.746] (EE) 9: /usr/local/lib/xorg/Xorg (0x400000+0xcdce1) [0x4cdce1]
[ 16713.746] (EE) 10: /usr/local/lib/xorg/Xorg (0x400000+0x108bfc) [0x508bfc]
[ 16713.746] (EE) 11: /usr/local/lib/xorg/Xorg (0x400000+0x85631) [0x485631]
[ 16713.746] (EE) 12: /usr/local/lib/xorg/Xorg (0x400000+0x2de01) [0x42de01]
[ 16713.746] (EE) 13: /lib/libc.so.6 (__libc_start_main+0x15a) [0x7f2f88c6109d]
[ 16713.746] (EE) 14: /usr/local/lib/xorg/Xorg (_start+0x2a) [0x42defa]
[ 16713.746] (EE)
[ 16713.746] (EE) Segmentation fault at address 0x1000000b1
[ 16713.746] (EE)
Fatal server error:
[ 16713.746] (EE) Caught signal 11 (Segmentation fault). Server aborting

So the kernel module is (probably?) not it.

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Problem with graphics drm modules
« Reply #9 on: June 10, 2018, 07:35:32 PM »
From dmesg, the problem appears to be in hsetroot, provided by Xlibs.tcz:

Code: [Select]
hsetroot[9089]: segfault at e4 ip 00000000004024fd sp 00007ffea22fbdb0 error 4 in hsetroot[400000+4000]
Does this need to be updated too?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Problem with graphics drm modules
« Reply #10 on: June 10, 2018, 11:49:35 PM »
No, that happens with other buggy drivers too, and can't cause an X crash. hsetroot crashes if X has not fully started when it runs, even though X claims to have started.
The only barriers that can stop you are the ones you create yourself.

Offline thane

  • Hero Member
  • *****
  • Posts: 688

Offline andyj

  • Hero Member
  • *****
  • Posts: 1020
Re: Problem with graphics drm modules
« Reply #12 on: June 13, 2018, 05:40:44 AM »
See here:

http://forum.tinycorelinux.net/index.php/topic,20951.0.html

I don't see how this is relevant. X was working, I ran tce-update, and now it's not. Nothing else changed.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Problem with graphics drm modules
« Reply #13 on: June 13, 2018, 05:58:19 AM »
Hi andyj
Here are a couple of ideas you can try. In the  .xsession  file, change this:
Code: [Select]
"$DESKTOP" 2>/tmp/wm_errors &to this:
Code: [Select]
"$DESKTOP" 2>/tmp/wm_errors
The other thing you could try is adding something like a 2 second delay prior to the  .setbackground  call.
« Last Edit: June 13, 2018, 06:16:39 AM by Rich »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Problem with graphics drm modules
« Reply #14 on: June 13, 2018, 06:41:45 AM »
I updated hsetroot in CorePure64 Xlibs - it says it fixes a seg fault when the display is not present, maybe that will help?