Bug 18027 - Numlock not on after reboot
Summary: Numlock not on after reboot
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: x86_64 Linux
Priority: High normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA6-64-OK
Keywords: FOR_ERRATA6, advisory, validated_update
: 18473 19082 21240 21558 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-03-17 17:16 CET by Herman Viaene
Modified: 2018-03-26 22:21 CEST (History)
11 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

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

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

Comment 21 andre salaun 2018-03-24 10:28:29 CET
(In reply to Martin Volf from comment #20)
> *** Bug 21558 has been marked as a duplicate of this bug. ***

On 2018-03-24 This bug is always here nothing in errata...

CC: (none) => andresalaun

Comment 22 Samuel Verschelde 2018-03-25 11:49:58 CEST
(In reply to Marja van Waes from comment #12)
> (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?

Yes, that was it. I submitted the fix to cauldron. If anyone has a better fix, just implement it, but for the time being it will be better than what it was.

Thanks Daniel for the patch.
Comment 23 Samuel Verschelde 2018-03-25 11:53:17 CEST
*** Bug 19082 has been marked as a duplicate of this bug. ***
Comment 24 Samuel Verschelde 2018-03-25 12:43:54 CEST
Fixed package submitted to Mageia 6 Core Updates Testing.

Assigning to QA.

SRPM: 
numlock-2.1.2-12.1.mga6

RPMS: 
numlock-2.1.2-12.1.mga6.x86_64
numlock-2.1.2-12.1.mga6.i586

Advisory:
This update allows the numlock service to be properly activated. It also fixes a bug that prevented the numlock package from being uninstalled.

Assignee: pkg-bugs => qa-bugs

Samuel Verschelde 2018-03-25 16:50:06 CEST

Version: Cauldron => 6

Comment 25 Len Lawrence 2018-03-25 17:18:37 CEST
Mageia 6 :: x86_64

$ sudo urpmi numlock
installing numlock-2.1.2-12.mga6.x86_64.rpm from /var/cache/urpmi/rpms         
Warning: Problems encountered when activating services.
service numlock does not support chkconfig

$ sudo urpme numlock
removing numlock-2.1.2-12.mga6.x86_64
service numlock does not support chkconfig
error: %preun(numlock-2.1.2-12.mga6.x86_64) scriptlet failed, exit status 1
ERROR: 'script' failed for numlock-2.1.2-12.mga6.x86_64
error: numlock-2.1.2-12.mga6.x86_64: erase failed

Installed numlock frpm Updates Testing - clean installation.
Removed the update without any errors and reinstalled it immediately afterwards.

$ sudo systemctl start numlock.service
$ systemctl status numlock
● numlock.service - LSB: Locks NumLock key at init runlevel change
   Loaded: loaded (/etc/rc.d/init.d/numlock; generated; vendor preset: enabled)
   Active: active (exited) since Sun 2018-03-25 13:28:21 BST; 15s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 14454 ExecStart=/etc/rc.d/init.d/numlock start (code=exited, status=0

Ran drakconf to ensure that it was set to run on boot.

Checked the use of the numeric keypad by using emacs with keypad bindings for common operations.  That worked.

This update is OK.

CC: (none) => tarazed25

Len Lawrence 2018-03-25 17:19:00 CEST

Whiteboard: (none) => MGA6-64-OK

Lewis Smith 2018-03-26 15:30:50 CEST

Keywords: (none) => advisory, validated_update
CC: (none) => sysadmin-bugs

Comment 26 Mageia Robot 2018-03-26 22:21:57 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2018-0055.html

Resolution: (none) => FIXED
Status: NEW => RESOLVED


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