3

System Description

A new mid-range HP laptop (Intel i5, 7th Gen, 8GB RAM) on which I installed Ubuntu Minimal. Then, I installed the Gnome desktop environment by doing apt install vanilla-gnome-desktop.

Problem

The airplane-mode key (️✈ ) was not working. Also, whenever I shut the lid, instead of locking the screen, Airplane Mode would turn on.

A Google search led me to this answer and I followed the steps given.

$ sudo sh -c 'printf "#!/bin/sh\n/usr/bin/setkeycodes e057 240 e058 240\n" > /etc/init.d/hp-keycodes'
$ sudo chmod +x /etc/init.d/hp-keycodes
$ sudo ln -s /etc/init.d/hp-keycodes /etc/rc2.d/S01hp-keycodes

Now, two things are broken.

  1. Pressing the airplane-mode key still does nothing.
  2. The first time I shut the lid of the laptop, it goes into suspend (sleep) mode and when I open the lid, I can resume working as usual. But when I shut the laptop lid for a second time, on reopening the lid I find that the system has crashed. The screen is frozen (showing the windows that were open before I shut the lid), the mouse pointer is stuck, and shortcuts such as Alt+F2, Ctrl+Alt+Del, Ctrl+Alt+F1-F6 do not work. I have to reboot the laptop to resume working.

However, this problem does not occur while running other desktop environments like LXDE, MATE and Unity! The airplane-mode key works fine and there is no problem on closing and opening the lid.

Why is this weird problem happening? What can I do to resolve it?

  • I think this might be closer to a bug report than a question – Robert Riedl Feb 12 '18 at 07:41
  • This is not an answer, but when trying to sort out the issues on hibernation of my Dell XPS 13 I discovered that GNOME has some things it likes to do with the power button. Among other things, I found I had to turn that off. I have no idea whether that will help with your sleep/suspend/crash issue, however. – Andrew Sullivan Feb 14 '18 at 22:06
  • Sounds very similar to this bug I reported: https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1741839 – Tooniis Feb 17 '18 at 04:38

2 Answers2

1

(I've edited this message a couple times ‒ I'd forgotten to answer to the airplane key problem. Sorry!)

Before logging in Ubuntu, try clicking on the cogwheel icon, and choosing “Ubuntu over Xorg” instead of just “Ubuntu”. My HP laptop seldom crashes since I've done that.

Just “Ubuntu” uses Wayland as a display server, instead of Xorg. I suppose this is a Wayland bug.

The airplane key issue might be more difficult. The “airplane mode triggered upon opening lid” is solved. The actual airplane key works in a text console for me, but not under Ubuntu & Xorg.

There's also another question about the airplane key in an HP, that might or might not be related.

ArenaL5
  • 51
0

Try installing Gnome Tweak Tool if you haven't already and make sure "Show extended input sources" under the "Keyboard & Mouse" tab is enabled. If it is not on, keyboard shortcuts will not work, including bluetooth/wifi/settings controls etc. at the top of the keyboard.

Given that your problem seems to be unique to the Gnome environment this may solve the issue with the keyboard, although I doubt it has anything to do with the freezing issue.

I hope this helps!