ltsp does not configure xorg.conf correctly

Bug #149006 reported by hasan
10
Affects Status Importance Assigned to Milestone
ltsp (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

My thin client gets an incorrect X configuration during boot, and consequently fails to load ldm.
A gutsy live cd on the same computer generates a correct xorg.conf file.

Ltsp should use the same routines to generate the xorg.conf file as does the live cd so that problems like this can be avoided. Below are the xorg.conf obtained by the ltsp network boot and by a live cd boot on the same computer:

xorg.conf.ltsp:

Section "ServerLayout"
 Identifier "X.org Configured"
 Screen 0 "Screen0" 0 0
 InputDevice "Mouse0" "CorePointer"
 InputDevice "Keyboard0" "CoreKeyboard"
 InputDevice "stylus" "SendCoreEvents"
 InputDevice "cursor" "SendCoreEvents"
 InputDevice "eraser" "SendCoreEvents"
 InputDevice "Synaptics Touchpad"
EndSection

Section "Files"
 RgbPath "/etc/X11/rgb"
 ModulePath "/usr/lib/xorg/modules"
 FontPath "/usr/share/fonts/X11/misc"
 FontPath "/usr/share/fonts/X11/cyrillic"
 FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
 FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
 FontPath "/usr/share/fonts/X11/Type1"
 FontPath "/usr/share/fonts/X11/100dpi"
 FontPath "/usr/share/fonts/X11/75dpi"
 FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
 Load "GLcore"
 Load "dbe"
 Load "dri"
 Load "extmod"
 Load "glx"
 Load "record"
 Load "xtrap"
EndSection

Section "InputDevice"
 Identifier "Keyboard0"
 Driver "kbd"
 Option "XkbRules" "xorg"
 Option "XkbModel" "pc105"
 Option "XkbLayout" "us"
EndSection

Section "InputDevice"
 Identifier "Mouse0"
 Driver "mouse"
 Option "Protocol" "auto"
 Option "Device" "/dev/input/mice"
 Option "ZAxisMapping" "4 5 6 7"
 Option "Emulate3Buttons" "true"
EndSection

Section "InputDevice"
 Identifier "Synaptics Touchpad"
 Driver "synaptics"
 Option "SendCoreEvents" "true"
 Option "Device" "/dev/psaux"
 Option "Protocol" "auto-dev"
 Option "HorizScrollDelta" "0"
EndSection

Section "InputDevice"
 Driver "wacom"
 Identifier "stylus"
 Option "Device" "/dev/input/wacom"
 Option "Type" "stylus"
 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
 Driver "wacom"
 Identifier "eraser"
 Option "Device" "/dev/input/wacom"
 Option "Type" "eraser"
 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
 Driver "wacom"
 Identifier "cursor"
 Option "Device" "/dev/input/wacom"
 Option "Type" "cursor"
 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "Monitor"
 #DisplaySize 280 210 # mm
 Identifier "Monitor0"
 VendorName "GSM"
 ModelName "500E"
 ### Comment all HorizSync and VertRefresh values to use DDC:
 HorizSync 30.0 - 54.0
 VertRefresh 50.0 - 120.0
 Option "DPMS"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option "NoAccel" # [<bool>]
        #Option "SWcursor" # [<bool>]
        #Option "ColorKey" # <i>
        #Option "CacheLines" # <i>
        #Option "Dac6Bit" # [<bool>]
        #Option "DRI" # [<bool>]
        #Option "NoDDC" # [<bool>]
        #Option "ShowCache" # [<bool>]
        #Option "XvMCSurfaces" # <i>
        #Option "PageFlip" # [<bool>]
 Identifier "Card0"
 Driver "i810"
 VendorName "Intel Corporation"
 BoardName "82815 CGC [Chipset Graphics Controller]"
 BusID "PCI:0:2:0"
EndSection

Section "Screen"
 Identifier "Screen0"
 Device "Card0"
 Monitor "Monitor0"
 SubSection "Display"
  Viewport 0 0
  Depth 1
 EndSubSection
 SubSection "Display"
  Viewport 0 0
  Depth 4
 EndSubSection
 SubSection "Display"
  Viewport 0 0
  Depth 8
 EndSubSection
 SubSection "Display"
  Viewport 0 0
  Depth 15
 EndSubSection
 SubSection "Display"
  Viewport 0 0
  Depth 16
 EndSubSection
 SubSection "Display"
  Viewport 0 0
  Depth 24
 EndSubSection
EndSection

Section "DRI"
        Mode 0666
EndSection

xorg.conf.livecd

# xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
EndSection

Section "InputDevice"
 Identifier "Generic Keyboard"
 Driver "kbd"
 Option "CoreKeyboard"
 Option "XkbRules" "xorg"
 Option "XkbModel" "pc105"
 Option "XkbLayout" "us"
EndSection

Section "InputDevice"
 Identifier "Configured Mouse"
 Driver "mouse"
 Option "CorePointer"
 Option "Device" "/dev/input/mice"
 Option "Protocol" "ImPS/2"
 Option "ZAxisMapping" "4 5"
 Option "Emulate3Buttons" "true"
EndSection

Section "InputDevice"
 Driver "wacom"
 Identifier "stylus"
 Option "Device" "/dev/input/wacom"
 Option "Type" "stylus"
 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
 Driver "wacom"
 Identifier "eraser"
 Option "Device" "/dev/input/wacom"
 Option "Type" "eraser"
 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "InputDevice"
 Driver "wacom"
 Identifier "cursor"
 Option "Device" "/dev/input/wacom"
 Option "Type" "cursor"
 Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection

Section "Device"
 Identifier "Intel Corporation 82815 CGC [Chipset Graphics Controller]"
 Driver "intel"
 BusID "PCI:0:2:0"
EndSection

Section "Monitor"
 Identifier "500E"
 Option "DPMS"
EndSection

Section "Screen"
 Identifier "Default Screen"
 Device "Intel Corporation 82815 CGC [Chipset Graphics Controller]"
 Monitor "500E"
 DefaultDepth 24
 SubSection "Display"
  Modes "1024x768" "800x600" "720x450" "720x400" "640x480"
 EndSubSection
EndSection

Section "ServerLayout"
 Identifier "Default Layout"
 Screen "Default Screen"
 InputDevice "Generic Keyboard"
 InputDevice "Configured Mouse"

# Uncomment if you have a wacom tablet
# InputDevice "stylus" "SendCoreEvents"
# InputDevice "cursor" "SendCoreEvents"
# InputDevice "eraser" "SendCoreEvents"
EndSection

Related branches

Revision history for this message
Oliver Grawert (ogra) wrote :

we did exactly that for the last releases, the problem with using teh maintainer scripts of xserver-xorg like the liveCD does is that it needs to load the whole debconf database which is an extremely slow process over the network, the script we use in gutsy currently relies on the values Xorg itseklf thinks are right. apparently it doesnt think the intel driver is the right one can you check if everything works if you create a /var/lib/tftpboot/ltsp/i386/lts.conf file with the following content:

[default]
    XSERVER=intel

Revision history for this message
hasan (hassanidin) wrote :

Appending

[default]
    XSERVER=intel

to /var/lib/tftpboot/ltsp/i386/lts.conf I get a new configuration file, which however doesn't work as I still cannot start the X server.

$ diff xorg.conf.ltspintel xorg.conf.ltsp
97c97
< ### Available Driver "intel"
---
> ### Available Driver options are:-
112c112
< Driver "intel"
---
> Driver "i810"

Revision history for this message
Oliver Grawert (ogra) wrote :

thats pretty weird, it works fine here on all test systems... could you add SCREEN_02=shell and SCREEN_07=ldm to the above file and get the /var/log/Xorg.6.log file from the client (tty2 has an open shell with these variables set)

Revision history for this message
hasan (hassanidin) wrote :

OK.
On server:
$ cat /var/lib/tftpboot/ltsp/i386/lts.conf
[default]
 XSERVER=intel
 SCREEN_02=shell
 SCREEN_07=ldm

Rebooting client, and I get the /var/log/Xorg.6.log attached.

Revision history for this message
hasan (hassanidin) wrote :

To solve the issue of the fault xorg.conf generated by ltsp I tried:

$ cat /var/lib/tftpboot/ltsp/i386/lts.conf
[default]
  XF86CONFIG_FILE = xorg.conf.livecd

where xorf.conf.livecd is placed in /opt/ltsp/i386/etc. This did not have an effect.
How can I tell ltsp to use a custom xorg.conf?

Revision history for this message
Oliver Grawert (ogra) wrote :

the path you give that variable needs to be relative to /opt/ltsp/i386 so in your case it needs to be XF86CONFIG_FILE = /etc/xorg.conf.livecd

according to your logfile the card isnt capable of using 32Bit depth, does it work if you set X_COLOR_DEPTH=16 ?

Revision history for this message
hasan (hassanidin) wrote :

Yes, it works with:
[00:04:75:52:80:ec]
 XSERVER=intel
 X_COLOR_DEPTH=16

However my card does support 32Bit depth, because it works better with:
[00:04:75:52:80:ec]
 XF86CONFIG_FILE = /etc/xorg.conf.livecd

I would have preferred if ltsp used the xserver-scripts, that way I would not have to edit the xorg.conf files for every thin client.
You could just use the xserver scripts on the first boot, then store the configuration files in some sort of a database for fast retrieval during every subsequent boot.

Revision history for this message
Oliver Grawert (ogra) wrote :

well, with calling dpkg-reconfigure xserver-xorg (what the liveCD does) your boot takes about 1min longer ...
we only switched because to many people complained about the speed of the old method. there is surely room for improvement but its very unlikely that we'll switch back to the slow ressource hungry variant.

Revision history for this message
francoisb (francois-barillon) wrote :

I've got the same problem as Hasan with an Intel 82815 video card.

the ltsp finds the "i810" driver and a worksation install finds "intel".

I made two custom xorg.conf called in lts.conf (XF86CONFIG_FILE = /etc/X11/xorg-i810.conf or XF86CONFIG_FILE = /etc/X11/xorg-intel.conf).

But both are working well.

Then I noticed another difference :

- in the ltsp-calculated xorg.conf, HorizSync and vertRefresh are defined in the monitor section.

- but in the workstation xorg.conf, there is a "Display" subsection in the "Screen" section
 SubSection "Display"
  Modes "1024x768" "800x600" "640x480"
 EndSubSection

It seems that this add make my Xserver work.

Could it possible to fix prefered modes in the lts.conf ?

Revision history for this message
francoisb (francois-barillon) wrote :

Sorry, I don't think the problem has something with Display modes.

I've got that, following the thin client /var/log/Xorg.1*

(EE) I810(0): Given bpp (32) is not supported by i810 driver
(EE) Screen(s) found, but none has a usable configuration

Is that make us go further ?

Revision history for this message
francoisb (francois-barillon) wrote :

Setting
       X_COLOR_DEPTH=16
in the lts.conf is sufficient to get X to start (little longer than) fixing an entire xorg.conf).

