Updating phoc to 0.8.0-1~pureos1-amber1 breaks mouse support? (USB/Bluetooth mice)

This morning, I was using my Librem 5 running PureOS amber with a little USB Type C hub into which I had plugged a Twiddler3 (which appears logically as a standard USB keyboard and mouse) and a Logitech USB mouse (the “mouse” functionality in the Twiddler is rubbish, hence a second actual mouse for actual mousing, in this instance). This normally works fine, and it was working fine.

Finishing up what I was doing, I noticed that there was an update available for phoc, so I pressed the “Restart & Update” button. Upon rebooting, I found that the unlock keypad would not appear and the phone ended up powered off. According to /var/log/apt/history.log, phoc was updated from 0.7.1-1~pureos1-amber1 to 0.8.0-1~pureos1-amber1.

After some messing about, I found that any time I connect either one or both of my USB mice in any combination, whether directly or through the hub, using any of my cables or adapters, the screen goes black. After the screen goes black, somewhat at random, one of two things happens: either the phone crashes and powers off and sits there powered off until I power it on again, or the screen stays black until the mouse is unplugged, then the UI reappears and I can continue using the phone.

This only happens with mice. If I plug in a USB keyboard, the keyboard works fine, but as soon as I add a mouse the screen goes black. I also tried a USB flash drive, which worked fine too. It makes no difference whether I connect an HDMI monitor or power input to the hub. So it seems like this is a mouse problem.

phoc 0.8.0 has gained mouse configuration support - sounds like something’s going bad with it in your case. Does it crash? If yes, could you provide a backtrace?

It does seem as though phoc crashes, although I can’t be certain it isn’t exiting gracefully in the case of the power-offs or just behaving oddly in the case of the UI returning after the mouse is unplugged.

I’ve noticed that, on the occasions when it ends up powering off, if I press the power button before it has finished powering off, it shows the Librem5 logo on the screen briefly, before powering off, as though it were in the process of doing a normal shutdown.

I am in principle willing to provide a backtrace, but I don’t know what the procedure would be for obtaining one. My understanding of backtraces is somewhat abstract and a little flaky, so I would need some hand-holding through the concrete details.

I take it I’m the only one seeing this behaviour.

In case it is a necessary detail for reproducing the issue: I was using a Logitech M500 mouse (a.k.a. M-U0007). (I already said about the other mouse being a Twiddler3.)

Summary: No

I’m not routinely connecting a mouse to my Librem 5, although I have from time to time done that with success in the past. I also now get significant malfunction when a USB mouse is connected. That is, I can reproduce the behaviour that you are reporting. It’s not just you.


I just did the following.

  1. Connected a USB-C to USB-A adapter to the bottom of the phone and plugged in a regular USB mouse (a known good mouse). Hence: no dock or hub involved here. Nothing fancy. Nothing complex.
  2. I used the mouse to search for and agree to apply updates (in PureOS Store app), demonstrating that the mouse support is working. phoc is, before update, 0.7.1-1~pureos1~amber1
  3. A couple of (normal) reboots later, phoc is upgraded as you have specified i.e. phoc is now 0.8.0-1~pureos1~amber1
  4. Mouse and phone are now malfunctioning. I had to disconnect the mouse in order to get stable operation. (I did not appear to get any full-on phone restarts.) So yes looks like a regression.

Like you, I don’t know how to provide a backtrace - but I am willing and able to follow clear instructions.

1 Like

Going a bit beyond my pay grade here but I think if you press the wake button while phoc is restarting then you get the effect of powering off the phone. If that’s correct then the obvious corollary is: don’t do that. :slight_smile:

1 Like

This appears to be an amber-phone specific issue - I keep one of my phones docked to screen, keyboard and mouse all the time, but that one is on byzantium and doesn’t show this problem at all.

Add deb http://repo.pureos.net/pureos-debug amber-phone-debug main to your repositories, install phoc-dbgsym, make sure systemd-coredump is installed, then reproduce the issue and use coredumpctl to retrieve the coredump.


Thank you for the instructions. I’ve just tried it, but there isn’t currently an amber-phone-debug in http(s)://repo.pureos.net/pureos-debug/dists, so this doesn’t work. I will come back later.

