Score:0

How do I prevent Ubuntu from switching to Virtual Terminal 1 when my monitor sleeps?

cm flag

I'm experiencing this odd issue where every time my monitor sleeps or the input is changed Ubuntu switches to displaying Virtual Terminal 1 (i.e. equivalent of pressing Ctrl+Alt+F1) when I wake it up/reconnect. I can switch back to my GUI using Alt+F2, but it's rather annoying. How can I make Ubuntu resume into the graphical display when the monitor comes out of sleep?

When this happens I get some dmesg activity but nothing stands out as super odd to me other than rfkill enabling and disabling the input handler. My configuration is running integrated graphics on a Ryzen 7700x & Gigabyte B650E Aorus Master motherboard Ubuntu 22.04 LTS. The monitor is an Acer CB282K and I'm connected over HDMI.

dmesg log when monitor sleeps

[ 3808.450395] audit: type=1107 audit(1674915224.927:200): pid=923 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/login1" interface="org.freedesktop.login1.Manager" member="UserNew" name=":1.15" mask="receive" pid=3699 label="snap.firefox.firefox" peer_pid=967 peer_label="unconfined"
            exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
[ 3808.452521] audit: type=1107 audit(1674915224.931:201): pid=923 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/login1" interface="org.freedesktop.login1.Manager" member="SessionNew" name=":1.15" mask="receive" pid=3699 label="snap.firefox.firefox" peer_pid=967 peer_label="unconfined"
            exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
[ 3808.517737] rfkill: input handler enabled
[ 3808.610350] audit: type=1107 audit(1674915225.087:202): pid=923 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/login1" interface="org.freedesktop.login1.Manager" member="SessionRemoved" name=":1.15" mask="receive" pid=3699 label="snap.firefox.firefox" peer_pid=967 peer_label="unconfined"
            exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
[ 3809.602618] audit: type=1107 audit(1674915226.079:203): pid=923 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/login1" interface="org.freedesktop.login1.Manager" member="SessionNew" name=":1.15" mask="receive" pid=3699 label="snap.firefox.firefox" peer_pid=967 peer_label="unconfined"
            exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
[ 3809.710103] audit: type=1107 audit(1674915226.187:204): pid=923 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/login1" interface="org.freedesktop.login1.Manager" member="SessionRemoved" name=":1.15" mask="receive" pid=3699 label="snap.firefox.firefox" peer_pid=967 peer_label="unconfined"
            exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
[ 3816.803866] rfkill: input handler disabled
[ 3819.790257] audit: type=1107 audit(1674915236.268:205): pid=923 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_signal"  bus="system" path="/org/freedesktop/login1" interface="org.freedesktop.login1.Manager" member="UserRemoved" name=":1.15" mask="receive" pid=3699 label="snap.firefox.firefox" peer_pid=967 peer_label="unconfined"
            exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'

I'm using the default display manager (GDM). If I run systemctl status display-manager.service there is a status in red that says: "gkr-pam: unable to locate daemon control file". Not sure if this is related, but it looks to be tied to authentication

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.