LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to disable HAL and still use X in Slackware64-13 ? (https://www.linuxquestions.org/questions/slackware-14/how-to-disable-hal-and-still-use-x-in-slackware64-13-a-754213/)

Didier Spaier 09-10-2009 12:53 PM

How to disable HAL and still use X in Slackware64-13 ?
 
I did what is recommended in CHANGES_AND_TXT:
Code:

If you prefer to do this the "old" way
  using /etc/X11/xorg.conf, then you can use "X -configure" or "xorgsetup" to
  generate an xorg.conf, then add the following lines to the "ServerFlags"
  section to disable input device hotplugging via HAL:
    Option  "AllowEmptyInput"    "false"
    Option  "AutoAddDevices"      "false"
    Option  "AutoEnableDevices"  "false"
  This is also relevant if you prefer to disable HAL completely for whatever
  reason.

I already had an /etc/X11/org.conf file because I use a NVIDIA driver for my graphical card.

So I edited it, appended following lines at the end:
Code:

Section "ServerFlags"
    Option  "AllowEmptyInput"    "false"
    Option  "AutoAddDevices"      "false"
    Option  "AutoEnableDevices"  "false"
EndSection

But then if I do not start hald, X fail to start and I have these messages in /var/log/Xorg.0.log:
Code:

(EE) config/hal: couldn't initialise context: unknown error (null)

Backtrace:
0: /usr/bin/X(xorg_backtrace+0x26) [0x4eb2d6]
1: /usr/bin/X(xf86SigHandler+0x39) [0x471f79]
2: /lib64/libc.so.6 [0x7f192ac82f30]
3: [0x7d64f0]

Fatal server error:
Caught signal 11.  Server aborting

Do I miss something, maybe in X configuration, to "tell" the X server not to rely upon HAL ?

PS this a "how-to" question, I do not expect answers like "why don't you use HAL?" -- there is already (at least) one thread about that anyway.

samac 09-10-2009 12:59 PM

If you check /etc/rc.d/hald messagebus and mysql, I would guess that the files will be empty. These are the symptoms that I saw and I had to do a full re-install to fix the problem. I think that it is a wider problem but I couldn't find a way to fix it.

samac

Didier Spaier 09-10-2009 01:09 PM

Thanks Samac, but /etc/rc.d/hald, /etc/rc.d/messagebus and /etc/rc.d/mysql scripts are present in my installation and work, AFAIK. I can stop or start hal (and dbus and mysql) without any issue.

adamk75 09-10-2009 01:17 PM

Can you show us your full /var/log/Xorg.0.log file and your /etc/X11/xorg.conf file? Because, honestly, those options should be all you need to disable Xorg from using HAL.

Adam

Didier Spaier 09-10-2009 01:37 PM

Yes.

xorg.conf:
Code:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 1.0  (buildmeister@builder62)  Wed May 27 01:58:49 PDT 2009

Section "ServerLayout"
    Option        "AllowEmptyInput" "false"
    Option        "AutoAddDevices" "false"
    Identifier    "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    FontPath        "/usr/lib64/X11/fonts/misc/:unscaled"
    FontPath        "/usr/lib64/X11/fonts/100dpi/:unscaled"
    FontPath        "/usr/lib64/X11/fonts/75dpi/:unscaled"
    FontPath        "/usr/lib64/X11/fonts/misc/"
    FontPath        "/usr/lib64/X11/fonts/Type1/"
    FontPath        "/usr/lib64/X11/fonts/Speedo/"
    FontPath        "/usr/lib64/X11/fonts/100dpi/"
    FontPath        "/usr/lib64/X11/fonts/75dpi/"
    FontPath        "/usr/lib64/X11/fonts/cyrillic/"
    FontPath        "/usr/lib64/X11/fonts/TTF/"
EndSection

Section "InputDevice"
    # generated from default
    Identifier    "Mouse0"
    Driver        "mouse"
    Option        "Protocol" "auto"
    Option        "Device" "/dev/psaux"
    Option        "Emulate3Buttons" "no"
    Option        "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier    "Keyboard0"
    Driver        "kbd"
    Option        "XkbModel" "pc105"
    Option        "XkbLayout" "fr"
EndSection

Section "Monitor"
    Identifier    "Monitor0"
    VendorName    "Unknown"
    ModelName      "Unknown"
    HorizSync      28.0 - 33.0
    VertRefresh    43.0 - 72.0
    Option        "DPMS"
EndSection

Section "Device"
    Identifier    "Device0"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier    "Screen0"
    Device        "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
    EndSubSection
EndSection
Section "ServerFlags"
    Option  "AllowEmptyInput"    "false"
    Option  "AutoAddDevices"      "false"
    Option  "AutoEnableDevices"  "false"
EndSection

Xorg.0.log:
Code:

X.Org X Server 1.6.3
Release Date: 2009-7-31
X Protocol Version 11, Revision 0
Build Operating System: Slackware 13.0 Slackware Linux Project
Current Operating System: Linux darkstar 2.6.29.6 #2 SMP Mon Aug 17 11:58:18 CDT 2009 x86_64
Build Date: 03 August 2009  07:39:15PM
 
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Sep 10 18:58:28 2009
(==) Using config file: "/etc/X11/xorg.conf"
(==) ServerLayout "Layout0"
(**) |-->Screen "Screen0" (0)
(**) |  |-->Monitor "Monitor0"
(**) |  |-->Device "Device0"
(**) |-->Input Device "Keyboard0"
(**) |-->Input Device "Mouse0"
(**) Option "AllowEmptyInput" "false"
(**) Option "AutoAddDevices" "false"
(**) Option "AutoEnableDevices" "false"
(**) Not automatically adding devices
(**) Not automatically enabling devices
(WW) The directory "/usr/share/fonts/local" does not exist.
        Entry deleted from font path.
(WW) The directory "/usr/share/fonts/CID" does not exist.
        Entry deleted from font path.
(**) FontPath set to:
        /usr/lib64/X11/fonts/misc/:unscaled,
        /usr/lib64/X11/fonts/100dpi/:unscaled,
        /usr/lib64/X11/fonts/75dpi/:unscaled,
        /usr/lib64/X11/fonts/misc/,
        /usr/lib64/X11/fonts/Type1/,
        /usr/lib64/X11/fonts/Speedo/,
        /usr/lib64/X11/fonts/100dpi/,
        /usr/lib64/X11/fonts/75dpi/,
        /usr/lib64/X11/fonts/cyrillic/,
        /usr/lib64/X11/fonts/TTF/,
        /usr/share/fonts/TTF,
        /usr/share/fonts/OTF,
        /usr/share/fonts/Type1,
        /usr/share/fonts/misc,
        /usr/share/fonts/75dpi/:unscaled,
        /usr/share/fonts/100dpi/:unscaled,
        /usr/share/fonts/75dpi,
        /usr/share/fonts/100dpi,
        /usr/share/fonts/cyrillic,
        built-ins
(==) ModulePath set to "/usr/lib64/xorg/modules"
(II) Loader magic: 0x3d20
(II) Module ABI versions:
        X.Org ANSI C Emulation: 0.4
        X.Org Video Driver: 5.0
        X.Org XInput driver : 4.0
        X.Org Server Extension : 2.0
(II) Loader running on linux
(--) using VT number 7

(--) PCI:*(0:1:0:0) 10de:0429:17aa:20d8 rev 161, Mem @ 0xd6000000/16777216, 0xe0000000/268435456, 0xd4000000/33554432, I/O @ 0x00002000/128
(II) Open ACPI successful (/var/run/acpid.socket)
(II) System resource ranges:
        [0] -1        0        0xffffffff - 0xffffffff (0x1) MX[B]
        [1] -1        0        0x000f0000 - 0x000fffff (0x10000) MX[B]
        [2] -1        0        0x000c0000 - 0x000effff (0x30000) MX[B]
        [3] -1        0        0x00000000 - 0x0009ffff (0xa0000) MX[B]
        [4] -1        0        0x0000ffff - 0x0000ffff (0x1) IX[B]
        [5] -1        0        0x00000000 - 0x00000000 (0x1) IX[B]
(II) LoadModule: "extmod"
(II) Loading /usr/lib64/xorg/modules/extensions//libextmod.so
(II) Module extmod: vendor="X.Org Foundation"
        compiled for 1.6.3, module version = 1.0.0
        Module class: X.Org Server Extension
        ABI class: X.Org Server Extension, version 2.0
(II) Loading extension MIT-SCREEN-SAVER
(II) Loading extension XFree86-VidModeExtension
(II) Loading extension XFree86-DGA
(II) Loading extension DPMS
(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation
(II) Loading extension X-Resource
(II) LoadModule: "dbe"
(II) Loading /usr/lib64/xorg/modules/extensions//libdbe.so
(II) Module dbe: vendor="X.Org Foundation"
        compiled for 1.6.3, module version = 1.0.0
        Module class: X.Org Server Extension
        ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DOUBLE-BUFFER
(II) LoadModule: "glx"
(II) Loading /usr/lib64/xorg/modules/extensions//libglx.so
(II) Module glx: vendor="NVIDIA Corporation"
        compiled for 4.0.2, module version = 1.0.0
        Module class: X.Org Server Extension
(II) NVIDIA GLX Module  185.18.14  Wed May 27 01:53:56 PDT 2009
(II) Loading extension GLX
(II) LoadModule: "dri"
(II) Loading /usr/lib64/xorg/modules/extensions//libdri.so
(II) Module dri: vendor="X.Org Foundation"
        compiled for 1.6.3, module version = 1.0.0
        ABI class: X.Org Server Extension, version 2.0
(II) Loading extension XFree86-DRI
(II) LoadModule: "dri2"
(II) Loading /usr/lib64/xorg/modules/extensions//libdri2.so
(II) Module dri2: vendor="X.Org Foundation"
        compiled for 1.6.3, module version = 1.1.0
        ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DRI2
(II) LoadModule: "nvidia"
(II) Loading /usr/lib64/xorg/modules/drivers//nvidia_drv.so
(II) Module nvidia: vendor="NVIDIA Corporation"
        compiled for 4.0.2, module version = 1.0.0
        Module class: X.Org Video Driver
(II) LoadModule: "kbd"
(II) Loading /usr/lib64/xorg/modules/input//kbd_drv.so
(II) Module kbd: vendor="X.Org Foundation"
        compiled for 1.6.1, module version = 1.3.2
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 4.0
(II) LoadModule: "mouse"
(II) Loading /usr/lib64/xorg/modules/input//mouse_drv.so
(II) Module mouse: vendor="X.Org Foundation"
        compiled for 1.6.1, module version = 1.4.0
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 4.0
(II) NVIDIA dlloader X Driver  185.18.14  Wed May 27 01:30:19 PDT 2009
(II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
(II) Primary Device is: PCI 01@00:00:0
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/lib64/xorg/modules//libfb.so
(II) Module fb: vendor="X.Org Foundation"
        compiled for 1.6.3, module version = 1.0.0
        ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "wfb"
(II) LoadModule: "wfb"
(II) Loading /usr/lib64/xorg/modules//libwfb.so
(II) Module wfb: vendor="X.Org Foundation"
        compiled for 1.6.3, module version = 1.0.0
        ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "ramdac"
(II) LoadModule: "ramdac"
(II) Module "ramdac" already built-in
(II) resource ranges after probing:
        [0] -1        0        0xffffffff - 0xffffffff (0x1) MX[B]
        [1] -1        0        0x000f0000 - 0x000fffff (0x10000) MX[B]
        [2] -1        0        0x000c0000 - 0x000effff (0x30000) MX[B]
        [3] -1        0        0x00000000 - 0x0009ffff (0xa0000) MX[B]
        [4] -1        0        0x0000ffff - 0x0000ffff (0x1) IX[B]
        [5] -1        0        0x00000000 - 0x00000000 (0x1) IX[B]
(**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32
(==) NVIDIA(0): RGB weight 888
(==) NVIDIA(0): Default visual is TrueColor
(==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
(**) NVIDIA(0): Enabling RENDER acceleration
(II) NVIDIA(0): Support for GLX with the Damage and Composite X extensions is
(II) NVIDIA(0):    enabled.
(II) NVIDIA(0): NVIDIA GPU Quadro NVS 140M (G86) at PCI:1:0:0 (GPU-0)
(--) NVIDIA(0): Memory: 524288 kBytes
(--) NVIDIA(0): VideoBIOS: 60.86.3e.00.00
(II) NVIDIA(0): Detected PCI Express Link width: 16X
(--) NVIDIA(0): Interlaced video modes are supported on this GPU
(--) NVIDIA(0): Connected display device(s) on Quadro NVS 140M at PCI:1:0:0:
(--) NVIDIA(0):    IBM (DFP-0)
(--) NVIDIA(0): IBM (DFP-0): 330.0 MHz maximum pixel clock
(--) NVIDIA(0): IBM (DFP-0): Internal Dual Link LVDS
(WW) NVIDIA(0): The EDID for IBM (DFP-0) contradicts itself: mode "1680x1050"
(WW) NVIDIA(0):    is specified in the EDID; however, the EDID's valid
(WW) NVIDIA(0):    HorizSync range (53.246-63.877 kHz) would exclude this
(WW) NVIDIA(0):    mode's HorizSync (42.6 kHz); ignoring HorizSync check for
(WW) NVIDIA(0):    mode "1680x1050".
(WW) NVIDIA(0): The EDID for IBM (DFP-0) contradicts itself: mode "1680x1050"
(WW) NVIDIA(0):    is specified in the EDID; however, the EDID's valid
(WW) NVIDIA(0):    HorizSync range (53.246-63.877 kHz) would exclude this
(WW) NVIDIA(0):    mode's HorizSync (42.6 kHz); ignoring HorizSync check for
(WW) NVIDIA(0):    mode "1680x1050".
(II) NVIDIA(0): Assigned Display Device: DFP-0
(==) NVIDIA(0):
(==) NVIDIA(0): No modes were requested; the default mode "nvidia-auto-select"
(==) NVIDIA(0):    will be used as the requested mode.
(==) NVIDIA(0):
(II) NVIDIA(0): Validated modes:
(II) NVIDIA(0):    "nvidia-auto-select"
(II) NVIDIA(0): Virtual screen size determined to be 1680 x 1050
(--) NVIDIA(0): DPI set to (129, 127); computed from "UseEdidDpi" X config
(--) NVIDIA(0):    option
(==) NVIDIA(0): Enabling 32-bit ARGB GLX visuals.
(--) Depth 24 pixmap format is 32 bpp
(II) do I need RAC?  No, I don't.
(II) resource ranges after preInit:
        [0] -1        0        0xffffffff - 0xffffffff (0x1) MX[B]
        [1] -1        0        0x000f0000 - 0x000fffff (0x10000) MX[B]
        [2] -1        0        0x000c0000 - 0x000effff (0x30000) MX[B]
        [3] -1        0        0x00000000 - 0x0009ffff (0xa0000) MX[B]
        [4] -1        0        0x0000ffff - 0x0000ffff (0x1) IX[B]
        [5] -1        0        0x00000000 - 0x00000000 (0x1) IX[B]
(II) NVIDIA(0): Initialized GPU GART.
(II) NVIDIA(0): ACPI display change hotkey events enabled: the X server is new
(II) NVIDIA(0):    enough to receive ACPI display change hotkey events.
(II) NVIDIA(0): Setting mode "nvidia-auto-select"
(II) Loading extension NV-GLX
(II) NVIDIA(0): NVIDIA 3D Acceleration Architecture Initialized
(==) NVIDIA(0): Disabling shared memory pixmaps
(II) NVIDIA(0): Using the NVIDIA 2D acceleration architecture
(==) NVIDIA(0): Backing store disabled
(==) NVIDIA(0): Silken mouse enabled
(**) Option "dpms"
(**) NVIDIA(0): DPMS enabled
(II) Loading extension NV-CONTROL
(II) Loading extension XINERAMA
(==) RandR enabled
(II) Initializing built-in extension Generic Event Extension
(II) Initializing built-in extension SHAPE
(II) Initializing built-in extension MIT-SHM
(II) Initializing built-in extension XInputExtension
(II) Initializing built-in extension XTEST
(II) Initializing built-in extension BIG-REQUESTS
(II) Initializing built-in extension SYNC
(II) Initializing built-in extension XKEYBOARD
(II) Initializing built-in extension XC-MISC
(II) Initializing built-in extension XINERAMA
(II) Initializing built-in extension XFIXES
(II) Initializing built-in extension RENDER
(II) Initializing built-in extension RANDR
(II) Initializing built-in extension COMPOSITE
(II) Initializing built-in extension DAMAGE
(II) Initializing extension GLX
(**) Option "CoreKeyboard"
(**) Keyboard0: always reports core events
(**) Option "Protocol" "standard"
(**) Keyboard0: Protocol: standard
(**) Option "AutoRepeat" "500 30"
(**) Option "XkbRules" "xorg"
(**) Keyboard0: XkbRules: "xorg"
(**) Option "XkbModel" "pc105"
(**) Keyboard0: XkbModel: "pc105"
(**) Option "XkbLayout" "fr"
(**) Keyboard0: XkbLayout: "fr"
(**) Option "CustomKeycodes" "off"
(**) Keyboard0: CustomKeycodes disabled
(II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD)
(**) Option "Protocol" "auto"
(**) Option "Device" "/dev/psaux"
(II) Mouse0: Setting mouse protocol to "ExplorerPS/2"
(**) Mouse0: Device: "/dev/psaux"
(**) Mouse0: Protocol: "auto"
(**) Option "CorePointer"
(**) Mouse0: always reports core events
(**) Option "Device" "/dev/psaux"
(**) Option "Emulate3Buttons" "no"
(**) Option "ZAxisMapping" "4 5"
(**) Mouse0: ZAxisMapping: buttons 4 and 5
(**) Mouse0: Buttons: 9
(**) Mouse0: Sensitivity: 1
(II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE)
(**) Mouse0: (accel) keeping acceleration scheme 1
(**) Mouse0: (accel) filter chain progression: 2.00
(**) Mouse0: (accel) filter stage 0: 20.00 ms
(**) Mouse0: (accel) set acceleration profile 0
(II) Mouse0: Setting mouse protocol to "ExplorerPS/2"
(II) Mouse0: ps2EnableDataReporting: succeeded
(EE) config/hal: couldn't initialise context: unknown error (null)

Backtrace:
0: /usr/bin/X(xorg_backtrace+0x26) [0x4eb2d6]
1: /usr/bin/X(xf86SigHandler+0x39) [0x471f79]
2: /lib64/libc.so.6 [0x7f192ac82f30]
3: [0x7d64f0]

Fatal server error:
Caught signal 11.  Server aborting


Please consult the The X.Org Foundation support
        at http://wiki.x.org
 for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.

(II) UnloadModule: "kbd"
(II) UnloadModule: "mouse"


mlangdn 09-10-2009 01:40 PM

I think its because the nvidia-generated xorg.conf does not contain enough to start the x-server. You will have to run xorgsetup to generate a complete xorg.conf file. Then, re-installing the nvidia driver will prompt you to allow the installer to add the nvidia related options to xorg.conf. The last step will be to manually edit xorg.conf for your mouse and screen resolution - especially if you have a wide screen.

Didier Spaier 09-10-2009 02:24 PM

I ran xorgsetup with no more success. X stops as soon as I try to use an input device, with the same messages in Xorg.0.log.

Thanks anyway - also because running xorgsetup I found out that I could use "thinkpad60" as "XkbModel" which is more accurate than "pc105" for my Lenovo Thinkpad T61's keyboard.

GazL 09-10-2009 02:40 PM

I have exactly the same issue as Didier here. X displays ok initially (Windowmaker from startx), but the instant you move the mouse or press a key it dies just as Didier's has. But only when hald isn't running.

adamk75 09-10-2009 02:41 PM

You have

Code:

    Option        "AllowEmptyInput" "false"
    Option        "AutoAddDevices" "false"

In two different sections. I doubt that this would be the source of the problem, but it's worth removing them from one of the two sections to find out. Either section is fine as those options should work in either ServerLayout or ServerFlags.

Adam

Didier Spaier 09-10-2009 02:50 PM

Thanks for the suggestion, however these lines are not duplicated in my last xorg.conf (output of xorgsetup) and I get the same results.

GazL 09-10-2009 02:52 PM

I've just figured it out. Insipration out of the blue.

You also need to stop messagebus. If you run messagebus without hal then it goes BOOM!

Didier Spaier 09-10-2009 03:28 PM

Thanks Gazl, same here.

I thought I would still need dbus though to have a few KDE apps working -- even if I use Fluxbox as WM -- but notwithstanding a few warnings at konqueror start up kontact as well as konqueror still seem to work.

Didier Spaier 09-10-2009 03:48 PM

To be more accurate, these KDE apps somehow launch dbus when they need it.

I saw that with "top" command: as soon as I launch kontact or konqueror as user didier, I see dbus-launch and dbus-daemon which appear in top's window.

But in that case X don't crash.

Good to know, though I would like to know why.

GazL 09-10-2009 03:54 PM

Yes, its annoying. I don't like HAL that much but I can see the value in dbus and as you say, things like kde rely on it quite a bit, so having to turn it off is a pain. I found a /etc/dbus-1/system.d/hal.conf file and thought that by removing that it might allow dbus to still run while allowing X without HAL, but it didn't make any difference.

I guess the Xorg code just isn't checking return values properly on their messagebus calls and subsequently bombing out. :(


The reason I was trying to run X without HAL is that I've found that when using the Virtual Consoles after exiting an Xserver screen, key-presses are going astray making it unusable until I restart X again. Interestingly, while X is still running (even if only showing a XDM), or when X is restarted, the key-presses work correctly in the VC. It's only after you exit X that the problem happens. Also, the same thing occurs on OpenBSD 4.6, so it's not linux specific, but something is upsetting keyboard handling somewhere. I wanted to see whether turning off HAL made any difference - It doesn't! This is using a Chicony HID wireless keyboard and mouse. I've not tried plugging in a cabled PS2 keyboard yet, but that's my next step. I suspect the problem may go away when I do that, but we'll see.

All things being considered, I looks like X.org is going through a bit of a rough patch at the moment. Lets hope it gets back on track sooner rather than later.

GazL 09-10-2009 03:56 PM

There are two dbus daemons. A system wide one and one for your current session, which is the one dbus-launch starts. I'm not sure if the session specific one will work without the system level one being up. I've not really looked into dbus all that much.


All times are GMT -5. The time now is 06:42 AM.