Revision 2 of 2026-11-25 20:31 UTC by tux, the current one. Current version - History

Xorg configuration SliTaz 5.1

Xorg is the X server: it draws the desktop and reads the keyboard, the mouse and the touchpad. SliTaz 5.1 runs Xorg 1.12.4. Its settings are small files in /etc/X11/xorg.conf.d: this page tells which file does what, how to add your own settings so that no upgrade erases them, and how to start X by hand. The Handbook gives the basics in Screen, keyboard layout and Xorg; which driver suits which graphics card is on Graphics.

The files of xorg.conf.d

Xorg reads /etc/X11/xorg.conf first, then every file of /etc/X11/xorg.conf.d whose name ends with .conf, in the order of their names. A SliTaz 5.1 desktop has:

/etc/X11/xorg.conf is yours: it holds a comment at most, and no package writes in it.

What SliTaz writes at boot

Two files follow the machine, so that a live USB key or an installed disk works on another computer:

  1. Keyboard. When 40-Keyboard.conf is missing or empty, the boot script /etc/init.d/rcS runs tazx init: it writes the file from the console keymap of /etc/keymap.conf (the one chosen at boot), and creates /etc/X11/xorg.conf with a comment if it does not exist. Once the file is there, it is never written again at boot.
  2. Video driver. The login manager script (/etc/init.d/lxtaz-dm) runs tazx video before it starts X, at every boot. It writes 20-Video.conf:
    • modesetting when a kernel graphics driver handles the card (Intel, AMD, nouveau, virtual machines), on the card the firmware booted on;
    • fbdev when there is no kernel graphics driver but a firmware framebuffer (UEFI, or VESA from the BIOS);
    • no file otherwise: Xorg picks a driver itself (vesa).

tazx video leaves 20-Video.conf alone when you changed its first line (# Generated by tazx video at boot), or when another file, or xorg.conf, already has a Device section.

Add your own settings

Never edit a file that belongs to a package: an upgrade puts it back. Write your own file as root, for example /etc/X11/xorg.conf.d/50-local.conf, or use /etc/X11/xorg.conf. Two rules decide where it goes:

Xorg reads the files only when it starts. With the LXTaz login screen, each session gets a new X server: log out and log in again.

Example: touchpad

Turn off edge and circular scrolling and keep two-finger scrolling, in /etc/X11/xorg.conf.d/50-touchpad.conf:

Section "InputClass"
	Identifier "my touchpad"
	MatchIsTouchpad "on"
	Option "VertEdgeScroll" "off"
	Option "HorizEdgeScroll" "off"
	Option "CircularScrolling" "off"
EndSection

The options are those of 45-synaptics.conf. To try one before you write it, use synclient, see Keys and mouse.

Example: ignore a device

A touchscreen that gives trouble, or any device X should not use:

Section "InputClass"
	Identifier "touchscreen ignore"
	MatchIsTouchscreen "on"
	Option "Ignore" "on"
EndSection

Example: choose the video driver

Section "Device"
	Identifier "Card0"
	Driver "fbdev"
EndSection

Which driver to write here, and the packages of the other drivers (xorg-xf86-video-*): see Graphics.

Keyboard layout

Use Settings, or the command line as root:

# trame keyboard xkb set fr
# trame keyboard xkb set ch fr

The first word is the layout, the second the variant. trame keyboard xkb list lists the layouts and trame keyboard xkb list ch the variants of one; trame keyboard xkb get shows the current one. trame writes 40-Keyboard.conf and changes the layout of the running session at once. The keyboard of the text console is set apart, with trame keyboard set.

Two layouts

trame sets one layout. For two, edit 40-Keyboard.conf as root and put both layouts, with a key to switch between them, here Alt+Shift:

Section "InputClass"
	Identifier "Keyboard Defaults"
	MatchIsKeyboard "yes"
	Option "XkbLayout" "us,ru"
	Option "XkbOptions" "grp:alt_shift_toggle,terminate:ctrl_alt_bksp"
EndSection

Then log out and in again. Keep terminate:ctrl_alt_bksp: it is the Ctrl+Alt+Backspace that kills X when nothing else works. A later trame keyboard xkb set writes the file again with one layout, but keeps your XkbOptions.

Screen resolution

Use Settings, lxrandr (Monitor Settings), or the command line:

$ trame display list
$ trame display set-resolution eDP-0 1280x800

trame display list gives the names of the outputs (eDP-0, HDMI-0 ...) and their modes; trame refuses a mode the screen does not offer. The resolution lasts until X restarts. To set it at each login, create ~/.config/autostart/resolution.desktop:

[Desktop Entry]
Type=Application
Name=Screen resolution
Exec=xrandr --output eDP-0 --mode 1280x800

The LXTaz and LXDE sessions run the files of ~/.config/autostart at login.

The Xorg log

Xorg writes what it did in /var/log/Xorg.0.log, and keeps the log of the previous start in /var/log/Xorg.0.log.old. Errors are marked (EE), warnings (WW):

$ grep -E '\(EE\)|\(WW\)' /var/log/Xorg.0.log
$ grep 'Loading.*drivers' /var/log/Xorg.0.log
$ trame log view xorg 100

The second line shows which video driver was loaded. Warnings about missing font folders are harmless. The output of your session is in ~/.cache/lxtaz-dm-session.log, the messages of the login screen in /var/log/lxtaz-dm.log (readable by root).

Start X by hand

To work without the login screen, boot with screen=text added to the boot options, or stop the login screen as root (this closes the session):

# /etc/init.d/lxtaz-dm stop

Log in on the text console with your user, then:

$ startx

startx runs ~/.xsession: it starts Xorg and the session named by WINDOW_MANAGER in ~/.config/slitaz/applications.conf (lxtaz-session by default; jwm or openbox-session for a lighter one, see Window managers). If you have no ~/.xsession, copy it from /etc/skel/.xsession. Xorg keeps running after you log out of the session: Ctrl+Alt+Backspace stops it and brings you back to the console. To start the login screen again:

# /etc/init.d/lxtaz-dm start

For packagers

A package that adds a file to /etc/X11/xorg.conf.d should not use the names that SliTaz writes, 20-Video.conf and 40-Keyboard.conf. A Device section in a package file stops tazx video on every machine: ship one only when the package really needs that driver.

Troubleshooting

Black screen, or X does not start: boot with screen=text, log in and read the errors of /var/log/Xorg.0.log. Look at the driver chosen in 20-Video.conf, then see Graphics. A file of your own with a Device section may be the cause: move it out of xorg.conf.d and try again.

A setting has no effect: check that the file name ends with .conf, look for (EE) or "parse error" in the log, and check the order: for input devices, the last matching file wins.

/etc/X11/xorg.conf.fbdev-old: the x86_64 images made before October 2026 installed an xorg.conf that forced the fbdev driver. tazx video set it aside under this name, unless you had changed it. Delete it, or move it back if you really need fbdev.

The keyboard layout is wrong in X but right in the console: the two are set apart. Check with trame keyboard xkb get and set it with trame keyboard xkb set.

startx: "cannot open display": the window manager started before Xorg was ready. Add a line sleep 2 after the Xorg & line of ~/.xsession.