NVidia backend fails when running during X startup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
disper |
New
|
Low
|
Unassigned |
Bug Description
I'm using disper 0.2.3 on Ubuntu 9.10 to switch the output screen, when I'm using my laptop with my docking station. This works great. The laptop is using the NVidia closed source driver, and disper is using the NVidia backend.
However, when the laptop boots in the docking station, X will come up on the LCD panel, instead of the external screen. To fix this, I would like to run disper from the Xsetup script that KDM can run after X have been started, but before the login dialog appears.
This doesn't work, even though both DISPLAY and XAUTHORITY is set correctly. I've tried the follow the problem through the source code, and have discovered that the reason for this, is that the match_X_auth function in the xnet module can't find a valid xauth entry.
Digging further reveals that there is only one authority in the XAUTHORITY file. This authority doesn't have a display number or a hostname, and the family is 65535. I don't know why this is, but I suspect that it is because no user is logged into X at this point.
Now, if i change the lines:
if efam == family and eaddr == address and num == enum:
to
if efam == 65535 or (efam == family and eaddr == address and num == enum):
disper will detect and use the NVidia backend. However I don't know enough about xauth to determine if that is the correct approach.
Thanks in advance.
Hi, thanks for your bug report and the workaround. I'm don't know enough either about xauth at this moment to confirm if your approach is ok.
I am considering upgrading to a newer X Python library http:// python- xlib.sourceforg e.net/ which has been largely reworked. It will require some work to extract only the relevant parts, but this may solve other (xauth/ xhost-related) bugs as well. I suggest you live with the local patch until either more people complain, or the newer X library (if anybody can find some time) is integrated.