Revision history for this message
francoisb (francois-barillon) wrote :

I've made a simplest to get the thin client X work :

        X_MODE_0="1024x768"
        X_COLOR_DEPTH=24

The only problem with the i810 driver is that it is trying to use 32 bpp color depth.

Oliver Grawert (ogra)
Changed in ltsp:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ltsp - 5.0.40~bzr20080212-0ubuntu1

---------------
ltsp (5.0.40~bzr20080212-0ubuntu1) hardy; urgency=low

  * new upstream version with fixes for the following bugs:
   LP: #149006 (default to 24bit colordepth)
   LP: #190419 (move .nbi image out of the way before regeneration)
   LP: #113709 (security server sources.list entry handling)
   LP: #135419 (chroot upgrade issues)
   LP: #177926 (documentation fix)
   LP: #184316 (client locale handling (default to en_GB if none is set)
   LP: #189237 (fix path handling, remove trailing slashes from arguments)
   LP: #132397 (handle proxies with apt)
   LP: #148109 (only use getltscfg if lts.conf is valid)
   LP: #172459 (only use free nbd devices to do network swapping)
  * install our own dhcpd.conf
  * add rdesktop to ltsp-client deps (LP: #153589)
  * fix xorg deps of ltsp-client (LP: #158735)
  * add plugin for mythbuntu kiosk setup (LP: #188413), thanks to Michael Haas

 -- Oliver Grawert <email address hidden> Mon, 12 Feb 2008 17:48:48 +0100

Changed in ltsp:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.