0

I have bought a touch LCD from waveshare and am trying to set it up. I have changed my config.txt to enable SPI and set up the touch device:

...
dtparam=spi=on
dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
dtparam=i2c_arm=on
dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1
start_x=1

I have added all the modules to /etc/modules:

snd-bcm2835                                                                                                                                       
i2c-bcm2708..                                                                                                                                     
i2c-dev                                                                                                                                           

ads7846 model=7846 cs=1 gpio_pendown=17  keep_vref_on=1 swap_xy=1 pressure_max=255 x_plate_ohms=60 x_min=200 x_max=3900 y_min=200 y_max=3900      
fbtft_device debug=3 rotate=90 name=flexfb speed=16000000 gpios=reset:25,dc:24                                                                    
flexfb  width=320  height=480  regwidth=16 init=-1,0xb0,0x0,-1,0x11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-1,0xE0,0x0F,0x1F

However, the modules will not be loaded upon booting. dmesg shows me an error with the systemd modules loader. This is what the service tells me:

$ systemctl status systemd-modules-load.service
● systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static)
   Active: failed (Result: exit-code) since Tue 2016-02-09 14:58:12 CET; 8min ago
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
  Process: 65 ExecStart=/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
 Main PID: 65 (code=exited, status=1/FAILURE)

Is there an error in my /etc/modules file? How can I debug this, and/or how does one correctly load modules on system startup?

By the way: I can modprobe those above lines just fine, which enables the LCD and I see a nice blinking cursor on that display (since there is not getty running).

  • I think this is related to this question over here: raspberrypi.stackexchange.com/questions/37611/… – Arne Feb 9 '16 at 14:38
  • Ok, got a bit nearer to a solution: I put the options into their own configuration under /etc/modprobe.d and can now run the systemctl line manually. However on boot I still get an error: "fbtft_device: spi_busnum_to_master(0) returned NULL". Seems to be a different error now. I am willing to answer this Q with the above mentioned answer and open up a new question. – Arne Feb 9 '16 at 15:25
  • If you are using systemd and enabling overlays you should not be fiddling with /etc/modules – Milliways Feb 9 '16 at 22:31
  • @Milliways No? So what is the right way to do that then? – Arne Feb 10 '16 at 7:32
  • 1
    The Pi is still in transition. Most should be loaded by Device Tree. See /boot/overlays/README. There may still be some which are not included, but i2c is. Some of these can be enabled by raspi-config (which just automates the process). The names of some of the modules has changed, just to add to the confusion. – Milliways Feb 10 '16 at 7:42

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.