1

I have a embedded system which consists of a usb framebuffer display, and a customized embedded linux (3.10.59) box running Busybox (1.21.1).

There is software running a application which utilizes the display which usually gets mounted on fb0. But occasionally it gets mounted on fb1 and the quick-hack solution was to reboot, as when it got mounted on fb1 the framebuffer didn't work for some reason. When a cable was changed in the system recently ESD strikes would also cause the USB to remount to fb1 (likely due to a timeout on fb0).

Lets say that this event happens where the device jumps from fb0 to fb1, is it possible to forcibly remove both the device registrations, and re-enumerate so that it gets allocated back to fb0.

I have tried some udev tinkering by matching my device parameters to map it specificly to fb0 (as a symlink), but it does not appear to help in the case where the USB link is disturbed and fb0 is still in a timeout when it re-appears and subsequently gets mounted to fb1.

  • 1
    Just a hint: if exists, take a look at /etc/udev/rules.d. I.e. you bind an NIC to a device name by mac-addres (70-persistent-net.rules). I can imagine there is an comparable way for your fb device? Just found this: unix.stackexchange.com/questions/66901/… – ChristophS Feb 27 '18 at 9:55
  • I don't know any details about your frame buffer device, its drivers and how udev handles those, but the usually way to deal with changing device names is to make a custom udev rule that creates a symlink, and use the symlink instead. udevadm should help in identifying your device and its attributes. – dirkt Feb 27 '18 at 10:01
  • @ChristophS That is what i tried at first. It will still appear as fb1 during a ESD event that knocks fb0 out, perhaps because fb0 is still in a timeout state and has not disappeared. – Stonie Feb 27 '18 at 10:13
  • 1
    I'm not sure how this applies to a framebuffer device, but this discusses how to unbind a device to reset it, and this old code suggests how you might reset it. – meuh Mar 1 '18 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.