3

I'm not able to load a driver for a TFT display permanently on a Raspberry with Raspbian OS like specified here:

fbtft_device name=sainsmart18 verbose=0

in /etc/modules.

Whenever I restart the Raspberry and do

lsmod

the module is gone. However, setting it up manually with

sudo modprobe fbtft_device name=sainsmart18

works perfectly. Does anyone know why?

Output lsmod:

Module                  Size  Used by
cfg80211              420690  0 
rfkill                 16659  2 cfg80211
8192cu                528485  0 
pl2303                  8340  0 
usbserial              22429  1 pl2303
snd_soc_bcm2708_i2s     6701  0 
regmap_mmio             2969  1 snd_soc_bcm2708_i2s
snd_soc_core          132622  1 snd_soc_bcm2708_i2s
snd_compress            7736  1 snd_soc_core
bcm2835_gpiomem         2995  0 
snd_pcm_dmaengine       3287  1 snd_soc_core
spi_bcm2835             7248  0 
i2c_bcm2708             5014  0 
joydev                  9047  0 
evdev                  10232  6 
uio_pdrv_genirq         2966  0 
uio                     8235  1 uio_pdrv_genirq
i2c_dev                 6047  0 
snd_bcm2835            19769  3 
snd_pcm                74825  3 snd_bcm2835,snd_soc_core,snd_pcm_dmaengine
snd_timer              18157  1 snd_pcm
snd                    52116  11 snd_bcm2835,snd_soc_core,snd_timer,snd_pcm,snd_compress
fuse                   81710  3 
ipv6                  339514  32 

Output lsmod after sudo modprobe fbtft_device name=sainsmart18:

Module                  Size  Used by
fb_st7735r              3372  0 
fbtft_device           27517  0 
fbtft                  27628  2 fb_st7735r,fbtft_device
fb_sys_fops             1149  1 fbtft
syscopyarea             2789  1 fbtft
sysfillrect             3313  1 fbtft
sysimgblt               1837  1 fbtft
cfg80211              420690  0 
rfkill                 16659  2 cfg80211
pl2303                  8340  0 
8192cu                528485  0 
usbserial              22429  1 pl2303
snd_soc_bcm2708_i2s     6701  0 
regmap_mmio             2969  1 snd_soc_bcm2708_i2s
snd_soc_core          132622  1 snd_soc_bcm2708_i2s
snd_compress            7736  1 snd_soc_core
snd_pcm_dmaengine       3287  1 snd_soc_core
spi_bcm2835             7248  0 
i2c_bcm2708             5014  0 
bcm2835_gpiomem         2995  0 
uio_pdrv_genirq         2966  0 
uio                     8235  1 uio_pdrv_genirq
joydev                  9047  0 
evdev                  10232  6 
i2c_dev                 6047  0 
snd_bcm2835            19769  3 
snd_pcm                74825  3 snd_bcm2835,snd_soc_core,snd_pcm_dmaengine
snd_timer              18157  1 snd_pcm
snd                    52116  11 snd_bcm2835,snd_soc_core,snd_timer,snd_pcm,snd_compress
fuse                   81710  3 
ipv6                  339514  32 

Update:

I did

dmesg

and there is an error:

 [    4.813718] systemd[1]: systemd-modules-load.service: main process exited, code=exited, status=1/FAILURE
   [    4.847789] systemd[1]: Failed to start Load Kernel Modules.

I investigated further with

pi@raspberrypi ~ $ sudo systemctl status systemd-modules-load.service

The output is

    systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static)
   Active: failed (Result: exit-code) since Sun 2015-10-25 17:50:23 UTC; 15min ago
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
  Process: 86 ExecStart=/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
 Main PID: 86 (code=exited, status=1/FAILURE)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
8
  • Why do you use name=sainsmart18 when you do the manual modprobe, and name=adafruit22 when you add it to /etc/modules? What happens if you add fbtft_device name=sainsmart18 to your /etc/modules? – Phil B. Oct 25 '15 at 3:24
  • Sorry, that was a stupid typo. I'm using sainsmart18 also when I manually do modprobe. I have added fbtft_device name=sainsmart18 to /etc/modules, but the module doesn't show up when I reboot and do lsmod. With modprobe the screen of the TFT also turns black, which is an indicator that it actually works. Screen stays white when I just add fbtft_device name=sainsmart in /etc/modules. – user3255061 Oct 25 '15 at 11:33
  • Have you checked to make sure the driver is not blacklisted? Use nano -w /etc/modprobe.d/blacklist to check. Can you also post the output of lsmod and modprobe --list ? – Phil B. Oct 25 '15 at 12:09
  • Blacklist is empty. Updated output from lsmod, but there is no modprobe --list ("unrecognized option '--list'). Thanks a lot for your help, I really appreciate it. – user3255061 Oct 25 '15 at 14:31
  • How does lsmod look like after the manual 'modprobe' ? – Phil B. Oct 25 '15 at 14:45

Browse other questions tagged or ask your own question.