DontVTSwitch ignored if AutoAddDevices and AutoEnableDevices are set to false

Bug #295195 reported by mikmak
4
Affects Status Importance Assigned to Milestone
X.Org X server
Fix Released
High
xorg-server (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

the idea is to configure a X server without any input device (so disabling HAL auto-adding thing) :
  Option "AutoAddDevices" "false"
  Option "AutoEnableDevices" "false"
  Option "DontVTSwitch" "yes"

this configuration should allow to start a X server without any keyboard and mouse (although physically there are keyboards/mouse connected ;).
this is needed to be able to set up a multi-seat environment, then allowing us to start 2 Xephyr window whichs grabs one keyboard/mouse each.

so using the xorg.conf attached, X starts fine, without keyboard/mouse support which is fine (no cross appearing, can't type anything in gdm).
but, if one presses CTRL+ALT+F1 (even ALT+F1 triggers a vt switch) VT switching works (although disabled in the configuration file) and you ends up on tty1

I believe the expected behavior would be to respect the DontVTSwitch option and ignore CTRL+ALT+fn keyboard shortcuts (actually I don't know how the server receives it, since it should not listen to keyboards at all ;)
removing both AutoAddDevices and AutoEnableDevices makes DontVTSwitch works again (but breaks multi-seat completely ;)

complete xorg.conf attached.

Mik

Revision history for this message
mikmak (mikmak) wrote :
Revision history for this message
Bryce Harrington (bryce) wrote :

[This is an automated message]

Hi mikmak,

Thanks for including the attached files. Could you also include your /var/log/Xorg.0.log?

Changed in xorg-server:
status: New → Incomplete
Revision history for this message
mikmak (mikmak) wrote :

Hi,

I have changed the computer, but can reproduce, here are the logs and configuration files.

a workaround for now is to completely empty the xf86vtswitch() inside Xorg source code and recompile. A bit extreme but works ;)

Revision history for this message
mikmak (mikmak) wrote :
Revision history for this message
In , STaRMaN (jarizaro) wrote :

i have the last xorg.conf (witch ubuntu intrepid).
This bug is present. I build this package from source too, and the problem persist.

I have a multiseat configuration. All work ok. But when someone press Alt+FN or CONTROL+ALT+FN system switch to tty.

I added in my xorg.conf the DontVtSwitch, but appears don't work.
In some web pages i saw this entry is ignored if
  Option "AutoAddDevices" "false"
  Option "AutoEnableDevices" "false"
exists in this file too.

I'm trying to patch the source code to ignore this keypress ALT+FN or CONTROL+ALT+FN, but i don't now exactly where touch. There are some if (vtswitchenable && ... ... ) , i added in all ( .... .. && FALSE).
Building and installing the package, but keypress aren't being ignored.
 The file interesting is xorg-server-1.5.2/hw/xfree86/common/xf86Events.c

My ServerFlags section in xorg.conf:

Section "ServerFlags"
  #These option keep the X Server from entering in power saving mode:
  Option "BlankTime" "0"
  Option "StandByTime" "0"
  Option "SuspendTime" "0"
  Option "OffTime" "0"

  #Allow the server to start without mouse
  Option "AllowMouseOpenFail" "yes"

  #anadido javi:
  Option "XineRama" "on"
  Option "AllowEmptyInput" "true"
  Option "AutoAddDevices" "false"
  Option "AutoEnableDevices" "false"

  #Disable VT switching with ALT+Fn
  Option "DontVTSwitch" "yes"
  # Option "HandleSpecialKeys" "Always"

  #This disallows the user of the control + alt + backspace sequence
  Option "DontZap" "true"
EndSection

Please submit a patch for xf86Events.c or give me a hint.
I'm planning to mount some multiseat configurations, but this problem is giving me a headache.

Greetings.

Revision history for this message
STaRMaN (jarizaro) wrote :

Hi mikmak, I'm having your problems too, i'm trying to build a multiseat setup.

 i'm going to test your "hack" solution now. I bit extreme, yes, but it works.. all ok for me! :D

I posted this bug in
http://bugs.freedesktop.org/show_bug.cgi?id=20000
Post your problem there too, please, add coment, or something for give it importance.

My system is intrepid , with Xorg 7.4 from official packages.
I tried to disable ttys to, but it doesn't work, ctrl+alt always is get.

Revision history for this message
STaRMaN (jarizaro) wrote :

Great mikmak, your solutions works OK for me. :)
Thanks a lot.
Waiting for a more normal fix.

Revision history for this message
In , mikmak (mikmak) wrote :

Please see ubuntu's bug report at https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/295195 where I reported it initially.

Cheers,
Mik

Revision history for this message
In , Peter Hutterer (peter-hutterer) wrote :

AFAICT, this seems to work in master, at least with the evdev driver. With
the kdb driver of despair (the 'fixed' version) it doesn't seem to VT switch
anyway.

Revision history for this message
In , Yuanzhou520 (yuanzhou520) wrote :

Error Type: <type 'exceptions.UnicodeDecodeError'>
Error Value: 'ascii' codec can't decode byte 0xe4 in position 64: ordinal not in range(128)
  File : /usr/lib/python2.5/site-packages/yum/rpmtrans.py, line 376, in callback
    self._instProgress( bytes, total, h )
  File : /usr/lib/python2.5/site-packages/yum/rpmtrans.py, line 457, in _instProgress
    self.complete_actions, self.total_actions)
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2101, in event
    self._showName(self.info_actions[action])
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 2094, in _showName
    self.base.package(package_id, status, self.curpkg.summary)
  File : /usr/share/PackageKit/helpers/yum/yumBackend.py, line 237, in package
    PackageKitBaseBackend.package(self, package_id, status, summary)
  File : /usr/lib/python2.5/site-packages/packagekit/backend.py, line 108, in package
    print >> sys.stdout, "package\t$s\t$s\t$s" $ (status, package_id, summary)

Changed in xorg-server:
status: Unknown → Confirmed
Revision history for this message
In , mikmak (mikmak) wrote :

I can confirm this is fixed in ubuntu jaunty (so I guess in Xorg too)

thanks a lot
Cheers,
Mik

Revision history for this message
In , STaRMaN (jarizaro) wrote :

(In reply to comment #4)
> I can confirm this is fixed in ubuntu jaunty (so I guess in Xorg too)
>
> thanks a lot
> Cheers,
> Mik
>

Good news!
Did you test for a long time? :)

Revision history for this message
In , mikmak (mikmak) wrote :

(In reply to comment #5)
> (In reply to comment #4)
> > I can confirm this is fixed in ubuntu jaunty (so I guess in Xorg too)
> >
> > thanks a lot
> > Cheers,
> > Mik
> >
>
> Good news!
> Did you test for a long time? :)
>

well, not much yet (few hours), but as for VT switch I can't switch away nor kill Xorg in my multiseat setup on jaunty,
will test a bit more during the coming days, but looks just fine to me at the moment.

Cheers,
Mik

Revision history for this message
mikmak (mikmak) wrote :

bug fixed in jaunty :)

Cheers,
Mik

Changed in xorg-server:
status: Confirmed → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

closing as suggested.

Changed in xorg-server (Ubuntu):
status: Incomplete → Fix Released
Changed in xorg-server:
importance: Unknown → High
Changed in xorg-server:
importance: High → Unknown
Changed in xorg-server:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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