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.

GrapefruiTgirl 09-10-2009 03:57 PM

Sorry -- I misread the issue :|

I too have not found a way to still run X, with HAL dead.

Sasha

Ramurd 09-10-2009 05:23 PM

Maybe a totally different question: but why is HAL bad? It took me some getting-used-to, but eventually I found it the solution to many of my issues... This gets me curious, and curiosity can only be met with answers :-)

Didier Spaier 09-11-2009 03:04 AM

Ramurd, as stated in my first post here:
Quote:

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.
So please post your question elsewhere, here could be a good place.

GazL 09-11-2009 03:37 AM

edit:
moved my reply to Ramurd to here to keep this thread clean.

Didier Spaier 09-11-2009 04:04 AM

Thanks GazL.

About disabling HAL, unfortunately the problem is not solved in avoiding dbus usage, as CUPS needs dbus to work -- and I need CUPS to print.

Trying to print without it this morning (Paris time) I saw this in /var/log/syslog:
Code:

Sep 11 10:33:05 darkstar Officejet_Pro_K550?serial=MY5AL2105T: prnt/backend/hp.c 535: dBus Connection Error (Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory)!
Any thought ?

GazL 09-11-2009 04:47 AM

I guess you could look at recompiling the xserver package and see if you can configure out HAL support at compile time and see if it avoids the problem. But it's getting a little on the involved side.

I hate to say it, but perhaps it's best to just reconsider letting HAL run. :(

GrapefruiTgirl 09-11-2009 08:44 AM

Quote:

Originally Posted by GazL (Post 3678454)
I guess you could look at recompiling the xserver package and see if you can configure out HAL support at compile time and see if it avoids the problem. But it's getting a little on the involved side.

I hate to say it, but perhaps it's best to just reconsider letting HAL run. :(

I agree, fwiw : compiling HAL out of X is getting more involved, and the end may/probably doesn't justify the means.

Here's a thought (though again, more complex than may justify doing it):

We know that X/K/GDM quits/restarts repeatedly if HAL isn't running at the *DM login. BUT: we also seem to know that once we're logged in, HAL can be killed and stuff seems to work fine. SO:

A little bit of editing of the X or DE startup scripts could produce a situation whereby HAL gets stopped after login, but gets restarted before/during/after logout.

This would have HAL running outside of X, but when using X, it would not be running.

...just a thought :)
Sasha

Didier Spaier 09-11-2009 12:14 PM

I tried to compile xserver with --disable-config-hal option (just editing /source/x/x11/configure/xorg-server in the slackware64-13 tree) but got a compilation error. I will try to find out why this evening (Paris time).

GazL 09-14-2009 12:19 PM

Did you get any further with this Didier?

Didier Spaier 09-14-2009 03:58 PM

Yes, it works!

I didn't post earlier because at first I had compilation errors.

I suspected this being a side effect of installing all the packages needed to get a multilib Slackware as explained in this page written by Eric Hameleers aka Alien BOB. So I removed all new packages and installed back the "original" ones. But still the same errors.

To make sure it was not caused by some modification of my system before I complain to Pat something like "heh, one of your Slackbuilds don't work" I ended up doing this:
- install VirtualBox in Slackware64-13.0
- install Slackware64-13.0 in a virtual machine with VirtualBox
- mount the DVD as /mnt in the embedded Slackware-13.0 (not modified at all) and run directly /mnt/source/x/x11/x11.Slackbuild

It worked and I got all the packages!

Then as I need only xorg-server I ran following command:
/mnt/source/x1/X11/x11.Slackbuild xserver

It worked!

All I had to do now was edit the configure file, make the packages again and reinstall (in the "physical" machine, of course) the updated packages.

Now I am writing under X and without HAL (but with the dBus daemon running, so I can print with CUPS) and so far, everything seems to work.

To make a long story short, if your installation is cleaner than mine all you have to do is:
1) Copy somewhere the directory /source/x/x11 of the DVD (or a mirror) of the distribution and cd there
2) Edit the file configure/xorg-server (that is to say, source/x/x11/configure/xorg-server) to add following option:
Code:

--disable-config-hal
4) Run following command:
Code:

./x11.Slackbuild xserver
5) Replace the "original" packages by the new ones:
Code:

upgradepkg --reinstall /tmp/x11-build/xorg-server-1.6.3-x86_64-1.txz
upgradepkg --reinstall /tmp/x11-build/xorg-server-xephyr-1.6.3-x86_64-1.txz
upgradepkg --reinstall /tmp/x11-build/xorg-server-xnest-1.6.3-x86_64-1.txz
upgradepkg --reinstall /tmp/x11-build/xorg-server-xvfb-1.6.3-x86_64-1.txz

6) Kill X, then stop the HAL daemon and prevent it from starting at next (re)boot:
Code:

/etc/rc.d/rc.hald stop
chmod -x /etc/rc.d/rc.hald

Then you can start X again or reboot.

WARNINGS
1) Remember that if/when a new xorg-server is released by Pat (for instance following a security advisory) and you still don't want to use HAL, you will have to follow that procedure again.
2) This seems to work here but I didn't make methodical testing.

May be only xorg-server-1.6.3 needs to be modified for all this to work, I don't know.

Happy Slackin!

PS I still don't know why I got these compilation errors on my "real" system but that's another story.

EDIT. This seems to work with as well as without an xorg.conf file and (if HAL is launched) do not prevent auto-mounting of removable devices in XFCE and KDE; may be I could suggest Pat to add the "--disable-config-hal" option in the official xorg-server packages ? What do you think ?

GazL 09-15-2009 09:36 AM

Excellent stuff! :)

