# lcd4linux starting problem

## canis_lupus

When i running init script:

```
* Service lcd4linux starting

 Failed to start lcd4linux. Did you remember to set up /etc/lcd4linux.conf?                       [ !! ]

 * ERROR:  lcd4linux failed to start

```

My lcd4linux.conf:

```
Display LCD-Linux {

    Driver 'LCD-Linux'

    Size '20x2'

    UseBusy 0

}

# generic HD44780 display (LCD4Linux wiring)

Display HD44780-generic {

    Driver 'HD44780'

    Model 'generic'

    Port '0x378'

    Size '20x2'

    asc255bug 0

    Wire {

        RW      'GND'

        RS      'AUTOFD'

        ENABLE  'STROBE'

        ENABLE2 'GND'

        GPO     'INIT'

    }

}

# generic HD44780 display (WinAmp wiring)

Display HD44780-winamp {

    Driver 'HD44780'

    Model 'generic'

    UseBusy 0

    Port '/dev/parport0'

    Size '20x4'

    Icons 1

    Wire {

        RW      'AUTOFD'

        RS      'INIT'

        ENABLE  'STROBE'

#       ENABLE2 'GND'

#       GPO     'GND'

    }

}

Plugin Seti {

    Directory '/root/setiathome-3.08.i686-pc-linux-gnu'

}

Plugin MySQL {

    server 'gsmlandia.com'      # if none, localhost assumed

    port 3306                   # if none, MySQL default assumed

    user 'lcd4linux'            # if none, lcd4linux unix owner assumed

    password 'lcd4linux'        # if none, empty password assumed

    database 'lcd4linux'        # MUST be specified

}

Plugin Pop3 {

   server1 'localhost'

   port1 110

   user1 'michael'

   password1 'secret'

}

Widget OS {

    class 'Text'

    expression '*** '.uname('sysname').' '.uname('release').' ***'

    width 20

    align 'M'

    speed 100

    update tick

}

Widget CPU {

    class  'Text'

    expression  cpuinfo('cpu MHz')*0.001325

    #prefix 'Cpu'

        postfix ' GHz'

    width  8

        precision 4

    align  'L'

    update 300

}

Widget RAM {

    class  'Text'

    expression (meminfo('MemTotal')-meminfo('MemFree'))/1024

    prefix 'Ram '

    postfix 'MB'

    width  9

    precision 0

    align  'R'

    update 500

}

Widget RamBar {

    class 'Bar'

    expression  (meminfo('MemTotal')-meminfo('MemFree'))/1024

    expression2 (meminfo('SwapTotal')-meminfo('SwapFree'))/2048

    length 10

        max 1024

       style 'H'

    direction 'E'

    update 1000

}

Widget Busy {

    class 'Text'

    expression proc_stat::cpu('busy', 500)

    prefix 'Cpu'

    postfix '%'

    width 9

    precision 0

    align 'R'

    update 1000

}

Widget BusyBar {

    class 'Bar'

    expression  proc_stat::cpu('busy',   250)

    expression2 proc_stat::cpu('system', 250)

    length 10

        max 100

        style 'H'

    direction 'E'

    update 200

}

Widget Load {

    class 'Text'

    expression loadavg(1)

    prefix 'Load'

    postfix loadavg(1)>1.0?'!':' '

    width 10

    precision 1

    align 'R'

    update tick

}

Widget LoadBar {

    class 'Bar'

    expression  loadavg(1)

    max 2.0

    length 10

    direction 'E'

    update tack

}

Widget Disk {

    class 'Text'

    # disk.[rw]blk return blocks, we assume a blocksize of 512

    # to get the number in kB/s we would do blk*512/1024, which is blk/2

    # expression (proc_stat::disk('.*', 'rblk', 500)+proc_stat::disk('.*', 'wblk', 500))/2

    # with kernel 2.6, disk_io disappeared from /proc/stat but moved to /proc/diskstat

    # therefore you have to use another function called 'diskstats':

    expression diskstats('hd.', 'read_sectors', 500) + diskstats('hd.', 'write_sectors', 500)

    prefix 'disk'

    postfix ' '

    width 10

    precision 0

    align 'R'

    update tick

}

Widget DiskBar {

    class 'Bar'

    #expression  proc_stat::disk('.*', 'rblk', 500)

    #expression2 proc_stat::disk('.*', 'wblk', 500)

    # for kernel 2.6:

    expression  diskstats('hd.', 'read_sectors',  500)

    expression2 diskstats('hd.', 'write_sectors', 500)

    length 14

    direction 'E'

    update tack

}

Widget Eth0 {

    class 'Text'

    expression netdev('eth0', 'Rx_bytes', 1500)/1024

    prefix 'Net'

    postfix 'KB'

    width 9

    precision 0

    align 'R'

    update 500

}

Widget Eth0Bar {

    class 'Bar'

    expression  netdev('eth0', 'Rx_bytes', 1000)/1024

    expression2 netdev('eth0', 'Tx_bytes', 1000)/135

    length 10

    style 'H'

    min 0

    max 512

    direction 'E'

    update 210

}

Widget PPP {

    class 'Text'

    expression (ppp('Rx:0', 500)+ppp('Tx:0', 500))

    prefix 'PPP'

    width 9

    precision 0

    align 'R'

    update tick

}

Widget Temp {

    class 'Text'

    expression i2c_sensors('temp2_input')

    prefix 'Temp'

#    postfix 'C'

    width 8

    precision 0

    align 'R'

    update 3000

}

Widget TempBar {

    class 'Bar'

    expression  i2c_sensors('temp_input1')*1.0324-67

    min 40

    max 80

    length 10

    direction 'E'

    update tack

}

Widget Uptime {

    class 'Text'

    expression uptime('%d:%H:%M')

    width 14

    align 'R'

    prefix 'Uptime '

    update 30000

}

Widget BarTestVal {

    class 'Text'

    expression test::bar(0,100,50,0)

    prefix 'Test '

    width 9

    update 200

}

Widget LightningTest {

    class 'icon'

    speed 500

    visible test::onoff(0)

    bitmap {

        row1 '...***'

        row2 '..***.'

        row3 '.***..'

        row4 '.****.'

        row5 '..**..'

        row6 '.**...'

        row7 '**....'

        row8 '*.....'

    }

}

# Icons

Widget Cel {

    class 'icon'

    speed 500

#    visible cpu('busy', 500)-50

    bitmap {

        row1 '**...|.....'

        row2 '**...|.....'

        row3 '..**.|..**.'

        row4 '.*..*|.*..*'

        row5 '.*...|.*...'

        row6 '.*...|.*...'

        row7 '.*..*|.*..*'

        row8 '..**.|..**.'

    }

}

Layout L20x4 {

    Row1 {

        Col1  'Busy'

        Col11 'BusyBar'

    }

    Row3 {

        Col1 'Eth0'

        Col11 'Eth0Bar'

    }

    Row4 {

        Col1 'Ram'

        Col11 'RamBar'

    }

    Row2 {

        Col1 'Temp'

        Col13 'CPU'

        Col9 'Cel'

    }

}

Display 'HD44780-winamp'

Layout 'L20x4'

Variables {

   tick 500

   tack 100

   minute 60000

}

```

