After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668525 - [PATCH] numlock state tracking wakes up the disk too much
[PATCH] numlock state tracking wakes up the disk too much
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: keyboard
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2012-01-23 18:04 UTC by Adam Jackson
Modified: 2012-01-24 16:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Describe the attachment briefly. (1.86 KB, patch)
2012-01-23 18:04 UTC, Adam Jackson
none Details | Review
keyboard: Don't save num-lock when caps-lock changes (3.20 KB, patch)
2012-01-23 18:56 UTC, Bastien Nocera
committed Details | Review

Description Adam Jackson 2012-01-23 18:04:46 UTC
Created attachment 205912 [details] [review]
Describe the attachment briefly.

Following the fix for bug #631989, hitting any lockable modifier (capslock, for example) will cause the numlock state to be written to disk.  Wouldn't be so bad except that means fsync() which means spinning up the platter if it's asleep.

Attached patch makes my Thinkpad's disk light stop flashing when I hit capslock.  I think it still does the right thing for numlock too.
Comment 1 Bastien Nocera 2012-01-23 18:56:59 UTC
Created attachment 205915 [details] [review]
keyboard: Don't save num-lock when caps-lock changes

The code would write the num-lock state even if it didn't change.
Comment 2 Bastien Nocera 2012-01-23 19:02:00 UTC
Does that patch work for you? I think that there were some wrong assumptions about the value of the enum (off == 2, not 0).
Comment 3 Bastien Nocera 2012-01-24 16:53:34 UTC
Pushed, let me know if I broke something.

Attachment 205915 [details] pushed as 89b476e - keyboard: Don't save num-lock when caps-lock changes