I installed Ubuntu 22.04 on my Galaxy Galaxy Book 2 (NP750XED) by following the official instructions and it works perfectly until I turn the computer off. After boot, when reaching the login prompt, the system abruptly goes to sleep. I can wake up the system again, but it will quickly go to sleep again, stuck in a perpetual loop.
1 Answers
Problem
The problem was a combination of a bug in the handling of closing/opening the laptop lid and a kernel compatibility issue with the new 12th gen intel hardware. The resource https://forums.linuxmint.com/viewtopic.php?t=381597 was the main thing that pointed me there.
Solution
First get a stable session up an running without getting stuck in the sleep loop. It seemed pretty random and confusing when that was possible for me, but what finally worked was to connect a USB-C monitor (I know, strange). You could maybe also boot with safe graphics or reinstall ubuntu and perform the steps before you reboot, since if your situation is like min you won't meet the issue until turning the computer off for the first time.
First make sure the kernel is up-to-date (adjust 22.04 if you are on a different ubuntu version)
sudo apt update
sudo apt install linux-oem-22.04
Now add kernel flags by editing /etc/default/grub (requires root access). Go to the line
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
and change it to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.enable_dc=0 intel_idle.max_cstate=2"
save the file and run
sudo update-grub
Now you have update the kernel settings, which is part one of two of the fix.
Next instruct the OS to ignore when the lid is opened or closed; edit /etc/systemd/logind.conf (for example using `sudo nano /etc/systemd/logind.conf) and add the lines
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
and save. Restart the login service with
systemctl restart systemd-logind.service
This will log you out. Log in again.
Now reboot, and if you were lucky like me your system will now work flawlessly.
Hope this helps!
- 61
- 1
- 4
-
Can you point me to the Kernel bug? Did you manage to get HDMI output working? – user5950 Jul 13 '23 at 22:59
-
1I don't remember exactly, but maybe https://forums.linuxmint.com/viewtopic.php?p=2225846#p2225846 helps a bit? Its linked in the "main resource" i quoted. – Morten Emmanuel Schiøler Jul 15 '23 at 06:58
-
1I still use the laptop (for work), with a USB C-connected monitor. I can't test right HDMI right now because l'm on holiday, but I -think- (not sure) HDMI worked. – Morten Emmanuel Schiøler Jul 15 '23 at 07:00