Bug 18027 - Numlock not on after reboot
Summary: Numlock not on after reboot
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: High normal
Target Milestone: ---
Assignee: All Packagers
QA Contact:
URL:
Whiteboard:
Keywords: FOR_ERRATA6
: 18473 21240 21558 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-03-17 17:16 CET by Herman Viaene
Modified: 2017-09-01 07:20 CEST (History)
8 users (show)

See Also:
Source RPM: numlock
CVE:
Status comment:


Attachments

Description Herman Viaene 2016-03-17 17:16:31 CET
Description of problem: The numlock stays off after a reboot


Version-Release number of selected component (if applicable):
6dev1 (16-3-2016)

How reproducible:
Always

Steps to Reproduce:
1.Set numlock on in Systemsettings
2.Install numlock package
3.Reboot. The numlock stays of, the systemsettings are preserved, the package is shown present in MCC, but the service is not shown in MCC - System - Services and the systemctl status numlock.service returns: loaded, inactive
Herman Viaene 2016-03-17 17:16:47 CET

Keywords: (none) => 6dev1

Comment 1 Marja van Waes 2016-03-18 08:39:51 CET
Assigning to all packagers collectively, since there is no maintainer for numlock

Source RPM: (none) => numlock
CC: (none) => marja11
Assignee: bugsquad => pkg-bugs

Comment 2 Herman Viaene 2016-04-09 11:49:03 CEST
Does not occur in openSUSE42.1
Comment 3 Bit Twister 2016-04-09 13:44:40 CEST
(In reply to Herman Viaene from comment #0)
> Description of problem: The numlock stays off after a reboot
> 
> 
> Version-Release number of selected component (if applicable):
> 6dev1 (16-3-2016)
> 
> How reproducible:
> Always
> 
> Steps to Reproduce:
> 1.Set numlock on in Systemsettings
> 2.Install numlock package

Maybe a missing step  :)
   systemctl enable numlock

3.Reboot

CC: (none) => bittwister2

