Num lock is deactivated at start

Bug #635670 reported by Alessandro Ghersi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KDE Base
Invalid
Medium
kdebase-workspace (Ubuntu)
Fix Released
Undecided
Alessandro Ghersi

Bug Description

Binary package hint: kdebase-workspace

I have to activate num lock manually after every boot.

System settings -> input devices -> NumLock on KDE Startup -> Turn on
Reboot
The num lock is off instead of on

That's annoying

Tags: kubuntu
Revision history for this message
In , Cyberbeat-p (cyberbeat-p) wrote :

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

Revision history for this message
In , Andriy Rysin (arysin-gmail) wrote :

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.

Revision history for this message
In , Cyberbeat-p (cyberbeat-p) wrote :

Thanks, I'll try 4.5.2, when it is ready, then I'll report.

Revision history for this message
In , Alessandro Ghersi (alessandro-ghersi) wrote :

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()

Revision history for this message
In , Andriy Rysin (arysin-gmail) wrote :

Created attachment 51535
test looking for NumLock modifier

Alessandro could you please try to compile and run attached file and post the output? Thanks.

Revision history for this message
In , Alessandro Ghersi (alessandro-ghersi) wrote :

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 ;)

Revision history for this message
In , Andriy Rysin (arysin-gmail) wrote :

Created attachment 51537
 test looking for NumLock modifier v2

Alessandro, could you please try with v2 of the test? Thanks.

Revision history for this message
In , Alessandro Ghersi (alessandro-ghersi) wrote :

With v2 of the test:
mod count 16
mod 0: NumLock
mask: 0x0

Revision history for this message
In , Andriy Rysin (arysin-gmail) wrote :

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.

Changed in kdebase-workspace (Ubuntu):
milestone: none → ubuntu-10.10
tags: added: kubuntu
Revision history for this message
In , Alessandro Ghersi (alessandro-ghersi) wrote :

Can you attach again your patch? Maybe I can run your test with the patch and see if something is changed.

Revision history for this message
In , Cyberbeat-p (cyberbeat-p) wrote :

>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.

Revision history for this message
In , Alessandro Ghersi (alessandro-ghersi) wrote :

I've also Gnome installed (from ubuntu-desktop package) in the same system and num lock works. I've just tried now.

Revision history for this message
In , Andriy Rysin (arysin-gmail) wrote :

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"

Revision history for this message
In , Alessandro Ghersi (alessandro-ghersi) wrote :

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.

Revision history for this message
In , Andriy Rysin (arysin-gmail) wrote :

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.

Revision history for this message
In , Cyberbeat-p (cyberbeat-p) wrote :

for me, both do nothing

Revision history for this message
In , Alessandro Ghersi (alessandro-ghersi) wrote :

Ops sorry, xset led 3 don't light the bloc num led, it light a led called "Pausa Interr" here

Revision history for this message
In , Andriy Rysin (arysin-gmail) wrote :

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.

Revision history for this message
In , Cyberbeat-p (cyberbeat-p) wrote :

numlockx is the only command that works for me

Revision history for this message
In , Alessandro Ghersi (alessandro-ghersi) wrote :

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).

Revision history for this message
In , Andriy Rysin (arysin-gmail) wrote :

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.

Revision history for this message
In , Alessandro Ghersi (alessandro-ghersi) wrote :

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 :)

Revision history for this message
In , Alessandro Ghersi (alessandro-ghersi) wrote :
Revision history for this message
In , Andriy Rysin (arysin-gmail) wrote :

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?

Revision history for this message
In , Alessandro Ghersi (alessandro-ghersi) wrote :

numlockx produces right results without a DE. Now I tried if it works in Gnome and it does, quite weird :)

Changed in kdebase-workspace (Ubuntu):
assignee: nobody → Alessandro Ghersi (alessandro-ghersi)
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kdebase-workspace - 4:4.5.1-0ubuntu3

---------------
kdebase-workspace (4:4.5.1-0ubuntu3) maverick; urgency=low

  [ Alessandro Ghersi ]
  * Add kubuntu_28_disable_lanczos_filter.diff, disable Lanczos filter while
    moving windows in present windows.
  * Add kubuntu_29_fallback_to_xrender_compositing.diff
    fallback to XRender compositing in case of Software Rasterizer.
    (backport from trunk)
  * Add kubuntu_30_fix_numlock_at_start.diff (LP: #635670)
  * Update kubuntu_26_fix_oxygen_with_nvidia.diff to fix memory leak
  * Add kubuntu_31_keep_panel_when_unhidden.diff to keep the panel above when
    unhidden, keepbelow when hidden
    (http://bugs.kde.org/show_bug.cgi?id=251443)
  * Add kubuntu_32_fix_device_action_editor.diff
    fix plasma stops responding if you minimize the device action editor
    (http://bugs.kde.org/show_bug.cgi?id=251138)
  * Adjust kdm.postinst to transfer ownership of /var/lib/kdm to the kdm user.
    (Taken from Debian git) (LP: #588090)

  [ Harald Sitter ]
  * Add kubuntu_01_kubuntu_knewstuff.diff to introduce Kubuntu Wallpaper
    support in Plasma Wallpaper's get new stuff feature.
    i.e. listing content from kubuntu-art's:
    http://kubuntu-art.org/index.php?xcontentmode=7800
 -- Alessandro Ghersi <email address hidden> Sat, 18 Sep 2010 20:33:06 +0200

Changed in kdebase-workspace (Ubuntu):
status: Fix Committed → Fix Released
Changed in kdebase:
importance: Unknown → Medium
Changed in kdebase:
status: Unknown → Incomplete
Revision history for this message
In , Andrew-crouthamel (andrew-crouthamel) wrote :

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!

Revision history for this message
In , Andrew-crouthamel (andrew-crouthamel) wrote :

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!

Changed in kde-baseapps:
status: Incomplete → Invalid
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.