Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 67578 - X took already used tty16 - keyboard not work - 0350_all_4.2.0-vt7.patch is BUG
Summary: X took already used tty16 - keyboard not work - 0350_all_4.2.0-vt7.patch is BUG
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2004-10-14 12:45 UTC by Honza
Modified: 2006-06-27 10:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Solution by merging methods. Not tested. (0350_all_4.2.0-vt7-v2.patch,1.31 KB, patch)
2004-10-19 07:41 UTC, Honza
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Honza 2004-10-14 12:45:03 UTC
When I have first 16 tty's used, XFree (x11-base/xorg-x11-6.7.0-r2) choose tty16, hapilly start, but keyboard's not working, because all keys get that getty already running on tty16.

Reproducible: Always
Steps to Reproduce:
1. Start 15 getty and one X
2. Start another X

Actual Results:  
In new X, keyboard is not working, including CTRL-ALT-F1 and CTRL-ALT-BACKSPACE,
because X uses tty16

Expected Results:  
X should take next free tty - tty17 or in my case tty40 - and work normally
including keyboard

Problem is in 0350_all_4.2.0-vt7.patch, which is clearly broken. It switch from
using VT_OPENQRY, which work perfectly, to using VT_GETSTATE and searching for
free console representet as unset bit in vt_stat.v_active.

Definition of vt_stat in linux/vt.h:

struct vt_stat {                                                               
                                        
        unsigned short v_active;        /* active vt */                        
                                        
        unsigned short v_signal;        /* signal to send */                   
                                        
        unsigned short v_state;         /* vt bitmask */                       
                                        
};                                                                             
                                        

unsigned short means 16 bites, 0350_all_4.2.0-vt7.patch assumes 64. So, it is
clearly wrong. I also don't know why is needed in first place, but searching
only 16 tty as in 0350_all_4.2.0-vt7.patch and fallback to VT_OPENQRY should
have advantages of both versions.
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2004-10-16 17:51:15 UTC
I'd appreciate if you'd attach a fixed version of that patch, or a patch to it.
Comment 2 Honza 2004-10-19 07:41:14 UTC
Created attachment 42168 [details, diff]
Solution by merging methods. Not tested.

I still don't know what problem was solved by first patch (and why simple
removing of that patch isn't solution).

I didn't tested this patch. I didn't even test if it compile. I will report
after I test it, but I assume you can test it faster and better.
Comment 3 Honza 2004-10-19 10:17:12 UTC
OK, it will at least compile.
Comment 4 Honza 2004-10-21 07:09:03 UTC
OK, tested. Fallback works.
Comment 5 Honza 2005-03-02 10:57:57 UTC
This bug is still present in xorg-x11-6.8.0-r4. And BTW, ald is still missing in portage. Should someone remind me what point have filling bugreports ? It's over 4 month, 4 gentoo and one upstream version old !
Comment 6 Donnie Berkholz (RETIRED) gentoo-dev 2005-05-23 19:25:04 UTC
I've removed this patch altogether in 6.8.99.x in April, because I was unable to
justify it after searching extensively.

Thanks for filing, and sorry for the delay.
Comment 7 Honza 2006-01-02 14:47:42 UTC
Just note: xorg-x11-6.8.2-r6 still have that broken patch and 6.8.99.x (6.8.99.15-r4) is still ~x86 and ~amd64. I hope 6.8.99 will make it in stable as soon as possible, but still ... can you do something in 6.8.2-r7, if that version  appear ?
Comment 8 Donnie Berkholz (RETIRED) gentoo-dev 2006-01-02 22:27:04 UTC
7.0 will be the next X to go stable; 6.8.2 will not receive any further changes that aren't fixing security holes.
Comment 9 Honza 2006-06-27 10:26:07 UTC
Just note: xorg-x11-6.8.2-r7 is out and bug is still there. I hope 7.0 will be soon ...
Comment 10 Donnie Berkholz (RETIRED) gentoo-dev 2006-06-27 10:58:34 UTC
(In reply to comment #9)
> Just note: xorg-x11-6.8.2-r7 is out and bug is still there. I hope 7.0 will be
> soon ...

Will be soon what? 7.1 has been in ~arch for a while already.