Comment 4 Herman Viaene 2016-04-10 09:20:51 CEST
That's something I've nevvee had to do before (MGA5 and erlier) and besides at the CLI as root:
# systemctl enable numlock
numlock.service is not a native service, redirecting to systemd-sysv-install
Executing /usr/lib/systemd/systemd-sysv-install enable numlock
service numlock ondersteunt chkconfig niet (does not support)
Comment 5 Bit Twister 2016-04-10 10:41:50 CEST
(In reply to Herman Viaene from comment #4)
> That's something I've nevvee had to do before (MGA5 and erlier) and besides
> at the CLI as root:

Those are normal messages when systemctl enables systemd-sysv scripts found in /etc/rc.d/rc* directories.

In my opinion non-critical services should not be enabled on install or started if the service was not enabled, or not running during an install or update.
Comment 6 Herman Viaene 2016-04-10 10:59:02 CEST
Why would a user want to install a service and then not want it running - at least without intervention at the CLI - , especially something rather basic like numlock when the user has an AZERTY keyboard???
Comment 7 Daniel Tartavel 2016-04-10 12:09:23 CEST
I corrected the init script (/etc/rc.d/init.d/numlock), remplacing the valoes of the line chkconfig: bye the values of the script 'network' and chkconfig run enable again the numlock service.

CC: (none) => contact

Comment 8 Bit Twister 2016-04-10 12:21:41 CEST
(In reply to Herman Viaene from comment #6)
> Why would a user want to install a service and then not want it running - at
> least without intervention at the CLI - , especially something rather basic
> like numlock when the user has an AZERTY keyboard???

That is a two part question. Just for instance numlock could be installed on a non-systemd system so the post install script would have to figure it out.

As for the other part, take httpd service as an example. There may be possible security settings needing turned on or features turned off before letting it run.

There is also the case where you do not competing services running.
I have no desire to have systemd-timesyncd running since I have ntp installed.
Comment 9 Daniel Tartavel 2016-04-10 13:13:35 CEST
I think systemd  don't manage runlevel 7
Someone can confirm ?
Comment 10 Florian Hubold 2016-04-11 00:03:09 CEST
(In reply to Bit Twister from comment #8)
> Just for instance numlock could be installed on
> a non-systemd system so the post install script would have to figure it out.

No, it wouldn't have to, we have magic glue for that, see e.g. /usr/share/rpm-helper/add-service

(In reply to Daniel Tartavel from comment #9)
> I think systemd  don't manage runlevel 7

What does this have to do with the numlock service or this report?

CC: (none) => doktor5000

Comment 11 Daniel Tartavel 2016-04-11 09:34:23 CEST
the error  is
service numlock ondersteunt chkconfig niet (does not support)
systemctl can't enable numlock because of the line 
# chkconfig: 3457 29 15
in the init script.
Removing 7 make systemctl enabling numlock
Comment 12 Marja van Waes 2016-04-11 10:20:57 CEST
(In reply to Daniel Tartavel from comment #7)
> I corrected the init script (/etc/rc.d/init.d/numlock), remplacing the
> valoes of the line chkconfig: bye the values of the script 'network' and
> chkconfig run enable again the numlock service.

(In reply to Daniel Tartavel from comment #11)
> the error  is
> service numlock ondersteunt chkconfig niet (does not support)
> systemctl can't enable numlock because of the line 
> # chkconfig: 3457 29 15
> in the init script.
> Removing 7 make systemctl enabling numlock

Do you mind elaborating? I don't have this bug, so cannot test, but others might need more precise instructions

Do you mean that in 
  /etc/rc.d/init.d/numlock
 the line 
          # chkconfig: 3457 29 15

should be replaced with:

          # chkconfig: 345 29 15

?

If so, why does that line do anything, with the "#" in front of it?

Also if so: should removing the "7" in that line be enough to reboot to get numlock to be "on" on reboot, or is an additional step needed?
Comment 13 Daniel Tartavel 2016-04-11 11:03:33 CEST
yes the line must be # chkconfig: 345 29 15

this line is a config line for chkconfig and not interpreted by bash

Reboot is not necessary, the install script execute "systemctl start numlock", but due to this error, numlock is no more activated by default in cauldron ( running well in Mageia5 ).
So executing systemctl start numlock by hand is working after the change
Comment 14 Daniel Tartavel 2016-04-11 11:05:44 CEST
That's why i ask the question about runlevel 7, because we need to modify init script in the package if systemd don't manage runlevel 7
Comment 15 Daniel Tartavel 2016-04-11 11:25:48 CEST
Sorry,

i mean systemctl enable numlock not systemctl start numlock
Comment 16 Marja van Waes 2016-05-17 11:34:38 CEST
*** Bug 18473 has been marked as a duplicate of this bug. ***

CC: (none) => roger.mis972

Comment 17 Marja van Waes 2017-07-15 00:56:48 CEST
*** Bug 21240 has been marked as a duplicate of this bug. ***
Marja van Waes 2017-07-15 20:05:49 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=19082

Marja van Waes 2017-07-15 20:06:04 CEST

Keywords: 6dev1 => FOR_ERRATA6

Comment 18 Alejandro Vargas 2017-07-19 10:39:32 CEST
I can confirm the problem in Mageia 6 and the solution.

chkconfig numlock on and systemctl enable numlock givs an error. Changing 

3457 by 345 in /etc/init.d/numlock solves the problem. 

Please include in updates.

CC: (none) => alejandro.anv

Marja van Waes 2017-07-21 21:16:54 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=21301

Alejandro Vargas 2017-07-31 11:47:55 CEST

Priority: Normal => High

Comment 19 Martin Volf 2017-08-22 20:29:58 CEST
I have tested on mga6 64bit two posibilities to enable numlock by default:

1) Easier way: SSDM enables numlock:
------------------------------------
See https://bugs.mageia.org/show_bug.cgi?id=21301

- just edit /etc/ssdm.conf and add "Numlock=on"
- logout to SSDM
- numlock is enabled for SSDM only (not for GDM, XDM, LightDM) and for Plasma, GNOME, Ice-Session desktops
- systemctl status numlock.service returns "inactive"

2) Harder way: systemd-sysv-install enables numlock
---------------------------------------------------
- # urpmi numlock
- edit the file /etc/init.d/numlock and change to "# chkconfig: 345 29 15" instead of "# chkconfig: 3457 29 15"
- # /usr/lib/systemd/systemd-sysv-install enable numlock
- # reboot
- numlock is enabled for SSDM only (not for GDM, XDM, LightDM) and for Plasma, GNOME, Ice-Session desktops
- systemctl status numlock.service returns "active (exited)"


I think /etc/init.d/numlock should be fixed by package update and keep /etc/ssdm.conf as an option for "Numlock=on", isn't it?

But into Errata/Release Notes should be two options mentioned: install package numlock or edit SSDM config file.

CC: (none) => yullaw

Comment 20 Martin Volf 2017-09-01 07:20:48 CEST
*** Bug 21558 has been marked as a duplicate of this bug. ***

CC: (none) => bugzzzz


Note You need to log in before you can comment on or make changes to this bug.