Version: 0.2 (using KDE 4.5.0) OS: Linux I have to activate num lock manually after every boot. Reproducible: Always OS: Linux (x86_64) release 2.6.34-12-desktop Compiler: gcc
This all seems to work for me. But I've improved a code a bit anyway and provided some error output so if you can try the code after r1170172 commit (in 4.5 branch) and see if it works. If it still doesn't work for you please try to turn numlock flag on/off in systemsettings and see the output from kded (e.g. in ~/.xsession-errors) if it provides any error messages with "numlock" in it.
Thanks, I'll try 4.5.2, when it is ready, then I'll report.
Hi, I tested this patch. It still doesn't work here. In my .xsession-errors I have this: Fetched layout groups from X server: layouts: ("it") variants: ("") kded(1951): Failed to set numlock: numlock mask is 0 kded(1951): Failed to set numlock: XkbLockModifiers request hasn't been sent Fetched layout groups from X server: layouts: ("it") variants: ("") QMetaObject::invokeMethod: No such method KUniqueApplication::loadCommandLineOptionsForNewInstance() Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString) QMetaObject::invokeMethod: No such method KUniqueApplication::loadCommandLineOptionsForNewInstance()
Created attachment 51535 [details] test looking for NumLock modifier Alessandro could you please try to compile and run attached file and post the output? Thanks.
I built with: g++ -o test xkb_mask_test.cpp -lpthread -lX11 ./test says: mod count 16 mod 0: NumLock mask: 0x0 Tell me what you need to fix this bug so I can push the patch to our Kubuntu packages for the final release of Kubuntu Maverick on 10 October. Thanks ;)
Created attachment 51537 [details] test looking for NumLock modifier v2 Alessandro, could you please try with v2 of the test? Thanks.
With v2 of the test: mod count 16 mod 0: NumLock mask: 0x0
Hmm that's weird, looks like XkbVirtualModsToReal can't find real mod for NumLock. Something must be messed up with the modifiers mapping and I don't have enough knowledge in this area. Also it works here on openSuSE 11.3 and Mandriva 2010.1 so I am curious if it's something related to Kubuntu or possibly newer x.org.
Can you attach again your patch? Maybe I can run your test with the patch and see if something is changed.
>Also it works here on openSuSE 11.3 and Mandriva 2010.1 so I am curious if it's >something related to Kubuntu or possibly newer x.org. I have the problem with opensuse-11.3. But it seems not to be reproducible 100% of the time. Today is the first time (I recognize), that num lock is activated at kde start.
I've also Gnome installed (from ubuntu-desktop package) in the same system and num lock works. I've just tried now.
hmm, it's good to know it works in gnome but not too good with being not 100% reproducable on opensuse. :) could you please try xset and see if that changes the led for you? xset led 3 xset -led 3 xset led named "Num Lock" xset -led named "Num Lock"
With: xset led 3 the led switch to "on" With: xset -led 3 the led switch to "off" With: xset led named "Num Lock" xset -led named "Num Lock" do nothing.
Cool, looks like setting leds by name (via XKB) is broken, you may wanna file a bug against xorg for the named led setting problem. I'll take a look if I can use the numeric approach "xset led 3" uses.
for me, both do nothing
Ops sorry, xset led 3 don't light the bloc num led, it light a led called "Pausa Interr" here
ok, seems it's quite messy there could you please try xset led 1 and also try numlockx program? For me seems that only the numlockx (which uses Xtest to emulate NumLock key press) is working reliably.
numlockx is the only command that works for me
xset led 1 do nothing. With "numlockx on", the led is off but numpad works. I mean, with numlock on/off the numpad works but I don't have control on the led (the led doesn't light or turn off).
Ok, setting numlock seems to be quite messy, I had to just borrow the whole code from numlockx and pushed the change into both trunk and 4.5 branch. If you could try it and let me know if it helped I'd really appreciate it.
Numpad works but the led is off. If I push "Num Lock" button in the numpad the led turn on and the numpad doesn't work (is off) :) You should fix the behaviour of the led now :)
It seems a fault of numlockx code: https://bugs.launchpad.net/ubuntu/+source/numlockx/+bug/218202
Wow, even that bug looks messy spawning across several years and no stable results. The problems were reported for gnome, kde and xfce. Seems that numlockx works for me on openSuse/Mandriva and for H.H. on openSuse so current solution in kde source is better than what we had before. So I'll just wait until somebody fixes numlockx or x.org for Ubuntu :) Though Looking at what extent numlockx goes to set a simple led (several hundreds lines of code where it should be 1-liner) I'd say the problem lies at much lower level. There seems to be something quite wrong either at X.org level or at the kernel. BTW to make sure it's not KDE's fault could you please try to start X without DE and try numlockx to see if it produces right results?
numlockx produces right results without a DE. Now I tried if it works in Gnome and it does, quite weird :)
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!