WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: loading ffmpeg4.tcz at boot causes unresponsive keyboard  (Read 3121 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
loading ffmpeg4.tcz at boot causes unresponsive keyboard
« on: October 02, 2019, 01:31:23 PM »
I'm on an old T400 Thinkpad with integrated intel graphics. I've been using TC10.1 64-bit as my daily driver for a few months now, without any issues.

Today I installed ffmpeg4.tcz to see if it would solve an issue in chromium web browser (youtube videos work, but videos on several other sites do not work).

To my surprise, when ffmpeg4 and its dependencies are loaded at boot, I end up with a completely unresponsive keyboard, necessitating a hard reboot and removing ffmpeg4.tcz from onboot.lst.

These are the video- and keyboard-related extensions that are loaded at boot via onboot.lst:
Code: [Select]
Xorg-7.7
Xorg-7.7-3d
graphics-4.19.10-tinycore64
xbindkeys
xf86-video-intel
xkeyboard-config
xorg-server

I'm a bit dumbfounded by this. Any idea how to troubleshoot?
« Last Edit: October 02, 2019, 01:41:04 PM by GNUser »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: loading ffmpeg4.tcz at boot causes unresponsive keyboard
« Reply #1 on: October 02, 2019, 03:21:30 PM »
Hi GNUser
I would try to narrow it down to one of the dependencies by loading them one at a time. Extensions sometimes have
  /usr/local/tce.installed  scripts that may also come into play. Get a copy of the  .tree  file:
http://tinycorelinux.net/10.x/x86_64/tcz/ffmpeg4.tcz.tree
Then do a  sort/unique  on it and see what it loads that's not currently listed in  /usr/local/tce.installed.  Load them one at a time
until one breaks the keyboard. Preferably loading extensions which have no dependencies first.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: loading ffmpeg4.tcz at boot causes unresponsive keyboard
« Reply #2 on: October 02, 2019, 03:31:13 PM »
Hi, Rich. Good idea. I'll do that tomorrow when I have time and will report back.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: loading ffmpeg4.tcz at boot causes unresponsive keyboard
« Reply #3 on: October 02, 2019, 03:55:22 PM »
Hi, Core guys!

Maybe the extensions' loading order matters? I thought that graphics must be loaded before Xorg. And in general applying their scripts is not commutative operation, i think.

Regards.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: loading ffmpeg4.tcz at boot causes unresponsive keyboard
« Reply #4 on: October 02, 2019, 11:35:04 PM »
Wow, that's quite the dependency tree! Undaunted, I finally found the culprit:

v4l-dvb-4.19.10-tinycore64.tcz

If I add that extension to my onboot.lst, keyboard is unresponsive after boot. Mouse works, so I can click on the aterm icon on wbar, but keyboard activity causes nothing to appear in the terminal. Ctrl+Alt+F1 also does not work, so I cannot change virtual consoles.

Only way to reboot is a hard reboot or, interestingly, I can use the keyboard to trigger an emergency reboot using L_Alt+SysRq+reisub. My guess is that the kernel can respond to the keyboard, but not X.

Another interesting observation is that loading ffmpeg4.tcz (which pulls in v4l-dvb-4.19.10-tinycore64.tcz as a dependency) after the system is up and running causes no problems, so my workaround for now is to load ffmpeg4.tcz via a job in ~/.X.d rather than via onboot.lst

Even though I have a workaround, I'm still interested in exploring this further (if some more experienced hands can guide me) to figure out how to load ffmpeg4 the proper way via onboot.lst.
« Last Edit: October 02, 2019, 11:40:07 PM by GNUser »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: loading ffmpeg4.tcz at boot causes unresponsive keyboard
« Reply #5 on: October 03, 2019, 12:04:36 AM »
Hi GNUser
The list of possible suspects I see is:
/usr/local/lib/modules/4.19.10-tinycore64/kernel/drivers/media/rc/ir-mce_kbd-decoder.ko.gz
and anything under:
/usr/local/lib/modules/4.19.10-tinycore64/kernel/drivers/media/rc/keymaps/
listed here:
http://tinycorelinux.net/10.x/x86_64/tcz/v4l-dvb-4.19.10-tinycore64.tcz.list
Of course that's just a guess on my part.

Even though the keyboard is unresponsive you could still capture some data. For example, create the following in .X.d:
Code: [Select]
lsmod > ~/lsmod.txt
dmesg > ~/dmesg.txt
cp /var/log/messages ~/messages.txt  # Assuming you use the syslog bootcode.
# Add a  sed  command to edit out the  ffmpeg4.tcz  entry from  onboot.lst.
sync
and so on. This also presumes a persistent  /home  directory. Then reboot and you can access the results.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: loading ffmpeg4.tcz at boot causes unresponsive keyboard
« Reply #6 on: October 03, 2019, 07:55:38 AM »
@newbies reading this thread: The command in ~/.X.d/  to load the extension just after the initial boot process is, of course, tce-load -i ffmpeg4

@jazzbiker: It doesn't matter where I put ffmpeg4.tcz in onboot.lst (if I put it first or last, either way it bombs my keyboard).

@ Rich: Good idea. I'll capture that and see if there are more specific clues. Will update the thread when I have the goods.
« Last Edit: October 03, 2019, 08:15:30 AM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: loading ffmpeg4.tcz at boot causes unresponsive keyboard
« Reply #7 on: October 03, 2019, 09:38:23 AM »
Thank you, Rich. Thanks to your suggestion, I compared the output of lsmod with and without ffmpeg4.tcz in onboot.lst. The only difference is that when ffmpeg4.tcz is in onboot.lst, there are 5 additional kernel modules loaded: uvcvideo and its dependencies (videobuf2_common, videobuf2_memops, videobuf2_v4l2 and videobuf2_malloc).

If I blacklist uvcvideo (via blacklist=uvcvideo boot code), ffmpeg4.tcz can be loaded via onboot.lst and my keyboard works just fine after booting.

Just for comparison, I booted into my Devuan ASCII (Debian Stretch without systemd) partition on this same laptop. Allowing uvcvideo to load at boot does not interfere with the keyboard in Devuan. Strange.

I don't mind blacklisting uvcvideo because it disables the webcam, which is a salubrious side effect. So even though numerous questions remain unanswered, I think we can consider this solved. As always, thank you for your incredibly helpful input :)

[BTW, this whole adventure was just to try to get video playback support in chromium, which remains broken. So we won the ffmpeg4.tcz battle but I'm still losing the war. Please send reinforcements if you can--see the other thread.]
« Last Edit: October 03, 2019, 09:42:01 AM by GNUser »