I don't mistake in this file.

When i run: 

# lcd4linux -F 

```
udelay: The file 'include/asm/msr.h' was missing at compile time.

udelay: Even if your CPU supports TSC, it will not be used!

udelay: You *really* should install msr.h and recompile LCD4linux!

```

But starting. What is goingon? What is TSC and msr.h?

----------

## Dottout

you set 

```

Display LCD-Linux {

    Driver 'LCD-Linux'

    Size '20x2'

    UseBusy 0

} 
```

but then you dont have any specs about that driver in the conf file. and.. make sure to put the right driver in LCD_DEVICES directive before emerging lcd4linux. btw, I suggest you lcdproc + lcd-stuff, they work like a charm  :Smile:  (I have a 4x20 crystalfontz connected to an asus router running openwrt)

----------

## canis_lupus

lcd4linux => lcdproc?

I will try. 

I have HD44780 on paralell port.

----------

## Dottout

lcdproc is a client\server solution. it has a daemon who accepts also external connections from your net (from different kind of clients) and its own client with sys stats

----------

## canis_lupus

I add LCD_DEVICES="LCD_DEVICES="hd44780 lcdlinux", compile lcdproc and configured and recompile lcd4linux:

lcdproc.conf:

```

[lcdproc]

Server=localhost

Port=13666

ReportLevel=2

ReportToSyslog=false

[CPU]

Active=True

OnTime=1

OffTime=1

ShowInvisible=false

[Iface]

Active=false

Interface0=eth0

Alias0=LAN

unit=byte

[Memory]

Active=false

[Load]

Active=false

LowLoad=0.05

HighLoad=1.3

[TimeDate]

Active=false

TimeFormat="%H %M%S"

DateFormat="%x"

[About]

Active=false

[SMP-CPU]

Active=false

[OldTime]

Active=false

TimeFormat="%H:%M:%S"

DateFormat="%x"

[BigClock]

Active=false

[Uptime]

Active=false

[Battery]

Active=false

[CPUGraph]

Active=false

[ProcSize]

Active=false

[Disk]

Active=false

[MiniClock]

Active=false

TimeFormat="%H:%M"

```

byt a don't know how i must configured lcd4linux for using lcdproc.

I have that:

```

Display LCD-Linux {

    Driver 'LCD-Linux'

    Size '20x4'

    UseBusy 0

}

/too many unimportant lines/

Display 'LCD-Linux'

```

but when i starting lcd4linux i get:

# lcd4linux -F

drv_init(LCD-Linux) failed: no such driver

----------

## Dottout

ehm, /etc/LCDd.conf is the server config file of lcdproc, if you have an hitachi chipset you need to set in LCDd.conf and in lcd4linux.conf hd44780 as driver. look at your lcd4linux.conf: you have the 

```
Display LCD-Linux {

    Driver 'LCD-Linux'

    Size '20x2'

    UseBusy 0

} 
```

section and under it you have a list of drivers with their sections. so, find the right one (I suppose hd44780) and put it in Display LCD-Linux directive

edit: maybe we made a bit of confusion: lcdproc client is a client for lcdproc daemon (LCDd). lcdproc's daemon accept connection from different kinds of client,like lcd-stuff for example. I told you about it as a valid alternative to lcd4linux, which only gives pc stats (if I remember right)

edit2: its night here, I go off, so for the next hours no support  :Wink: 

----------

## canis_lupus

Ok, but when i set lcd4linux to use HD44780, started LCDd and lcd4linux, then on lcd display i get *&$@*#&$^, because LCDd and lcd4 linux write to display in the same time.

/Sorry for my english/

----------

## Dottout

of course, they are bot deamon..use LCDd and lcdproc instead  :Very Happy: 

----------

## canis_lupus

Heh, lcd4linux is most configurable. It have many features like dual bars.

----------

## canis_lupus

What's that msr.h? How i can install it?

----------