Ah, my bad, sorry; use amber-phone-staging-debug

I think you are correct. If I resist the urge to poke, it seems not to power off. So, this is probably the difference between the two outcomes I saw before. If it powered off, I probably pressed the button. If it came back after I unplugged the mouse, I probably didn’t press the button!

I didn’t realise that pressing that button would cause it to power off if phoc had crashed, but I suppose it makes sense that it would, since the normal behaviour of the button (i.e. not to shut down) is probably defined by the graphical shell.

OK, I have saved four core dumps; one from plugging the mouse in and the other three seemingly from repeated attempts to restart phoc while the mouse was plugged in. They make a 10MB tar.gz. Where shall I put it? :slight_smile:

1 Like

For starters, just pasting the backtrace shown by coredumpctl may already be enough.

Yup, exactly.

@dos I would assume this is due to different or missing schema entries on amber-phone.

Ah, I didn’t think of that, though it seems obvious now that you put it like that! Here is coredumpctl’s ‘info’ output:

Initial crash
           PID: 613 (phoc)
           UID: 1000 (purism)
           GID: 1000 (purism)
        Signal: 5 (TRAP)
     Timestamp: Thu 2021-08-05 14:44:03 BST (8min ago)
  Command Line: /usr/bin/phoc -C /usr/share/phosh/phoc.ini -E bash -lc 'gnome-session --disable-acceleration-check --session=phosh'
    Executable: /usr/bin/phoc
 Control Group: /user.slice/user-1000.slice/session-1.scope
          Unit: session-1.scope
         Slice: user-1000.slice
       Session: 1
     Owner UID: 1000 (purism)
       Boot ID: 56869365fe8b424dae1838b737e515df
    Machine ID: 0abf9e945cdd4378912c9943a4b192d1
      Hostname: patrick-l5
       Storage: /var/lib/systemd/coredump/core.phoc.1000.56869365fe8b424dae1838b737e515df.613.1628171043000000.lz4
       Message: Process 613 (phoc) of user 1000 dumped core.
                Stack trace of thread 613:
                #0  0x0000ffffb05f3714 raise (libc.so.6)
                #1  0x0000ffffb0ac9540 g_log_default_handler (libglib-2.0.so.0)
                #2  0x0000ffffb0ac9770 g_logv (libglib-2.0.so.0)
                #3  0x0000ffffb0ac9960 g_log (libglib-2.0.so.0)
                #4  0x0000ffffb0cfc644 n/a (libgio-2.0.so.0)
                #5  0x0000ffffb0cfcce0 n/a (libgio-2.0.so.0)
                #6  0x0000ffffb0d00d6c g_settings_get_value (libgio-2.0.so.0)
                #7  0x0000ffffb0d01ef8 g_settings_get_boolean (libgio-2.0.so.0)
                #8  0x0000aaaac7cd268c on_mouse_settings_changed (phoc)
                #9  0x0000ffffb0bbcd1c n/a (libgobject-2.0.so.0)
                #10 0x0000ffffb0bbea4c g_object_new_valist (libgobject-2.0.so.0)
                #11 0x0000ffffb0bbecdc g_object_new (libgobject-2.0.so.0)
                #12 0x0000aaaac7cc9880 seat_add_pointer (phoc)
                #13 0x0000ffffb081fba4 n/a (libwlroots.so.5)
                #14 0x0000ffffb081fba4 n/a (libwlroots.so.5)
                #15 0x0000ffffb07ec8ec n/a (libwlroots.so.5)
                #16 0x0000ffffb07ebe50 n/a (libwlroots.so.5)
                #17 0x0000ffffb0876078 wl_event_loop_dispatch (libwayland-server.so.0)
                #18 0x0000aaaac7cbd548 wayland_event_source_dispatch (phoc)
                #19 0x0000ffffb0ac2674 g_main_context_dispatch (libglib-2.0.so.0)
                #20 0x0000ffffb0ac28e8 n/a (libglib-2.0.so.0)
                #21 0x0000ffffb0ac2c80 g_main_loop_run (libglib-2.0.so.0)
                #22 0x0000aaaac7cbd284 main (phoc)
                #23 0x0000ffffb05e1d24 __libc_start_main (libc.so.6)
                #24 0x0000aaaac7cbd32c $x (phoc)
                #25 0x0000aaaac7cbd32c $x (phoc)
