18.04 LTS: Help me understand why Kodi jumps between workspaces, freezes when adjusting backlight, and other wonderings

It's a pleasant surprise to discover that you run a modern easy to use forum like this. Although I get frustrated with every flavor of every distro, something about Mate in particular always tells me you've got a good sense of taste.

I got the impression that as a new user I'm limited in the number of posts, so I'll list everything I haven't been able to figure out while using 18.04 LTS 32-bit. Let me know if I should split it up into several threads:

Regarding Kodi 17 "from Debian", from the Mate repos

  1. Kodi (fullscreen) jumps from its own workspace to the active workspace whenever I adjust either screen backlight or audio volume using the dedicated keyboard keys for that. In other words, it seems to happen whenever the square indicator shows up and gives visual feedback for volume or brightness level.

    Launch Kodi -> Change to another workspace -> Adjust backlight -> Kodi is now on screen.

  2. With every window manager except "Marco (adaptive compositor)", i.e. on Marco (none), Macro (Compton GPU) and Compiz, Kodi will freeze video but continue audio playback when I adjust volume or screen backlight. This also happens in Debian 10 (buster) 32 bit when using their "Kodi from Debian". What might be the cause for this? Is there something that distinguishes Marco (adaptive compositor) which would reasonably exlpain it?

    I'd like to understand what Mate does so that it uniquely among all the desktop environments and distros I've tried manages to run this version of Kodi without freezing upon backligt/volume adjustment. It would have been nice to be able to use Compiz, but I think I'll have to settle for understanding the problem.

  3. Enabling Airplay in Kodi does not make the service visible on the network. Is there something about this "from Debian" build that I should be aware of? Airplay is a can of worms, but I can at least assure you that 1. airplay works on the network with other linux devices (OSMC on Rpi3), 2. the ports that Kodi forum members assert should be listened on for Airplay are not listened on, 3. the package that Kodi forum members mention -- shairplay -- doesn't exist in the Mate repos, 4. I compiled and installed shairplay and confirmed that application worked and that zeroconf announcement worked, but Kodi still doesn't expose the service despite reasonably having access to the necessary library now, 5. avahi-daemon is running on the system, and other zeroconf services are announced from the system, 6. not a single mention of "air" anywhere in the kodi.log.

I would like to try making this version of Kodi work since other versions that I've tried have choppy playback in comparison, because of the very limited hardware.

Regarding smoothness of backlight adjustment in Mate

  1. Adjusting backlight is a little choppy, but completely fine (esp. compared to the horrible examples I've witnessed out there, like in Debian 10). However, adjusting it on Xubuntu Desktop is super smooth and feels great. Is it possible to get that experience on Mate somehow?
  2. Adjusting backlight noticeably writes to disk on every "tick", so if I were to hold down the button it would write to disk repeatedly for every level of backlight inbetween. I can hear the writes. Why is it doing this? I understand that you want to persist user preferences, but I mean why isn't the write deferred or throttled to not trigger during the actual interaction? Or maybe this doesn't matter and it's not what's making the experience less smooth.

Grateful for any explanations that can shed some light on these points.


Ubuntu Mate 18.04
Samsung NC10 netbook

  • 2 GB RAM
  • Intel Atom N270 @ 1.6 GHz x2
  • Intel 945GME Graphics
1 Like

Hi and welcome to the Ubuntu MATE Community !

Congrats for running Ubuntu MATE on a NC10. Those were little beasts back in the day. Sadly the support will end soon for those 32-bit machines.

  1. Maybe you could circumvent this by using keyboard shortcuts for setting the volume using pactl and the backlight with xbacklight (cf. 4.).
  1. You might want to try xbacklight from the Ubuntu repos for adjusting the backlight.
    It works this way:
    xbacklight -inc 5 will add 5% backlight.
    xbacklight -dec 10 will lower the backlight from 10%.
    xbacklight -set 37 will set the backlight to 37%.
    You can put 1% steps if you want. The transition is smoother than the default.
    Just add keyboard shortcuts to your liking.
  1. I don't know if it does this using xbacklight. Maybe a cheap SSD would help. The fact you're noticing it likely has to do with the old hardware.

Thanks, and thanks for the suggestions!

I was given the NC10 since it wasn't being used, and I'm pretty impressed with it for its age. I understand it was praised as a netbook in its day for the relative quality of its keyboard. That said I'm not about to invest in it other than try to make the existing hardware work reasonably well. Well...almost. So far I've "only" had to solder extra ground wires to the LCD panel's frame, and double the memory. It's therapeutic to revive old junk sometimes.

The numbering is wrong in the list below. I numbered the points 1., 4. and 5. respectively. I would call it a bug in Discourse. Obviously it can be done somehow, considering the previous post, but I couldn't inspect its markdown to see how.

  1. Unfortunately it turns out xbacklight also displays the same symptoms.

    Now that you mention it I seem to have already experimented with xbacklight, and then decided to make iOS shortcuts to send those commands from my phone with a tap. Then I realized it won't work that easily while SSHing. Something about login shells and sessions no doubt. I should read about that. I'd be happy to hear how to use that tool successfully over SSH if you happen to know.

  2. Thanks for the usage overview. Binding that command to keyboard shortcuts is much choppier than the native keyboard events I'm afraid. Now, I don't know the internals of xbacklight since it appears to be a binary, but doesn't every call spawn a process? I was imagining that Xubuntu-desktop avoided that needless overhead somehow. It would be interesting to know how, and if it could be applied to Mate.

    Although not a replacement for gradual adjustment, I did end up using the shortcuts in another way to create quick jumps of 50% brightness. Thanks :+1:

  3. Just to clarify, I have no issue with noticing the disk writes themselves -- that was only speculation as to the cause of the less responsiveness compared to Xubuntu-desktop. They might not be the problem.

    Anyway, Xubuntu is a good example of how there's no hardware problem. A 1.6 GHz machine with 2 GB memory doesn't choke on the harddrive (or on process creation overhead) while performing the most trivial of operations a few times per second, unless it's being told to. I'd like to discourage the habit of throwing hardware on trivial software problems if I can. It encourages the wrong kind of software. Let's not forget that 10 year old computers are still very fast. If they have any performance problems with these kinds of tasks, it's always the software that's to blame.

    Reminds me of a piece of code that took over a minute to parse a youtube playlist with 30 entries. Fingers were pointed at the processor. With a few simple changes it was sped up to parse 1000 entries in 40 seconds, or about 80x. All that's needed is usually to not perform all the unnecessary work :slight_smile: