Hello, This problem happens since kubuntu11.10 and it is still present in 12.04beta2. grub2 integration on reboot button does not consider the possibility of submenus. It just mergers the submenu items into the list. Ex: In grub, i have: item1 item2 item3 submenu (that have item4, item5) item6 item7 item8 And in kdm, I got item1 item2 item3 item4 item5 item6 item7 item8 If I select item6 in kdm, it will set grub to boot on the 6th position (default=5). However, for grub, the 6th position is item7. Command line grub-reboot works flawlessly when I select the next boot using the item name. Steps to reproduce: 1. Create a submenu in grub with 2 items 2. Add 3 items after the submenu 3.In kdm, select the first item after the submenu for reboot Actual result: 4.the second item after the submenu is selected Expected result: 4.the first item after the submenu is selected
I can confirm this bug. Submenus introduce multiple levels (tree structure) while at the moment kdm can only handle flat lists of entries (afaik). A proper fix would introduce a proper data structure to hold all the info. A quick and dirty fix is to use the "Submenu Title or Number>Submenu Menuentry Title or Number" format as explained here: http://ubuntuforums.org/showthread.php?p=10720316
To make it work "dirtly", just use the item name instead of the item number to select the next boot.
Unfortunately, no, it won't work. The "Submenu Title or Number>Submenu Menuentry Title or Number" format has to be used. grub-set-default and grub-reboot (the latter concerns us) will silently accept an item's name(=title) but it if this menuentry is within a submenu, it won't work. As a matter of fact I just tested it (GRUB2.00 Beta3 in Gentoo) and it didn't work. "Submenu Title or Number>Submenu Menuentry Title or Number" on the other hand worked as a charm. grub-mkconfig handles it more gracely at least: if you try to set GRUB_DEFAULT to the title of a menuentry within a submenu you get the following warning: Warning: Please don't use old title `Gentoo GNU/Linux, with Linux 3.3.1-gentoo' for GRUB_DEFAULT, use `Advanced options for Gentoo GNU/Linux>Gentoo GNU/Linux, with Linux 3.3.1-gentoo' (for versions before 2.00) or `gnulinux-advanced-b252c43e-44f6-4314-81aa-78474b513427>gnulinux-3.3.1-gentoo-advanced-b252c43e-44f6-4314-81aa-78474b513427' (for 2.00 or later)
Created attachment 70288 [details] GRUB2 menu file I uploaded my menu file as a reference. The bug can be reproduced if you try to reboot into Windows: instead of selecting Windows, it selects the last (dummy) entry.
*** Bug 298541 has been marked as a duplicate of this bug. ***
I can confirm this bug on kubuntu-dev with kde 4.8.2
Still present on kde 4.8.4
I have a working patch for the 4.8.x branch (which will probably submit for review soon although the 4.8 series is not scheduled to receive another release). For the 4.9 and master branches see http://lists.kde.org/?l=kde-core-devel&m=134160279511422&w=2
Git commit 0e325a61a57ff85f15bd3f84e57b5800ef32de07 by Lamarque V. Souza. Committed on 17/07/2012 at 19:35. Pushed by lvsouza into branch 'KDE/4.9'. Improve QML shutdown dialog: add submenu support, align reboot menu entries to the left instead of center, add hover effect. REVIEW: 105568 FIXED-IN: 4.9.0 (cherry picked from commit 7884098c74837db178a01c042cd187d37fd254b5) M +21 -3 ksmserver/themes/default/ContextMenu.qml M +44 -11 ksmserver/themes/default/MenuItem.qml M +64 -12 ksmserver/themes/default/main.qml http://commits.kde.org/kde-workspace/0e325a61a57ff85f15bd3f84e57b5800ef32de07
Git commit 7884098c74837db178a01c042cd187d37fd254b5 by Lamarque V. Souza. Committed on 17/07/2012 at 19:35. Pushed by lvsouza into branch 'master'. Improve QML shutdown dialog: add submenu support, align reboot menu entries to the left instead of center, add hover effect. REVIEW: 105568 FIXED-IN: 4.9.0 M +21 -3 ksmserver/themes/default/ContextMenu.qml M +44 -11 ksmserver/themes/default/MenuItem.qml M +64 -12 ksmserver/themes/default/main.qml http://commits.kde.org/kde-workspace/7884098c74837db178a01c042cd187d37fd254b5
Git commit 8d76169143a5d1e6f30ef069b3d133a05e80fe65 by Lamarque V. Souza. Committed on 17/07/2012 at 22:43. Pushed by lvsouza into branch 'KDE/4.9'. Use submenus only with Grub2 or Burg. (cherry picked from commit 965e46266ec3571740c6003e7c67f8f9dc21125c) M +3 -0 ksmserver/shutdowndlg.cpp M +28 -12 ksmserver/themes/default/main.qml http://commits.kde.org/kde-workspace/8d76169143a5d1e6f30ef069b3d133a05e80fe65
Git commit 965e46266ec3571740c6003e7c67f8f9dc21125c by Lamarque V. Souza. Committed on 17/07/2012 at 22:43. Pushed by lvsouza into branch 'master'. Use submenus only with Grub2 or Burg. M +3 -0 ksmserver/shutdowndlg.cpp M +28 -12 ksmserver/themes/default/main.qml http://commits.kde.org/kde-workspace/965e46266ec3571740c6003e7c67f8f9dc21125c
Git commit b8e506743429fa28694b3565a231e48e52cfa6ef by Konstantinos Smanis. Committed on 07/08/2012 at 20:01. Pushed by ksmanis into branch 'KDE/4.8'. Add support for GRUB2 submenus. Properly parse the 'submenu' directive in GRUB's configuration file and provide the user with an appropriate menu interface when choosing which entry to reboot into. Limitations: Internally we make use of the " >> " separator (hardcoded in both kdm and ksmserver). An occurence of the separator in a menu title (be it menuentry or submenu) will baffle our parser. Moreover, we only support multi-line statements: one-liners, although supported by GRUB, will fail to be parsed. Lastly, only up to 5 nesting levels are supported. The above limits are more than enough for all but a handful of cases. REVIEW: 105563 M +93 -44 kdm/backend/bootman.c M +0 -16 kdm/backend/ctrl.c M +4 -0 kdm/backend/dm.h M +40 -1 kdm/backend/util.c M +22 -12 ksmserver/shutdowndlg.cpp http://commits.kde.org/kde-workspace/b8e506743429fa28694b3565a231e48e52cfa6ef
Git commit 0af24b2dcd32fd74f1a7490088a37b1ef3387f6f by Konstantinos Smanis. Committed on 08/08/2012 at 00:57. Pushed by ksmanis into branch 'KDE/4.9'. Add support for GRUB2 submenus. Properly parse the 'submenu' directive in GRUB's configuration file and provide the user with an appropriate menu interface when choosing which entry to reboot into. Limitations: Internally we make use of the " >> " separator (hardcoded in both kdm and ksmserver). An occurence of the separator in a menu title (be it menuentry or submenu) will baffle our parser. Moreover, we only support multi-line statements: one-liners, although supported by GRUB, will fail to be parsed. Lastly, only up to 5 nesting levels are supported. The above limits are more than enough for all but a handful of cases. (forward ported from commit b8e506743429fa28694b3565a231e48e52cfa6ef) FIXED-IN: 4.9.1 REVIEW: 105563 M +93 -44 kdm/backend/bootman.c M +0 -16 kdm/backend/ctrl.c M +4 -0 kdm/backend/dm.h M +40 -1 kdm/backend/util.c http://commits.kde.org/kde-workspace/0af24b2dcd32fd74f1a7490088a37b1ef3387f6f
Git commit c578e8804ee6505ea282fb046972bf88213157e4 by Konstantinos Smanis. Committed on 08/08/2012 at 01:06. Pushed by ksmanis into branch 'master'. Add support for GRUB2 submenus. Properly parse the 'submenu' directive in GRUB's configuration file and provide the user with an appropriate menu interface when choosing which entry to reboot into. Limitations: Internally we make use of the " >> " separator (hardcoded in both kdm and ksmserver). An occurence of the separator in a menu title (be it menuentry or submenu) will baffle our parser. Moreover, we only support multi-line statements: one-liners, although supported by GRUB, will fail to be parsed. Lastly, only up to 5 nesting levels are supported. The above limits are more than enough for all but a handful of cases. (forward ported from commit b8e506743429fa28694b3565a231e48e52cfa6ef) FIXED-IN: 4.9.1 REVIEW: 105563 M +93 -44 kdm/backend/bootman.c M +0 -16 kdm/backend/ctrl.c M +4 -0 kdm/backend/dm.h M +40 -1 kdm/backend/util.c http://commits.kde.org/kde-workspace/c578e8804ee6505ea282fb046972bf88213157e4