I can't see Pat wanting to go with '--disable-hal' in the stock packages. Though there does seem to be a fair number of us who'd rather not have any hal in our X system, hal is becoming the expected norm. Perhaps he'd be open to having a non-hal alternate package in 'extra' though to save people the effort of recompiling it themselves?

The fact the Xserver as shipped was blowing up when dbus was running but hal wasn't, is clearly a bug. It ought to fallback to non-hal mode gracefully in that situation, but at least now we have a proven workaround. Hopefully recompiling won't be necessary in future versions.

Anyway, good job and thanks for posting the results.

GrapefruiTgirl 09-15-2009 10:00 AM

Thanks from me too, for the effort & time put into this.

I agree, it'd be nice to have the option of a NON-Hal Xorg in Slackware /Extra but I would understand if Pat is not open to the idea; it does kinda cause a fork in the road so to speak, in terms of him maintaining two versions of the same package, just because a few of us don't like HAL. Also, at times like bug reporting, it may be looked upon as a 'taint' by which, if we report a bug yet are running non-HAL-Xorg, we may be told to re-test for the bug with the official Xorg (in the same sense of bug reporting on tainted kernels)

Anyhow, nice work!
Once I have my install finalized, I'll be rebuilding X as was described here. :cool:

Sasha

Didier Spaier 09-15-2009 11:24 AM

Most things doesn't seem to change if one --disable-config-hal in xorg-server: one can still use HAL and if the HAL daemon is launched auto-mounting of removable devices works.

Only caveat AFAIK: in this case any X setting should be made through an /etc/X11/xorg.conf, not an fdi file in /etc/hal as stated in CHANGES_AND_HINTS.TXT

Would someone be eager to look at this issue more thoroughly please do it ;)

GrapefruiTgirl 09-15-2009 11:32 AM

Quote:

Originally Posted by Didier Spaier (Post 3683813)
Only caveat AFAIK: in this case any X setting should be made through an /etc/X11/xorg.conf, not an fdi file in /etc/hal as stated in CHANGES_AND_HINTS.TXT

Not really a caveat though in this case; I think that's how things _should_ be: X stuff gets configured in xorg.conf. Makes perfect sense (to me anyway)

What we need is another word; if "caveat" = "beware", and beware being the forboding, ominous sort of word that it is, we need a word meaning "be aware"...

Cheers :)
Sasha

Didier Spaier 09-15-2009 11:46 AM

Sasha, I meant caveat as in caveat emptor.

Please forgive my bad English anyway; sixty years old and still trying to learn it :scratch:

Hopefully with the help of WordNet, available at Slackbuilds.org it will be easier.

GrapefruiTgirl 09-15-2009 11:51 AM

Quote:

Originally Posted by Didier Spaier (Post 3683839)
Sasha, I meant caveat as in caveat emptor.

Please forgive my bad English anyway; sixty years old and still trying to learn it :scratch:

Hopefully with the help of WordNet, available at Slackbuilds.org it will be easier.

Hi Didier;

Forgive me: your English is great, there's no problem there :)

I was just being silly -- figuring we could use a different latin word for "be aware", instead of 'caveat' for "beware".

Note the difference:

"Beware of Dog" # implies scary dog that will attack you.

"Be aware of Dog" # less scary -- means "fyi: there's a dog around here (and don't run him over)".

Sorry for the confusion!
Sasha

Didier Spaier 09-15-2009 11:56 AM

cave canem ;)

Don't be sorry, I always welcome your remarks.

Cheers,

GrapefruiTgirl 09-15-2009 11:58 AM

Quote:

Originally Posted by Didier Spaier (Post 3683857)
cave canem ;)

Don't be sorry, I always welcome your remarks.

Cheers,

Thank you ;)
Sasha

Didier Spaier 09-17-2009 07:10 AM

bad link fixed
 
Some news: "X server crashing when HAL daemon is not started but dBus daemon is" was a bug in xorg-server, already fixed in version 1.6.3.901. Rémi Cardona gave me this information (I posted the issue on the xorg mailing list), CC Patrick Volkerding.

See http://cgit.freedesktop.org/xorg/xse...dfaead48e86440

So hopefully my workaround won't be necessary any more when xorg-server will be upgraded in Slackware-13.0 (or in the next release, this is up to Pat).

BTW, Rémi told me too that AutoAddDevices is enough to disable HAL support at run-time.

GazL 09-17-2009 07:20 AM

I get "bad object ID" from that link Didier, but thanks for the update. I always suspected it was a actual bug, but it's nice to know its a bug that's already been fixed upstream.

Didier Spaier 09-17-2009 07:34 AM

Sorry for the bad link in previous post, it's now fixed.

Nylex 10-26-2009 01:27 AM

After recompiling X to remove its dependency on HAL, is it OK to remove the HAL package entirely? I've removed executable perms on rc.hald, so the daemon doesn't start on boot, which leads me to believe that it would be safe to remove the HAL package. Just want to be sure..

Didier Spaier 11-01-2009 05:27 PM

Well, IMHO chmod -x /etc/rc.d/rc.hald is good enough to get rid of it -- That's what I did, at least ;)

Unless you be really short of disk space, I wouldn't recommend you to remove it, as you still could find another application which rely on it. For instance when I launch amarok wit no HAL daemon running I get some weird messages like this one:
Code:

QStringList Solid::Backends::Hal::HalManager::findDeviceByDeviceInterface(const Solid::DeviceInterface::Type&)  error:  "org.freedesktop.DBus.Error.ServiceUnknown"
At least, keep the package somewhere, ready to be re installed.

Nylex 11-02-2009 12:13 AM

OK, thanks!


All times are GMT -5. The time now is 12:09 PM.