Subsequent attempt to restart phoc
           PID: 1670 (phoc)
           UID: 1000 (purism)
           GID: 1000 (purism)
        Signal: 5 (TRAP)
     Timestamp: Thu 2021-08-05 14:44:11 BST (9min ago)
  Command Line: /usr/bin/phoc -C /usr/share/phosh/phoc.ini -E bash -lc 'gnome-session --disable-acceleration-check --session=phosh'
    Executable: /usr/bin/phoc
 Control Group: /user.slice/user-1000.slice/session-3.scope
          Unit: session-3.scope
         Slice: user-1000.slice
       Session: 3
     Owner UID: 1000 (purism)
       Boot ID: 56869365fe8b424dae1838b737e515df
    Machine ID: 0abf9e945cdd4378912c9943a4b192d1
      Hostname: patrick-l5
       Storage: /var/lib/systemd/coredump/core.phoc.1000.56869365fe8b424dae1838b737e515df.1670.1628171051000000.lz4
       Message: Process 1670 (phoc) of user 1000 dumped core.
                Stack trace of thread 1670:
                #0  0x0000ffff8eda0714 raise (libc.so.6)
                #1  0x0000ffff8f276540 g_log_default_handler (libglib-2.0.so.0)
                #2  0x0000ffff8f276770 g_logv (libglib-2.0.so.0)
                #3  0x0000ffff8f276960 g_log (libglib-2.0.so.0)
                #4  0x0000ffff8f4a9644 n/a (libgio-2.0.so.0)
                #5  0x0000ffff8f4a9ce0 n/a (libgio-2.0.so.0)
                #6  0x0000ffff8f4add6c g_settings_get_value (libgio-2.0.so.0)
                #7  0x0000ffff8f4aeef8 g_settings_get_boolean (libgio-2.0.so.0)
                #8  0x0000aaaae6a2268c on_mouse_settings_changed (phoc)
                #9  0x0000ffff8f369d1c n/a (libgobject-2.0.so.0)
                #10 0x0000ffff8f36ba4c g_object_new_valist (libgobject-2.0.so.0)
                #11 0x0000ffff8f36bcdc g_object_new (libgobject-2.0.so.0)
                #12 0x0000aaaae6a19880 seat_add_pointer (phoc)
                #13 0x0000ffff8efccba4 n/a (libwlroots.so.5)
                #14 0x0000ffff8efccba4 n/a (libwlroots.so.5)
                #15 0x0000ffff8ef998ec n/a (libwlroots.so.5)
                #16 0x0000ffff8ef98e50 n/a (libwlroots.so.5)
                #17 0x0000ffff8ef99124 n/a (libwlroots.so.5)
                #18 0x0000ffff8ef9c1f8 n/a (libwlroots.so.5)
                #19 0x0000aaaae6a0dba4 phoc_server_setup (phoc)
                #20 0x0000aaaae6a0d20c main (phoc)
                #21 0x0000ffff8ed8ed24 __libc_start_main (libc.so.6)
                #22 0x0000aaaae6a0d32c $x (phoc)
                #23 0x0000aaaae6a0d32c $x (phoc)

The other two attempts to restart phoc have basically the same stack trace (only the addresses are different), so I’ve not pasted those here.

We lack the full BT but this points to gsettings schema (as suspected above). @dos there’s not much to be gained by having this version in amber-phone since g-c-c can’t cope anyway so i’d just revert to the previous version.

Hi, is this going to be fixed ? Any workaround to make the phone work again in desktop mode until then ?

Phone crashes (shutdown) after bluetooth connection to device

1 Like

Fixed version 0.8.0-1~pureos1-amber2 is now available in amber-phone.



  • update available and applied
  • USB mouse now stable and working

Yes, that fixed it. Twiddler3 now works via USB and Bluetooth.

Ooh. I think I get to use the :ballot_box_with_check: Solution button now.

1 Like